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

Re: [Xen-users] Newbie question: Why does Xen boot fail with initrd but succeed with initramfs?


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Efraim <efraimg@xxxxxxxxx>
  • Date: Sun, 9 Jul 2006 03:46:03 +0200
  • Delivery-date: Sat, 08 Jul 2006 18:46:43 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=OWIc1KCOvfl54YCZ3u0tp9Cz9W+noMVYHDe8+iSPKik2RKU+6Qs/qrMOlh/Q/7snEk+zwL5zdRZcACdym4XNqEGKt5h52MzhwYSCpRv+/ThwSFvEPJp/hcm997A8A+2vCE9/yNnOGMkX0wnz7qk7osQQHsAoCdfUkX75qNIC0HU=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Hi,
Try to compile your kernel with sata or scsi support but no as a module.
Then try:
# depmod 2.6.16.13-xen
# mkinitrd -v --omit-scsi-modules /boot/initrd.img-2.6.16.13.xen 2.6.16.13-xen
and add to grub: "module          /boot/initrd.img-2.6.16.13.xen"
It worked for me.
 
On 7/9/06, Yasir Assam <list1@xxxxxxxxxxxxxxx> wrote:
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

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.