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] Newbie question: Why does Xen boot fail with initrd but succ

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Newbie question: Why does Xen boot fail with initrd but succeed with initramfs?
From: Yasir Assam <list1@xxxxxxxxxxxxxxx>
Date: Sun, 09 Jul 2006 11:18:18 +1000
Delivery-date: Sat, 08 Jul 2006 18:19:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Debian Thunderbird 1.0.7 (X11/20051017)
I'm new to Xen. It's taken me a few days (!) just to get xen to boot. I kept getting the following error:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

even when I used an initrd image. In the end I tried using mkinitramfs, and the resulting image worked.

Why should this be? Nearly every howto I read suggests mkinitrd, yet only mkinitramfs works on my system.

The following are the details of what I did:

-------------------------------------------------------------------------------------
I downloaded the xen-unstable source and built it using:

# make world
# make install

and I added the following to the grub menu:

title           Xen 3.0 / XenLinux 2.6
root            (hd0,1)
kernel         /boot/xen-3.0-unstable.gz dom0_mem=262144 noreboot
module         /boot/vmlinuz-2.6.16-3-xen root=/dev/sda2 ro console=tty0

For reference, this is the grub entry for my default kernel (not Xen) - I use Debian etch with a custom-built kernel:

title           Debian GNU/Linux, kernel 2.6.17.4-eir
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.17.4-eir root=/dev/sda2 ro
initrd          /boot/initrd.img-2.6.17.4-eir
savedefault
boot

When I reboot and choose Xen from the grub menu, it crashes. The following are the last few lines in the log (I had to type these by hand - I don't konw how else to get the log - I don't think I have the hardware needed to set up a terminal via serial link):

md: Autodetecting RAID arrays
md: autorun ...
md: ... autorun DONE.
VFS: Cannot open root device "sda2" or unknown-block(0,0)
Please append correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I read this list and thought that maybe it's because the kernel doesn't have the correct SATA driver. I think I need module sata_nv, and this is listed as a module in the config file /boot/config-2.6.16.13-xen.

I also read somewhere that I have to use mkinitrd to create an initrd file otherwise modules won't be loaded, so I exectued the following commands:

# depmod 2.6.16.13-xen
# mkinitrd -o /boot/initrd.img-2.6.16.13.xen 2.6.16.13-xen

and I also added the following line to the Xen grub entry:

module          /boot/initrd.img-2.6.16.13.xen

but still I got a crash with the following lines:

md: Autodetecting RAID arrays
md: autorun ...
md: ... autorun DONE.
RAMDISK: cramfs filesystem found at block 0
RAMDISK: Loading 5184KiB [1 disk] into ram disk... done.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Finally, I ran the following:

# depmod 2.6.16.13-xen
# mkinitramfs -k -o /boot/initramfs.img-2.6.16.13.xen 2.6.16.13-xen

and then added the follwing to grub:

module          /boot/initramfs.img-2.6.16.13.xen

and Xen successfully booted on restart.
------------------------------------------------------------------------------

Thanks,
Yasir

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

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