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

Re: [Xen-users] Creating an FC6 bootstrap image

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Creating an FC6 bootstrap image
From: "Jerry Amundson" <jamundso@xxxxxxxxx>
Date: Thu, 25 Jan 2007 00:18:38 -0600
Delivery-date: Wed, 24 Jan 2007 22:18:46 -0800
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dC0wYxBOA4nuVZqsSpNZSW5/ITpKeafFZh+DaUSTZT5VmVvfGRwdXIyHIagnl9VgJNTDDN4Bc+JUIGihozOkJ0F9Ngx/f3AaAShlRyW34msd8by93+DhsbOf3brF8uXrEzQpPxBAm7PenSbv6W351SqSbKjYOIRjRhpuFXJ3T6A=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <loom.20070124T195031-708@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <6af0ecc70610201934u7e6d4372r7d01b1de45271228@xxxxxxxxxxxxxx> <1161420634.7700.19.camel@xxxxxxxxxxxxxxxxxxxx> <6af0ecc70610211649vcad7830iaf87598f0710aae9@xxxxxxxxxxxxxx> <loom.20070124T195031-708@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 1/24/07, Gary P. <gperry@xxxxxxxxxxxxxxxxxxx> wrote:
Hello all,

Hi.

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

Maybe.

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.

I think the default is randomly set between 20-40 *mounts* ... haven't
seen the source to be certain. When you can boot, "tune2fs -l
/dev/sda1" will indicate this. Then, also, change back to 1 1 - I
wouldn't trust a "never" statement in this context....

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?

No, but I've seen that - should go away when the base problem is solved...

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?

Interesting - I've wanted to try that ... good thing I waited, maybe. :-)

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:

Assuming, your dom0 is not also FC6, right? (because howto exists -
http://www.fedoraproject.org/wiki/FedoraXenQuickstartFC6

/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

"udev" should do most of that...

/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

"mkdir -p" is nice :-)

/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

Add kernel-xen there - it's in the repo anyway, and gives you "yum
update" from the domU... (I think I did it from dom0... but the key
may be the mkinitrd it does...)
Contents of yum-xen.conf?

/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/

Ok, and where did /tmp/AMI come from anyway??

/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"

Oh, so dom0 is FC6?
Might need the boot log...

jerry

--
"Pay no attention to that man behind the curtain!"

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