Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229847 - sys-kernel/genkernel-3.4.10-r1: cannot boot using real_root=uuid, blkid not found
Summary: sys-kernel/genkernel-3.4.10-r1: cannot boot using real_root=uuid, blkid not f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-27 21:34 UTC by Plero H
Modified: 2009-12-26 22:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Plero H 2008-06-27 21:34:21 UTC
I use this kernel option to mount the root partition
real_root=UUID=uid_of_root_partition but mounting fails.

I tested it  only with sys-kernel/gentoo-sources-2.6.24-r8 but judging from the error maybe it's only genkernel's fault.

previously, I see in terminal:

/init: line 421: blkid: not found.

Maybe blkid is not included in initrd?

Reproducible: Always

Steps to Reproduce:
1.genkernel --gconfig all
2.use kernel option real_root=UUID=uid_of_root_partition
3.boot system

Actual Results:  
My system fails to boot because cannot find the root partition

Expected Results:  
My system should boot.

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r8 x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz
Timestamp of tree: Fri, 27 Jun 2008 19:15:02 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
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.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-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/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.uoi.gr/mirror/OS/gentoo/ http://ftp.uoi.gr/mirror/OS/gentoo/ "
LANG="en_US.UTF-8"
LINGUAS="en el en_US"
MAKEOPTS="-j3"
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/portage/local/layman/sajinet /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/preload"
SYNC="rsync://rsync.gr.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 arts bash-completion berkdb cairo cddb cdr cli cracklib crypt css cups dbus dri dts dv dvd dvdr dvdread eds emboss encode esd evo exif fam ffmpeg firefox flac fortran gdbm gif gimp gnome gphoto2 gpm gstreamer gtk hal iconv imagemagick ipv6 isdnlog jpeg kde kerberos ladspa lcms ldap libnotify libsamplerate lm_sensors mad matroska midi mikmod mmx mono mp3 mpeg mudflap musepack ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime raw rdesktop readline reflection samba scanner sdl session smp sox spell spl sse sse2 ssl svg symlink tcpd threads tiff truetype unicode usb vcd vorbis wxwindows x264 xattr xcomposite xine xml xorg xv xvid yahoo zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en el en_US" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2008-06-28 07:52:54 UTC
Indeed.

Can you edit line 344 of /usr/share/genkernel/generic/linuxrc and prefix the blkid call with /bin?

- ROOT_DEV=`blkid -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/null`
+ ROOT_DEV=`/bin/blkid -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/null`

Then, rebuild your initramfs and let me know if that resolves it.  Otherwise, the problem is elsewhere.

Are you using --disklabel when building your kernel/initramfs?  It's required to have blkid installed into the initramfs.
Comment 2 Plero H 2008-06-28 08:25:56 UTC
I edited  /usr/share/genkernel/generic/linuxrc as you said and then I recreated initrd with "genkernel --oldconfig --disklabel initrd" and my system boots normally. I think it's because I included the --disklabel switch.

Should I recreate initrd with the unmodified linuxrc? (but with --disklabel)

 Maybe --disklabel should be the default behaviour of genkernel and use something like --no-disklabel if it is not desired?
Comment 3 Plero H 2008-06-28 08:34:34 UTC
I recreated initrd  with "genkernel --oldconfig --disklabel initrd" and the unmodified linuxrc and my system boots normally. Probably I should have included --disklabel from the start.

Anyway I think genkernel should use --disklabel as a default switch.
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2008-07-29 12:14:45 UTC
It's not a behavior that most people need, and it would just bloat the initramfs further. However, you can add DISKLABEL="yes" to your genkernel.conf to get this behavior by default locally.
Comment 5 Jean-Claude Gervais 2008-09-12 17:00:29 UTC
(In reply to comment #4)
> It's not a behavior that most people need, and it would just bloat the
> initramfs further. However, you can add DISKLABEL="yes" to your genkernel.conf
> to get this behavior by default locally.
> 

I was wondering, is there a way to obtain the root=LABEL=xxxx functionality in a custom (non-genkernel) kernel?
Comment 6 Chris Gianelloni 2008-09-15 20:49:56 UTC
Umm... the same way it's done in genkernel... you create an initrd/initramfs with the correct files in it...

As for how to do that, a simple use of Google should give you what you need.
Comment 7 Federico Ferri (RETIRED) gentoo-dev 2009-01-15 22:03:20 UTC
do you mind if I reopen this?...

I had the same issue today, and since I couldn't find any DISKLABEL setting in /etc/genkernel.conf (neither as a comment), I thought: well, it has to be on by default (meh wrong)

something like:

+++ /etc/genkernel.conf
+ # Enable disklabel support (copies blkid to initrd)
+ # DISKLABEL="yes"

would do the trick ;)
Comment 8 Andrew Gaffney (RETIRED) gentoo-dev 2009-01-16 03:03:37 UTC
Committed
Comment 9 Tsang Ka Wing 2009-02-21 21:48:27 UTC
It should be noted that blkid depends on some .so
should we specially build a static linked blkid for the initramfs automatically ?

# ldd `which blkid`
        linux-vdso.so.1 =>  (0x00007fff4b7ff000)
        libblkid.so.1 => /lib/libblkid.so.1 (0x00002b535f5f2000)
        libuuid.so.1 => /lib/libuuid.so.1 (0x00002b535f7fc000)
        libc.so.6 => /lib/libc.so.6 (0x00002b535fa01000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b535f3d6000)

I also think that UUID support should be enabled by default because include this or "these" file(s) would not enlarge the initramfs so much.
Comment 10 Andrew Gaffney (RETIRED) gentoo-dev 2009-12-26 22:58:05 UTC
This was released a while ago.