WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Creating an FC6 bootstrap image

Hello all,

I am having some big problems getting an FC6 image bootstrapped, maybe someone
can shed some light on some of the issues.

For starters, once I boot the DomU I immediately get dropped into single user
mode with the image complaining about the ext2 volume not being recognized and
the superblock is missing (even though it was prepared with ext3 and a journal).
 I had to change the fstab entry for /dev/sda1 to "0 0" to prevent fsck from
running on bootup, although I am not sure if this is the proper cause of action
for ext3.  I am reading conflicting stories about fsck and ext3 in the various
documentation out there, some folks are of the opinion you never need to run
fsck on ext3, others say it should be ran infrequently but done manually instead
of the automatic 180 day default.

The second issue is dhcp, the first time the DomU is booted it will get a DHCP
lease and configure everything properly, but after that first boot on subsequent
bootup ifcfg-eth0 gets renamed to ifcfg-eth0.bak and I have to use dhclient to
configure dhcp manually.  The .bak renaming process is apparently buried
somewhere in the Fedora networking code, it's not a part of the init process. 
Does anyone know why this is happening on startup?

I don't have any issues if I do a groupinstall Base, only if I try to do a
groupinstall Core.  Is there some additional setup that happens with Base that
doesn't not occur using Core?

I am also getting some error messages every few minutes related to init:

INIT: Id "2" respawning too fast: disabled for 5 minutes
INIT: Id "5" respawning too fast: disabled for 5 minutes
INIT: Id "3" respawning too fast: disabled for 5 minutes
INIT: Id "6" respawning too fast: disabled for 5 minutes
INIT: Id "4" respawning too fast: disabled for 5 minutes
INIT: Id "2" respawning too fast: disabled for 5 minutes
INIT: Id "5" respawning too fast: disabled for 5 minutes
INIT: Id "3" respawning too fast: disabled for 5 minutes

Here's the build process so far:

/bin/dd if=/dev/zero of=my-image.fs bs=1M count=2048
/sbin/mke2fs -F -j my-image.fs
/bin/mkdir /mnt/ec2-fs
/bin/mount -o loop my-image.fs /mnt/ec2-fs
/bin/mkdir /mnt/ec2-fs/dev
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x console
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x null
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x zero
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x random
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x sda
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x sda1
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x sda2
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x sda3
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x sda4
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x hda
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x hda1
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x hda2
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x hda3
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x hda4
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty1
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty2
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty3
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty4
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty5
/sbin/MAKEDEV -d /mnt/ec2-fs/dev -x tty6
/bin/mkdir /mnt/ec2-fs/etc
/bin/cat << EOF > /mnt/ec2-fs/etc/fstab
/dev/sda1  /         ext3    defaults        0 0
none       /dev/pts  devpts  gid=5,mode=620  0 0
none       /dev/shm  tmpfs   defaults        0 0
none       /proc     proc    defaults        0 0
none       /sys      sysfs   defaults        0 0
#/dev/sda2  /mnt      ext3    defaults        1 2
#/dev/sda3  swap      swap    defaults        0 0
EOF
[snip yum conf]
/bin/mkdir /mnt/ec2-fs/proc
/bin/mount -t proc none /mnt/ec2-fs/proc
/bin/mkdir /mnt/ec2-fs/var /mnt/ec2-fs/var/log
/usr/bin/yum -c yum-xen.conf --installroot=/mnt/ec2-fs -y groupinstall Core
/usr/bin/yum -c yum-xen.conf --installroot=/mnt/ec2-fs -y install dhcdbd
openssh-server yum
/bin/mkdir /mnt/ec2-fs/lib/modules/2.6.16-xenU
/bin/cp -vR /tmp/AMI/modules/* /mnt/ec2-fs/lib/modules/2.6.16-xenU/
/bin/cat << EOF > /mnt/ec2-fs/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
EOF
/bin/cat << EOF > /mnt/ec2-fs/etc/sysconfig/network
NETWORKING=yes
EOF
/bin/cat << EOF > /mnt/ec2-fs/etc/sysconfig/selinux
SELINUX=disabled
EOF

And here is the Xen config file:

kernel ="/boot/vmlinuz-2.6.16.xenU"
memory = 128
name = "ec2_test1"
vif = [ '' ]
root="/dev/sda1 ro"
disk = ['file:/home/gary/AMI/my-image.fs,sda1,w']
dhcp="on"


Thanks in advance for any help...



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

<Prev in Thread] Current Thread [Next in Thread>