Mailing List Archive

Xen and ways to install
Hi

Given that I keep installing my xen domains with a cd, I was wondering
what other ways are possible for installing domains? I'm only
installing rhel 3 + 4, and fedora core 3 and pre 4.

Any help would be appreicated

Thanks
Shaz

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Am Dienstag, den 19.04.2005, 12:06 +0100 schrieb Shahzad Chohan:
> Given that I keep installing my xen domains with a cd, I was wondering
> what other ways are possible for installing domains? I'm only
> installing rhel 3 + 4, and fedora core 3 and pre 4.

1) try starting a xenU kernel with some additional features (i remember
it needs cramfs, loop, ...) and the pxe-initrd
<http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/images/pxeboot/initrd.img>

(FC3 example). I once managed to start the FC installer this way inside
a UML. This should be able from _any_ linux distro!


2) a friend of mine managed to start the anaconda installer manually,
giving it an (empty) rootdir to install into. Do not have any details.


3) Mount the empty rootdir for the new installation and install the rpm
packages into it. "rpm" itself cannot resolve dependancies (so it's
package list has to be "dependancy-complete"), but yum and apt-for-rpm
can:

rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES

yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES

apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES

After doing so, create/edit the usual files (fstab, hosts, resolv.conf,
inittab, network-configuration, ...), rename /lib/tls, umount & boot.

I install all my RH/FC/CentOS VMs with apt-get.

/nils.


_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Am Dienstag, den 19.04.2005, 13:24 +0200 schrieb Nils Toedtmann:
> 3) Mount the empty rootdir for the new installation and install the rpm
> packages into it. "rpm" itself cannot resolve dependancies (so it's
> package list has to be "dependancy-complete"), but yum and apt-for-rpm
> can:
>
> rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES
>
> yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES
>
> apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES

The actual install commands are obviously missing :(

rpm --root $RootDir --install $packagelist
yum --installroot $RootDir install $packagelist
apt-get -o RPM::RootDir=$RootDir install $packagelist

You may need to put some basic files (like /dev/null, /etc/fstab) into
the rootdir first; rpm probably needs to initialised before:

rpm --root $RootDir --initdb


> After doing so, create/edit the usual files (fstab, hosts, resolv.conf,
> inittab, network-configuration, ...), rename /lib/tls, umount & boot.

/nils.



_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
> > rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES
> >
> > yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES
> >
> > apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES
>
> The actual install commands are obviously missing :(
>
> rpm --root $RootDir --install $packagelist
> yum --installroot $RootDir install $packagelist
> apt-get -o RPM::RootDir=$RootDir install $packagelist

Rather than using a package list, is it possible to specify a package group or
a metapackage or something to yum / apt? I.e. to get a complete base install
suitable for booting without having to figure out the packages manually?

That would be really useful (and worth documenting).

Cheers,
Mark

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Am Dienstag, den 19.04.2005, 18:16 +0100 schrieb Mark Williamson:
> > > rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES
> > >
> > > yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES
> > >
> > > apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES
> >
> > The actual install commands are obviously missing :(
> >
> > rpm --root $RootDir --install $packagelist
> > yum --installroot $RootDir install $packagelist
> > apt-get -o RPM::RootDir=$RootDir install $packagelist
>
> Rather than using a package list, is it possible to specify a package group or
> a metapackage or something to yum / apt? I.e. to get a complete base install
> suitable for booting without having to figure out the packages manually?

yum --installroot $RootDir groupinstall Base

You may want to add "-y" to automatically answer all questions with
"yes" for unattended/scripted installation.


> That would be really useful (and worth documenting).

I personally dislike this since it installs too many packages you'll
never need (cups, freetype and even xorg-x11-Mesa-libGL! welcome to
dependancy hell). yum resolves dependancies, so this builds a _minimal_
system where you can do networking, ssh-login, editing with vi and
install everything you need via yum:

mkdir -p $RootDir/{etc,dev}

cat > $RootDir/etc/fstab <<EOF
/dev/sda1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
none /dev/shm tmpfs defaults 0 0
EOF

# at least /dev/null must be present before "yum install"
for i in console null zero ; do MAKEDEV -d $RootDir -x $i ; done

# beware: this mounts $RootDir/proc!
yum --installroot $RootDir -y install yum rootfiles bind-utils gnupg \
mailx openssh-server vim-enhanced vixie-cron crontabs passwd

mv $RootDir/lib/tls $RootDir/lib/tls.disbled

chroot $RootDir # now personalize & configure your VM
exit # exit the chroot

umount $RootDir/{proc,}


Happy booting. I prefer apt-get over yum (it's much faster and it's
smarter with different rootdir), but it's not part of the distro (shame
on RH). Here is another desciption:

<http://wiki.blagblagblag.org/Xen>

I have my own rpm repository with some empty dummy-rpms (kernel, kudzu)
to escape evil dependancies (i do not need a 25MB kernel package in
domU!)

/nils


_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Nils Toedtmann <xen-users@nils.toedtmann.net> wrote:

> 3) Mount the empty rootdir for the new installation and install the rpm
> packages into it. "rpm" itself cannot resolve dependancies (so it's
> package list has to be "dependancy-complete"), but yum and apt-for-rpm
> can:
>
> rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES
>
> yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES
>
> apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES
>
> After doing so, create/edit the usual files (fstab, hosts, resolv.conf,
> inittab, network-configuration, ...), rename /lib/tls, umount & boot.
>
> I install all my RH/FC/CentOS VMs with apt-get.

OK. Thus there are basically two ways of installing
Linux-based dom-Us (booting a pre-generated image or
bootstrapping via net-install/apt-get).
BTW: Can Gentoo be bootstrapped like this?

But how can Net- and FreeBSD be installed (on a
Linux-based dom-0)? Since I've downloaded the Demo-CD,
I've seen, that it's possible.

I guess, that the *BSD-images, which are included on the
Demo-Cd, can be used for "normal" installations as well,
right (although on the Demo-CD these are cow-volumes)?

by
Töns
--
There is no safe distance.

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Gentoo can be bootstrapped like this, I've done it before and all you
have to do is follow there install guide with the corret mount point.

Mike

Toens Bueker wrote:

>Nils Toedtmann <xen-users@nils.toedtmann.net> wrote:
>
>
>
>>3) Mount the empty rootdir for the new installation and install the rpm
>>packages into it. "rpm" itself cannot resolve dependancies (so it's
>>package list has to be "dependancy-complete"), but yum and apt-for-rpm
>>can:
>>
>> rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES
>>
>> yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES
>>
>> apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES
>>
>>After doing so, create/edit the usual files (fstab, hosts, resolv.conf,
>>inittab, network-configuration, ...), rename /lib/tls, umount & boot.
>>
>>I install all my RH/FC/CentOS VMs with apt-get.
>>
>>
>
>OK. Thus there are basically two ways of installing
>Linux-based dom-Us (booting a pre-generated image or
>bootstrapping via net-install/apt-get).
>BTW: Can Gentoo be bootstrapped like this?
>
>But how can Net- and FreeBSD be installed (on a
>Linux-based dom-0)? Since I've downloaded the Demo-CD,
>I've seen, that it's possible.
>
>I guess, that the *BSD-images, which are included on the
>Demo-Cd, can be used for "normal" installations as well,
>right (although on the Demo-CD these are cow-volumes)?
>
>by
>Töns
>
>


_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
> OK. Thus there are basically two ways of installing
> Linux-based dom-Us (booting a pre-generated image or
> bootstrapping via net-install/apt-get).
> BTW: Can Gentoo be bootstrapped like this?

AFAIK, Gentoo can be installed much the same way you'd install it on a normal
machine: mount the domain's root filesystem, unpack the stage tarballs, get
the portage snapshort, chroot to the install and get emerge to build the
system.

The whole procedure is in the handbook at
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml - you should be able
to do it from dom0. You can probably skip the kernel configuration stage if
you're just going to boot it using a domU.

Cheers,
Mark

> But how can Net- and FreeBSD be installed (on a
> Linux-based dom-0)? Since I've downloaded the Demo-CD,
> I've seen, that it's possible.
>
> I guess, that the *BSD-images, which are included on the
> Demo-Cd, can be used for "normal" installations as well,
> right (although on the Demo-CD these are cow-volumes)?
>
> by
> Töns

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Mark Williamson wrote:

>The whole procedure is in the handbook at
>http://www.gentoo.org/doc/en/handbook/handbook-x86.xml - you should be able
>to do it from dom0. You can probably skip the kernel configuration stage if
>you're just going to boot it using a domU.
>
>
I actually use Gentoo's genkernel command to automatically build a Xen
kernel and initrd. It works quite well. All it takes is xenifying the
default genkernel config.

Regards,
Anthony Liguori

>Cheers,
>Mark
>
>
>
>>But how can Net- and FreeBSD be installed (on a
>>Linux-based dom-0)? Since I've downloaded the Demo-CD,
>>I've seen, that it's possible.
>>
>>I guess, that the *BSD-images, which are included on the
>>Demo-Cd, can be used for "normal" installations as well,
>>right (although on the Demo-CD these are cow-volumes)?
>>
>>by
>>Töns
>>
>>
>
>_______________________________________________
>Xen-users mailing list
>Xen-users@lists.xensource.com
>http://lists.xensource.com/xen-users
>
>
>


_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
Am Mittwoch, den 20.04.2005, 20:53 +0200 schrieb Toens Bueker:
> Nils Toedtmann <xen-users@nils.toedtmann.net> wrote:
>
> > 3) Mount the empty rootdir for the new installation and install the rpm
> > packages into it. "rpm" itself cannot resolve dependancies (so it's
> > package list has to be "dependancy-complete"), but yum and apt-for-rpm
> > can:
> >
> > rpm --root $ROOTDIR $COMPLETE_LIST_OF_RPM_PACKAGES
> >
> > yum --installroot $ROOTDIR $LIST_OF_RPM_PACKAGES
> >
> > apt-get -o RPM::RootDir=$ROOTDIR $LIST_OF_RPM_PACKAGES
> >
> > After doing so, create/edit the usual files (fstab, hosts, resolv.conf,
> > inittab, network-configuration, ...), rename /lib/tls, umount & boot.
> >
> > I install all my RH/FC/CentOS VMs with apt-get.
>
> OK. Thus there are basically two ways of installing
> Linux-based dom-Us (booting a pre-generated image or
> bootstrapping via net-install/apt-get).

I'd say there is a third way: booting a domU with a installer initrd and
an empty image (maybe you have to export a disk (sda) instead of a
partition (sda1) because that the installer may want to fdisk it). This
worked at least for RH8. The advantage over yum/apt is that it's really
independant from the dom0 distro.

And (see Jeff's skript) you could just "cp -a" a working rootdir.


> BTW: Can Gentoo be bootstrapped like this?

Gentoo has a unique forth way: it supplies a minimalistic chroot ("stage
{1|2}") as build environment. So it can bootstrap from any dom0 distro.
The the other replies for links.


> But how can Net- and FreeBSD be installed (on a
> Linux-based dom-0)? Since I've downloaded the Demo-CD,
> I've seen, that it's possible.
>
> I guess, that the *BSD-images, which are included on the
> Demo-Cd, can be used for "normal" installations as well,
> right (although on the Demo-CD these are cow-volumes)?

Correct, i run the FreeBSD image with a kernel from Kip. You have to
bootstrap from a running FreeBSD (like such a domU) with "make
buildworld; make DESTDIR=/mnt installworld" to install a new FreeBSD
system into "/mnt". I tried to do this in my domU FreeBSD but failed
(yet ;) Probably my fault.

I do not know NetBSD, but i guess it's similar.

Maybe there is a nice {Free|Net}BSD installer initrd?

/nils.


_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: Xen and ways to install [ In reply to ]
On Wed, Apr 20, 2005 at 08:53:33PM +0200, Toens Bueker wrote:
> I guess, that the *BSD-images, which are included on the
> Demo-Cd, can be used for "normal" installations as well,
> right (although on the Demo-CD these are cow-volumes)?

Sure. The cow stuff happens separately from the filesystem images. But
they're rather out of date - in particular the FreeBSD system is behind
the times - and will only get more so, and have some non-standard parts
(e.g. for X over VNC in NetBSD).

Tim.

--
Tim Deegan (My opinions, not the University's)
Systems Research Group
University of Cambridge Computer Laboratory

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users