Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390635 - <sys-kernel/genkernel-3.4.33(.1?): Bundled blkid doesn't detect nilfs2 rootfs when using initramfs (--disklabel)
Summary: <sys-kernel/genkernel-3.4.33(.1?): Bundled blkid doesn't detect nilfs2 rootfs...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2011-11-15 17:16 UTC by Espen Vangsnes
Modified: 2012-06-04 20:04 UTC (History)
0 users

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 Espen Vangsnes 2011-11-15 17:16:43 UTC
The bundled blkid utility from e2fsprogs-1.41.14 (latest) doesn't support detection of nilfs2 and therefore no UUID or disklabel.

busybox-1.19.0's blkid utility doesn't support nilfs2 either.

The blkid utility from util-linux-2.19.1 detects nilfs2 and correctly outputs both UUID and disklabel.

Would it be difficult to switch bundled blkid to the one from util-linux, so genkernel --disklabel would work on nilfs2 root?

Is there a temporary workaround? Can I statically compile util-linux and copy blkid into initramfs? --initramfs-overlay= ?

Reproducible: Always

Steps to Reproduce:
1. mkfs.nilfs2 /
2. run genkernel with --disklabel
3. boot with real_root=LABEL=some_label
Actual Results:  
Genkernel's initramfs init script stop and ask for a root device.

Expected Results:  
Resolve root device from real_root=LABEL=, mount, and handover to real init.
Comment 1 Sebastian Pipping gentoo-dev 2011-11-15 18:30:47 UTC
(In reply to comment #0)
> Would it be difficult to switch bundled blkid to the one from util-linux, so
> genkernel --disklabel would work on nilfs2 root?

It would require some effort.  It's hard to measure in hours.


> Is there a temporary workaround? Can I statically compile util-linux and copy
> blkid into initramfs? --initramfs-overlay= ?

That could work, yes.
Comment 2 Espen Vangsnes 2012-05-16 08:05:38 UTC
Just thought I'd post the workaround if anyone else should need it:

1. Unpack the util-linux(-2.20.1 confirmed) package which probably lies in your /usr/portage/distfiles to somewhere.

2. Go to the directory unpacked.

3. Enter these commands:

# LDFLAGS="-s" ./configure --enable-static-programs=blkid
# make
# mkdir -p /root/initramfs-overlay/sbin/
# cp misc-utils/blkid.static /root/initramfs-overlay/sbin/blkid
# genkernel --initramfs-overlay=/root/initramfs-overlay --install all

NOTE! Do *NOT* enable the --disklabel parameter (or DISKLABEL= in genkernel.conf).

PS! This new static blkid enlarges the initrd by ~200kb compared to the genkernel-bundled.


Hope this can be of help to someone :)
Comment 3 Sebastian Pipping gentoo-dev 2012-05-17 17:58:31 UTC
I have just released genkernel 3.4.33 which uses blkid from /sbin/blkid, i.e. system version from util-linux.

http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=5153192ca2109768336dfa5f891ec6f73e29001a
Comment 4 Espen Vangsnes 2012-05-18 16:03:40 UTC
(In reply to comment #3)
> I have just released genkernel 3.4.33 which uses blkid from /sbin/blkid,
> i.e. system version from util-linux.
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;
> h=5153192ca2109768336dfa5f891ec6f73e29001a

Thank you for taking your time to try to solve this.

Would that work, though? My /sbin/blkid from the sys-apps/util-linux package is compiled dynamically by default, and depends on libs not found in genkernel's initrd.
Comment 5 Sebastian Pipping gentoo-dev 2012-05-18 21:36:41 UTC
(In reply to comment #4)
> Would that work, though? My /sbin/blkid from the sys-apps/util-linux package
> is compiled dynamically by default, and depends on libs not found in
> genkernel's initrd.

We have a new function inside that recursively copies all library dependencies.
Comment 6 Sebastian Pipping gentoo-dev 2012-06-04 20:04:47 UTC
+*genkernel-3.4.34 (04 Jun 2012)
+
+  04 Jun 2012; Sebastian Pipping <sping@gentoo.org> +genkernel-3.4.34.ebuild:
+  Bump to 3.4.34
+