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

Re: Fedora and Xen: A Quick Start Guide

On Tue, 2005-01-25 at 09:47 -0500, David Hollis wrote:
> On Tue, 2005-01-25 at 00:03 -0500, Jeremy Katz wrote:
> > Next, let's create a file to use as the backing for our Fedora install.
> > For example purposes, I'll create one of a size of 1 GB.
> >   dd if=/dev/zero of=/root/fedora.img bs=1M count=1024
> To make a sparse file, I used:
> dd if=/dev/zero of=fedora.img bs=1M count=1 seek=1024
> This way, my file looked like 1GB, but only allocated space upon use.

Very reasonable, thanks.  Will add to what goes up on the website (or
more likely, the wiki as Seth suggested)

> > Now, create an ext3 filesystem on this image.
> >   mke2fs -F -j /root/fedora.img
> > You should now be able to mount your new temporary rootfs on a temporary
> > mountpoint, say /mnt
> >   mount -o loop /root/fedora.img /mnt
> > Now, we can install whatever basesystem we want into this chroot.  Make
> > sure that your yum configuration points to a valid repository.  Then,
> > decide what group(s) you want to install.  I'd recommend starting with
> > Base (or for the space constrained, Core, but this is more difficult).
> > Then, run
> >   yum --installroot=/mnt -y groupinstall Base
> > 
> Cool trick!  Didn't know that I could do that!  I did find that I needed
> to 'rpm --root /mnt --import <various RPM-GPG-KEYs> to make yum happy.
> I also needed to create /mnt/var/cache/yum so that it could write
> the .gpgkeyschecked.yum file.  I suppose that if I turned off gpg
> checking, I would have been fine.

Hmmm, makes sense.  I run with gpgchecking disabled since I'm always
running the devel tree and pulling from an internal tree :)  I'll see
how this is with yum 2.1.13 (which I built half an hour ago) and if
needed, add a note about it.

> > Come back and if everything went okay, you'll have a minimal install
> > in /mnt.  Now, for the ugly part, we need to set up some basic bits on
> > the filesystem that have to be different for xen right now.  These
> > include a) creating some required device nodes in /dev
> > since we're not using an initrd  and b) setting up an /etc/fstab
> >   for i in console null zero ; do MAKEDEV -d /mnt -x $i ; done
> > 
> for i in console null zero; do MAKEDEV -d /mnt/dev -x $i ; done
> Otherwise, those device files end up in / instead /dev on the filesystem
> image.

Erk, wonder how I lost that in cutting and pasting.

> > For the /etc/fstab, something simple like the following should work
> Would it be necessary to have /sys in fstab?  The initscripts mount it
> automagically themselves.  Haven't performed any testing myself to
> validate with a Xen config.

Probably not necessary, but trying to get things looking as much like a
freshly installed system as possible.  And fresh installs write sysfs

Thanks for the feedback.


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