Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254516 - sys-kernel/genkernel - the function of blkid which is packaged in the initrd file for boot time is too limited
Summary: sys-kernel/genkernel - the function of blkid which is packaged in the initrd ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-11 08:24 UTC by davidshen
Modified: 2009-02-02 10:06 UTC (History)
1 user (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 davidshen 2009-01-11 08:24:31 UTC
the blkid packaged in /boot/initramfs... could not recognize luk partitions. if I unpack the initramfs and use its blkid against my hard drive, my luk partition is reported as 'swap'. but if i use the /sbin/blkid before open my luk partition, my luk partition is as 'crypt_LUKS', along with its UUID. and after i opened my luk partition, my encrypted partition will be displayed additionally.

Reproducible: Always

Steps to Reproduce:
1. set up the root as LUK partition
2. use genkernel with --disklabel to generate the initramfs file, and gain the ability to use LABEL/UUID to specify the file system
3. use crypt_root=UUID=xxxx to specify your root

Actual Results:  
the boot up process suspended, claiming it cannot find the specified file system

Expected Results:  
system should prompt the user to input password in unlock the file system specified by crypt_root, and boot normally.

i have compared the blkid application packaged in the initramfs and the one in /sbin. definitely, they're two different application, with the same name and same version number.


Portage 2.2_rc18 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r7-i686-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-glibc2.0
Timestamp of tree: Wed, 07 Jan 2009 01:45:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
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.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ "
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/pkg"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apm atm bash-completion berkdb bluetooth branding bzip2 cairo cdr cgi cjk cli cracklib crypt cscope ctype curl curlwrappers cxx dbus directfb dri dvd dvdr dvdread eds emboss encode esd evo fam fastcgi fbcon firefox fortran ftp gdbm gif gmp gpm gstreamer gtk hal iconv imagemagick isdnlog jpeg jpeg2k libcaca libedit libnotify libwww mad midi mikmod mmap mmx mp3 mpeg mudflap ncurses nis nls nptl nptlonly ogg opengl openmp pam pch pcntl pcre pdf perl png ppds pppd profile python qt3support qt4 quicktime readline reflection samba sasl sdl session sharedmem slang snmp soap sockets socks5 source spell spl sse sse2 ssl startup-notification suid svg symlink sysfs syslog tcpd threads tiff tk truetype unicode usb vim-syntax vorbis win32codecs x86 xcb xml xmlrpc xorg xsl xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mmap_emul 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Patrick Lauer gentoo-dev 2009-01-13 20:08:04 UTC
From which package does that come from?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-14 14:52:10 UTC
Maybe it's to do with the version of e2fsprogs that sys-kernel/genkernel packs? The currently stable genkernel version packs e2fsprogs-1.39...
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2009-01-14 15:44:44 UTC
Please try with genkernel-3.4.10.903. The version of e2fsprogs was bumped to 1.40.1 (or something like that).
Comment 4 davidshen 2009-01-15 05:03:23 UTC
(In reply to comment #3)
> Please try with genkernel-3.4.10.903. The version of e2fsprogs was bumped to
> 1.40.1 (or something like that).
> 

OK, I will try and update later. Thanks.
Comment 5 davidshen 2009-01-16 06:31:57 UTC
(In reply to comment #3)
> Please try with genkernel-3.4.10.903. The version of e2fsprogs was bumped to
> 1.40.1 (or something like that).
> 

I updated to genkernel-3.4.10.903, and rebuild my initramfs. Then, my system failed to boot up...

must I upgrade to e2fsprogs-1.41.3-r1 and e2fsprogs-libs-1.41.3-r1? currently, I am using e2fsprogs-1.41.3 and e2fsprogs-libs-1.41.3
Comment 6 davidshen 2009-01-16 12:31:10 UTC
(In reply to comment #3)
> Please try with genkernel-3.4.10.903. The version of e2fsprogs was bumped to
> 1.40.1 (or something like that).
> 

I upgrade my genkernel and busybox to the latest version, still fail to boot up.

what I see is that my system starts up, and shows up the grub menu; after I pressed enter, I can see my splash background, but then it stopped and dead.

clearly, since I can see the splash background, the initramfs has unpacked successfully.
Comment 7 davidshen 2009-02-02 10:06:57 UTC
After some investigation, I found a workaround to this issue. Even though the LUKS partition still cannot be opened, but I identified the problem is not related to this bug. So I closed this one as *FIXED*.

The cause of this issue is due to the genkernel is using an old e2fsprogs version which blkid is not capable to retrieve the UUID of a LUKS partition.

At the time I drop this note, the genkernel-3.4.10.903 caused my system to halt. So updating to genkernel-3.4.10.903 will not solve my problem.

But there's an other way to workaround this issue.

Steps:
    1) update e2fsprogs to above 1.40;
    2) edit E2FSPROGS_VER in /etc/genkernel.conf to the version you emerged;
    3) use genkernel to rebuild the initramfs.

The above steps solves the problem that the blkid in the initramfs cannot retrieve the UUID of a LUKS partition. But the LUKS partition still cannot be opened. And the problem is related to the init script. I will file another bug to address this issue.