Flavio
2012-Mar-27 09:09 UTC
XEN 4.1.2 + gentoo-sources-3.3.0: cannot open root device sddX
Hello, I''ve just upgraded the Linux Kernel from version "gentoo-sources-3.2.6" to "gentoo-sources-3.3.0" and I''ve encountered a strange problem with it. Actually, if I try to boot the new kernel I am not able to mount the root device. This only happens with kernel 3.3.0 and if I boot such kernel without the hypervisor (i.e. deleting the kernel /xen.gz line in grub.conf) the kernel boots without any problem. So I think it''s due to the hypervisor compatibility with the new kernel. I was able to boot such kernel only one time. I don''t really know how. This is the kernel configuration file I am using both for 3.3.0 and 3.2.6: http://pastebin.com/M9BdUTh0 I''ve also tried to recompile the kernel and the two packages xen and xen-tools but this didn''t solve the problem. Booting with the hypervisor generates a kernel panic due to the error I reported in the subject, and it reboots automatically. It seems like if at each boot it detects a different disk/partition scheme/order, so it can''t find the /dev/sda4 root device I''ve specified in the module grub.conf file. title=Gentoo Linux 3.3.0 XEN root (hd0,0) kernel /xen.gz dom0_mem=1024M loglvl=all guest_loglvl=all iommu=1 module /vmlinuz-3.3.0-gentoo root=/dev/sdd4 rootdelay=10 xen-pciback.hide=(00:1b.0) Note also that my XEN installation is on an external USB disk, but it perfectly works with the 3.2.6 kernel and the "root=" option is definitely correct. Regards, -- Flavio
Flavio
2012-Mar-27 11:55 UTC
Re: XEN 4.1.2 + gentoo-sources-3.3.0: cannot open root device sddX
On 27 March 2012 12:26, Benjamin Schweikert <b.schweikert@googlemail.com> wrote:> Hi, > could you please replace the device (e.g. /dev/sdd4) by the UUID in > the grub.cfg and fstab? >Hi Ben, thank you for replying. I''ve replaced this line in grub.conf module /vmlinuz-3.3.0-gentoo root=/dev/sdd4 rootdelay=10 xen-pciback.hide=(00:1b.0) with this one: module /vmlinuz-3.3.0-gentoo root=UUID=a549c8f6-2f5f-4cf0-a3d0-bcac33a09594 rootdelay=10 xen-pciback.hide=(00:1b.0) and this line in /etc/fstab /dev/sdd4 / ext4 noatime 0 1 with this: UUID=a549c8f6-2f5f-4cf0-a3d0-bcac33a09594 / ext4 noatime 0 1 But, even if the modification in /etc/fstab works (without the grub.conf modification), the system doesn''t want to boot when I also modify the grub.conf, and this happens on both kernels: 3.2.6 (the working one) and 3.3.0. Is some kernel module missing for the use of UUID in grub.conf? I use grub 0.97-r10. ... By the way: this is what happens when I boot the system both after and before trying to use UUID. Note that I have a laptop with 2 SSDs inside and I am booting from an external USB device. boot1: http://img696.imageshack.us/img696/4531/kernelpanic1.png sda and sdb are recognized correctly. this time the USB drive is going to be detected as sdc (so if I would have passed the root=/dev/sdc4, the system could have booted, but I cannot know how the system rendomly detects the external usb disk each time) reboot: http://img542.imageshack.us/img542/198/kernelpanic2.png This time I don''t know what happened. Is only sda detected? reboot: http://img256.imageshack.us/img256/8818/kernelpanic3.png again, as for boot1. No changes have been done between reboots. I see that with 3.2.6 the external disk is detected as sdd (and this is another issue I cannot explain to myself, since the first sdX available is sdc not sdd), while with 3.3.0, sometime it attempts to detect as sdc... I am really confused. -- Flavio
Flavio
2012-Mar-28 14:22 UTC
Re: XEN 4.1.2 + gentoo-sources-3.3.0: cannot open root device sddX
On 27 March 2012 13:55, Flavio <fbcyborg@gmail.com> wrote:> > I see that with 3.2.6 the external disk is detected as sdd (and this > is another issue I cannot > explain to myself, since the first sdX available is sdc not sdd), > while with 3.3.0, sometime > it attempts to detect as sdc... > > I am really confused.During the last 2.3 reboots I see the new kernel sees the disk as /dev/sdc ... and it seems to be OK now. Let''s see how it goes. -- Flavio
Ian Campbell
2012-Mar-29 08:44 UTC
Re: XEN 4.1.2 + gentoo-sources-3.3.0: cannot open root device sddX
On Wed, 2012-03-28 at 15:22 +0100, Flavio wrote:> On 27 March 2012 13:55, Flavio <fbcyborg@gmail.com> wrote: > > > > I see that with 3.2.6 the external disk is detected as sdd (and this > > is another issue I cannot > > explain to myself, since the first sdX available is sdc not sdd), > > while with 3.3.0, sometime > > it attempts to detect as sdc... > > > > I am really confused. > During the last 2.3 reboots I see the new kernel sees the disk as > /dev/sdc ... and it seems to be OK now. Let''s see how it goes.It has been a property of Linux for quite a while now (IIRC since the early 2.6.x days) that disks are not named in any stable or deterministic order. So it is entirely possible that your disk will get a different name each time you reboot, even without changing your hardware (this is particularly true of USB attached disks but I also see it with the SATA controllers in one of my systems). This is not a problem which is specific to Xen, although Xen may impact the timings of device probing etc and so change the random ordering to a different random ordering. If this effects you then the only way around it is to boot based on UUID or LABEL, which requires an initramfs with udev etc. Most distros provide tools for creating these. Ian.
Flavio
2012-Mar-29 08:47 UTC
Re: XEN 4.1.2 + gentoo-sources-3.3.0: cannot open root device sddX
On 29 March 2012 10:44, Ian Campbell <Ian.Campbell@citrix.com> wrote:> > It has been a property of Linux for quite a while now (IIRC since the > early 2.6.x days) that disks are not named in any stable or > deterministic order. So it is entirely possible that your disk will get > a different name each time you reboot, even without changing your > hardware (this is particularly true of USB attached disks but I also see > it with the SATA controllers in one of my systems). > > This is not a problem which is specific to Xen, although Xen may impact > the timings of device probing etc and so change the random ordering to a > different random ordering. > > If this effects you then the only way around it is to boot based on UUID > or LABEL, which requires an initramfs with udev etc. Most distros > provide tools for creating these.Thanks Ian, I did understand now. Perfect! Fortunately it seems that the disk is recognized as sdc most of the times now. Regards, -- Flavio