Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[Solved] Kernel not recognizing root device by UUID or LABEL

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
.arris
n00b
n00b
Posts: 20
Joined: Sat Apr 23, 2005 6:48 am

[Solved] Kernel not recognizing root device by UUID or LABEL

  • Quote

Post by .arris » Sat Jul 19, 2008 7:38 pm

So I recently got around to installing Gentoo on my Asus EEE-pc, and after some tweaking I've been able to solve most of the issues that came up except this one nasty little problem that starts bugging the hell out of me lately: I often boot the EEE with external storage connected, like a thumbdrive or SD card. This tends to mess up the device name that the kernel assigns to my root device (internal SSD drive), so that specifying the root by device name (eg. root=/dev/sda1) on the kernel comandline is bound to fail in this situation. So I try to pass the root device by label or UUID, but the kernel just does not accept any of these parameters and fails with an error like this:

Code: Select all

VFS: Cannot open root device "UUID=6e87ef57-eb68-4cb2-b12a-9217e70a5718" or unknown-block(0,0)
Please append a correct "root=" boot option: here are the available partitions:
0000     3907512 sda driver: sd
  0001     3906976 sda1
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
(for labels I get "LABEL=SSD" instead of "UUID=...")

To me this looks like I'm missing a kernel option or something that allows the kernel to recognize my device by label or UUID. However, if I give the root option as device name and happen to guess the correct device, then kernel boots up just fine, so that I think the kernel should have all the necessary drivers. Here's some other things that I've tried without success:
- various kernels: gentoo-sources, tuxonice, vanilla, 2.6.24, 2.6.26...
- root="UUID=..." instead of root=UUID=...
- rootdelay, rootwait, real_root options
- booting from various external devices specified by UUID, no luck either

I'm really lost with this problem right now, but I don't want to mess with initrd as it seems completely unnecessary for running a custom kernel :(
Note that this is not the infamous blkid bug, as I don't even get init to start in the first place...

Here's some info about my setup:

Kernel config

Code: Select all

eee ~ # uname -a
Linux eee 2.6.24-tuxonice-r9-eeepc #4 PREEMPT Sat Jul 19 12:20:22 CDT 2008 i686 Intel(R) Celeron(R) M processor 900MHz GenuineIntel GNU/Linux

Code: Select all

eee ~ # fdisk -l

Disk /dev/sda: 4001 MB, 4001292288 bytes
128 heads, 63 sectors/track, 969 cylinders
Units = cylinders of 8064 * 512 = 4128768 bytes
Disk identifier: 0x3bf43bf3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         969     3906976+  83  Linux

Code: Select all

eee ~ # mount
/dev/sda1 on / type ext2 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,noatime)
tmpfs on /var/log type tmpfs (rw,noatime)
tmpfs on /var/tmp type tmpfs (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

Code: Select all

eee ~ # vol_id /dev/sda1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext2
ID_FS_VERSION=1.0
ID_FS_UUID=6e87ef57-eb68-4cb2-b12a-9217e70a5718
ID_FS_UUID_ENC=6e87ef57-eb68-4cb2-b12a-9217e70a5718
ID_FS_LABEL=SSD
ID_FS_LABEL_ENC=SSD
ID_FS_LABEL_SAFE=SSD

Code: Select all

eee ~ # ls -l /dev/disk/*
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root  9 Jul 19 13:17 ata-SILICONMOTION_SM223AC_11572740696882567889 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 19 13:17 ata-SILICONMOTION_SM223AC_11572740696882567889-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Jul 19 13:17 scsi-SATA_SILICONMOTION_S11572740696882567889 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 19 13:17 scsi-SATA_SILICONMOTION_S11572740696882567889-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Jul 19 13:17 usb-USB2.0_CardReader_SD0_146030377350-0:0 -> ../../sdb

/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 10 Jul 19 13:17 SSD -> ../../sda1

/dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root  9 Jul 19 13:17 pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root  9 Jul 19 13:17 pci-0000:00:1f.2-scsi-1:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 19 13:17 pci-0000:00:1f.2-scsi-1:0:0:0-part1 -> ../../sda1

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 Jul 19 13:17 6e87ef57-eb68-4cb2-b12a-9217e70a5718 -> ../../sda1

Code: Select all

eee ~ # cat /boot/grub/grub.conf
#
# Sample boot menu configuration file
#

# Boot automatically after 30 secs.
timeout 3

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

hiddenmenu

# Splash image to show behind grub.
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

# For booting GNU/Linux
title  Gentoo Linux (by UUID)
root (hd0,0)
kernel /boot/kernel-2.6.24-tuxonice-r9 root=UUID=6e87ef57-eb68-4cb2-b12a-9217e70a5718

# For booting GNU/Linux
title  Gentoo Linux (by LABEL)
root (hd0,0)
kernel /boot/kernel-2.6.24-tuxonice-r9 root=LABEL=SSD

# For booting GNU/Linux
title  Gentoo Linux (by dev)
root (hd0,0)
kernel /boot/kernel-2.6.24-tuxonice-r9 root=/dev/sda1

Code: Select all

eee ~ # lspci
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 04)
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 04)
00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 (rev 04)
00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 04)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 04)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 04)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 04)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 04)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d4)
00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 04)
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 04)
01:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g Wireless PCI Express Adapter (rev 01)
03:00.0 Ethernet controller: Attansic Technology Corp. L2 100 Mbit Ethernet Adapter (rev a0)

Code: Select all

eee ~ # emerge --info
Portage 2.1.4.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-tuxonice-r9-eeepc i686)
=================================================================
System uname: 2.6.24-tuxonice-r9-eeepc i686 Intel(R) Celeron(R) M processor 900MHz
Timestamp of tree: Sat, 19 Jul 2008 18:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl acpi alsa berkdb blas bluetooth bzip2 cisco cli cracklib crypt dbus djvu dri dvd fortran gdbm gif gimp glut gnutls gpm graphviz gtk gtk2 hal iconv imagemagick ipv6 isdnlog jpeg lame lapack laptop latex loop-aes madwifi midi mmx mmx2 mozbranding mozilla mp3 mplayer mudflap ncurses net network networkmanager nls nptl nptlonly nsplugin opengl openmp pam pcre pdflib perl plotutils png pnp posix pppd python qt3 qt4 quicktime readline real realmedia reflection session skype spl sse sse2 ssl subversion tcpd threads truetype unicode usb v4l v4l2 vorbis wifi win32codecs wma x86 xine xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel i810 v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Last edited by .arris on Sun Jul 20, 2008 3:46 am, edited 1 time in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56101
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Jul 19, 2008 7:43 pm

.arris,

Code: Select all

Unable to mount root fs on unknown-block(0,0) 
tells that your kernel cannot talk to your hard drive chip set.
You need some of this
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
.arris
n00b
n00b
Posts: 20
Joined: Sat Apr 23, 2005 6:48 am

  • Quote

Post by .arris » Sat Jul 19, 2008 9:53 pm

NeddySeagoon wrote: You need some of this
Thats the guide I followed when I setup my kernel (thanks btw :-)), if you look at my kernel config it has exactly the options that you suggest in the guide (well except SCSI CDROM support, which I don't really need). Also if I boot the kernel like this

Code: Select all

kernel /boot/kernel-2.6.24-tuxonice-r9 root=/dev/sda1
it will work fine whenever the kernel maps my SSD drive to /dev/sda. It's only when I use root=UUID=... or root=LABEL=SSD instead of root=/dev/sda1 that the kernel fails with the above error.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56101
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Jul 19, 2008 9:58 pm

.arris,

UUID should just work.
Not all filesystems support LABEL, ext2 and ext3 are OK
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
yabbadabbadont
Advocate
Advocate
User avatar
Posts: 4791
Joined: Fri Mar 14, 2003 12:02 am
Location: 2 exits past crazy

  • Quote

Post by yabbadabbadont » Sat Jul 19, 2008 10:34 pm

You have to have an initramfs (initrd) image, that was built by genkernel, loaded in order to get this support. The kernel itself does not, (and won't according to the kernel devs), support this syntax.

Unfortunately, the version of busybox used by the current stable genkernel, seems to be missing one of the commands used to do this. I ended up switching back to using the "/dev/hdaX" syntax because of it.

Edit: Looks like the issue I ran into was because of a change in the default genkernel behavior. http://bugs.gentoo.org/show_bug.cgi?id=229847
So the OP should be able to get it working by building an initrd using genkernel. NOTE: you don't have to build your kernel with genkernel, you just need the initrd. (and your kernel needs to be able to use an initrd)
Top
.arris
n00b
n00b
Posts: 20
Joined: Sat Apr 23, 2005 6:48 am

  • Quote

Post by .arris » Sun Jul 20, 2008 3:46 am

yabbadabbadont wrote:You have to have an initramfs (initrd) image, that was built by genkernel, loaded in order to get this support. The kernel itself does not, (and won't according to the kernel devs), support this syntax.
Ahh thanks, that explains a lot :roll:
Strange though since none of the Howto's on using UUIDs explicitly mention that initrd is necessary for this to work. I guess Gentoo is just one of the only distributions left that still allows you to just boot a kernel without any bells and whistles, for all the others initrd is just so standard now that they don't even mention this when talking about UUIDs...

So I ended up installing genkernel and after messing with it for a while, I got a working kernel with initramfs support that will accept UUIDs for the root device. I'm still not quite satisfied though since loading the initrd image added about 5-10s to my startup-time, and I guess the only way to improve on that is if I my build own initrd file (which is messy and the reason why I wanted to avoid initrd in the first place). I'll still mark this thread as solved, thanks for your help guys!
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic