[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] install other OS to unprivileged domain


# cd /tmp && wget http://fv.kh3.org/tmp/dpkg-1.13.11-2.src.rpm
# yum install autoconf compat-gcc-32 gcc gettext-devel automake
# rpbuild --rebuild dpkg-1.13.11-2.src.rpm
# rpm -ivh dpkg-1.13.11-2.src.rpm
   1:dpkg                   ###########################################

work well on my Base FC4 system freshly installed ....

Let me know error messages....

For your kernel problem, few month agos, Gino Ledesma sent me his spec
for xen stable release on CentOS.
I adapted it for FC4.
Actualy we use it on a production server and it seem to work well....
Have a look at it and send me some feedback....
The srpm will be downloadable soon....

Fv <fv@xxxxxxx>

Shu Hung (Koala) wrote:


Seems I failed compiling dpkg under gcc4 (come with fc4)
Any idea on how to get it work?

Koala Yeung

2005/11/9, François Visconte < fv@xxxxxxx <mailto:fv@xxxxxxx>>:

    Shu Hung (Koala) wrote:

    > 2005/11/9, Dirk H. Schulz < dirk.schulz@xxxxxxxxxxxxx
    > <mailto:dirk.schulz@xxxxxxxxxxxxx
    >     Shu Hung (Koala) schrieb:
    >     That is one way to do it.
    >     The other ways depend on the distro you want to install. For
    >     there is debootstrap, e.g.
    >     Dirk
    > Thanks for information. ^^
    > Can I use debootstrap to install Debian on my existing Xen (using
    > Fedora Core 4 as privilege domain)? How can I do so?
    > Koala

    >Xen-users mailing list
    >Xen-users@xxxxxxxxxxxxxxxxxxx <mailto:Xen-users@xxxxxxxxxxxxxxxxxxx>
    > http://lists.xensource.com/xen-users
    I have packaged dpkg and debootstrap for that purpose on FC4.
    You can trie the following rpm. Let me know if it don't work well.


Technical Support, DigitalOne Limited
Tel: 8100-2616 / 2545-1383   Fax: 2815-0593


Xen-users mailing list

%define oversee_version oversee.pl1
%define kversion 2.6.11
%define extraversion 12

%define xen_name xen
%define xen_version 2.0.7
%define grubby_xen_nosupport 1

Name: xen-kernel
Group: System Environment/Kernel
License: GPLv2
Version: %{kversion}
Release: %{extraversion}.%{oversee_version}
ExclusiveOS: Linux
Provides: kernel = %{version}
Provides: kernel-drm = 4.3.0
Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
Summary: The Xen Linux Kernel (the core of the linux operating system)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildPreReq: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
BuildPreReq: bzip2, findutils, gzip, m4, perl, make >= 3.78, gnupg 
#, kernel-utils
BuildRequires: gcc >= 2.96-98, binutils >= 2.12, redhat-rpm-config >=, 
compat-gcc-32 >= 3.2.3
BuildConflicts: rhbuildsys(DiskFree) < 500Mb
Requires: xen >= %{xen_version}

Source1: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2

#Added build configs for the i86 Kernel (CentOS-4)
Source20: xen-kernel-%{kversion}-xen0.config
Source21: xen-kernel-%{kversion}-xenU.config

The kernel package contains the Linux kernel (vmlinuz), the core of any
Linux operating system.  The kernel handles the basic functions
of the operating system:  memory allocation, process allocation, device
input and output, etc.

%define build_domU 1

%package domU
Summary: Non-privileged (domU) kernel for guest domains.
Group: System Environment/Kernel
Requires: xen-kernel

%description domU
Non-privileged (domU) kernel for guest domains. This kernel requires
the privileged (dom0) kernel to operate.


%setup -q -n xen-2.0
# Copy the kernel
cp %{SOURCE1} .

# Copy our patch sets
#cp %{PATCH0} patches/linux-%{kversion}

#%if %{build_domU}
#cp %{PATCH1} patches/linux-%{kversion}

# Build kernels using our config
mkdir -p dist/install/boot
cp %{SOURCE20} dist/install/boot/config-%{kversion}.%{extraversion}-xen0

%if %{build_domU}
cp %{SOURCE21} dist/install/boot/config-%{kversion}.%{extraversion}-xenU

make kernels


cd linux-%{kversion}-xen0
install modules_install
%if %{grubby_xen_nosupport}
touch $RPM_BUILD_ROOT/boot/initrd-%{kversion}.%{extraversion}-xen0.img

%if %{build_domU}
cd ../linux-%{kversion}-xenU
install modules_install
# We want this built all the time since we'll never use grubby for xenU
touch $RPM_BUILD_ROOT/boot/initrd-%{kversion}.%{extraversion}-xenU.img



%files domU
%if %{build_domU}

/sbin/modprobe loop 2> /dev/null > /dev/null  || :
exit 0

[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade

%if %{grubby_xen_nosupport}

# Make the initrd
[ -f /boot/initrd-%{kversion}.%{extraversion}-xen0.img ] && mv 
mkinitrd --builtin=ata_piix --builtin=raid1 -f 

# Update GRUB (no, LILO isn't supported anymore)
res=$(mount | grep -w "/boot")
if [ $? -eq 0 ]; then

root_part=$(grep -v "^#" /etc/fstab | grep -w "/" | cut -d\  -f1)

cat << EOF >> /etc/grub.conf

title Xen %{xen_version} / Linux Kernel %{kversion}.%{extraversion}-xen0
    root (hd0,0)
    kernel ${boot_prefix}/xen.gz dom0_mem=262144 com1=115200,8n1
    module ${boot_prefix}/vmlinuz-%{kversion}.%{extraversion}-xen0 ro 
root=${root_part} console=tty0 console=ttyS0 max_loop=256
    module ${boot_prefix}/initrd-%{kversion}.%{extraversion}-xen0.img

# We can't do this yet because grubby doesn't support Xen yet
[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --package kernel --mkinitrd 
--depmod --install %{kversion}.%{extraversion}-xen0

%post domU
[ -f /boot/initrd-%{kversion}.%{extraversion}-xenU.img ] && mv 
mkinitrd -f /boot/initrd-%{kversion}.%{extraversion}-xenU.img 

/sbin/modprobe loop 2> /dev/null > /dev/null  || :
[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep 
--remove %{kversion}.%{extraversion}-xen0

cat << EOF

* REMINDER: Please update your /boot/grub.conf *
* file and remove the XEN boot entries.        *

* Wed Sept 24 2005 François Visconte <visconte@xxxxxxxxxxxx 
- Adapted for FC4

* Wed Aug 12 2005 Gino Ledesma <gledesma@xxxxxxxxx> 2.6.12
- Xen Kernel based on xen 2.0.7
- Added grub config support
- Added initrd stuff to the filelist

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.