Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Using "root=LABEL=xxxx" in grub.conf
Date: Mon, 09 Feb 2009 07:26:47
Message-Id: CE4CEC58-6813-4CA4-9C26-57753335E788@stellar.eclipse.co.uk
1 Hi there,
2
3 Is anyone using "root=LABEL=xxxx" grub.conf, please? Anyone also using
4 ext4 for their root?
5
6 I can find numerous references to this syntax going back to 2005 or
7 so, and some major distros seem to use it as the default way of
8 describing "root=" to the kernel.
9
10 http://www.linuxforums.org/forum/redhat-fedora-linux-help/23010-root-label-grub-conf.html
11 http://linux.derkeiler.com/Mailing-Lists/RedHat/2005-01/0026.html
12
13 But it doesn't work for me. :(
14
15 Here's a working configuration:
16
17 stroller@hex ~ $ cat /etc/fstab
18 # /etc/fstab: static file system information.
19 #
20 # <fs> <mountpoint> <type> <opts> <dump/pass>
21
22 # NOTE: If your BOOT partition is ReiserFS, add the notail option to
23 opts.
24 LABEL=boot /boot ext2 noauto,noatime 1 2
25 LABEL=root / ext4 noatime 0 1
26 LABEL=swap none swap sw 0 0
27 /dev/cdrom /mnt/cdrom auto noauto,ro 0 0
28
29 # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
30 # POSIX shared memory (shm_open, shm_unlink).
31 # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
32 # use almost no memory if not populated with files)
33 shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
34
35 stroller@hex ~ $ sudo mount -v -L boot
36 /dev/sda1 on /boot type ext2 (rw,noatime)
37 stroller@hex ~ $ cat /boot/grub/grub.conf
38 default 0
39 timeout 30
40 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
41
42 title Gentoo Linux 2.6.28-gentoo-r1
43 root (hd0,0)
44 kernel /boot/bzImage-2.6.28-gentoo-r1 root=/dev/sda6
45
46 stroller@hex ~ $
47
48
49 If I simply change the kernel line of grub.conf to:
50
51 kernel /boot/bzImage-2.6.28-gentoo-r1 root=LABEL=root
52
53 Then I get a kernel panic upon boot:
54 VFS: Cannot open root device "LABEL=root" or unknown-block(0,0)
55 Please append a correct "root=" boot option; here are the
56 available partitions:
57 ...
58 Kernel Panic - not syncing: VFS Unable to mount root fs on unknown-
59 block(0,0)
60
61 Full screenshot of kernel panic:
62 http://stuff.stroller.uk.eu.org/KernelPanic.png
63
64
65 Googling this error brings up quite a number of hits, and I reckon I
66 must have spent a couple of hours now trying the most popular
67 resolutions. This is quite a minor error - if I wasn't such an
68 obsessive-compulsive I could easily ignore it, but I am, and it's
69 frustrating the heck out of me.
70
71 One forum thread / bug report suggests the ata_piix module is to
72 blame, but compiling that statically into my kernel doesn't help.
73 http://www.linuxquestions.org/questions/fedora-35/fc2-vfs-cannot-open-root-device-label-or-unknown-block00-269230/
74 https://bugzilla.redhat.com/show_bug.cgi?id=126953
75
76 Another post (can't find the reference now) suggests disabling
77 "Initial RAM filesystem and RAM disk (initramfs/initrd) support" but
78 that doesn't make any difference, either.
79
80 Finally, this thread <http://kerneltrap.org/node/2318> says "check
81 your .config and look for CONFIG_BLK_DEV_IDE and
82 CONFIG_BLK_DEV_IDEDISK entries." This is quite an old post, however,
83 and these options aren't available in 2.6.28 (from my distro); I
84 enabled CONFIG_BLK_DEV_IDEPCI instead, but it has no positive effect.
85
86 I had better mention that I am using a 3ware 9500 RAID controller on
87 the PCI bus. I suspect the problem is specific to this (and my
88 combination of modules / compiled-in kernel drivers), but I thought I
89 would throw the question out there & see if any other ext4 users had
90 also seen the same thing.
91
92 Thanks in advance for any suggestions,
93
94 Stroller.

Replies

Subject Author
Re: [gentoo-user] Using "root=LABEL=xxxx" in grub.conf Dale <rdalek1967@×××××.com>
Re: [gentoo-user] Using "root=LABEL=xxxx" in grub.conf Neil Bothwick <neil@××××××××××.uk>