Hello all! I created a genkernel patch for adding LABEL=/ and UUID functionality into initrd (it check for new 2 kernel parameter label= and uuid=) it is simple for use (patch attached, see coments in patch how use it) my emerge info here: Portage 2.0.51.18 (default-linux/x86/2005.0, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r7 i686) ================================================================= System uname: 2.6.10-gentoo-r7 i686 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.9 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Feb 24 2005, 12:03:52)] distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.5, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r4 sys-devel/libtool: 1.5.10-r5 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden" DISTDIR="/media/MEDIA1/gentoo/distfiles" FEATURES="autoaddcvs autoconfig buildpkg distlocks prelink sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LANG="ru_RU.CP1251" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags" MAKEOPTS="-j1" PKGDIR="/media/MEDIA1/gentoo/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/media/MEDIA1/gentoo/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 4kstacks X a52 aac aalib acl acpi acpi4linux activefilter alsa apache2 apm arts artswrappersuid audiofile avi bash-completion bitmap-fonts bluetooth caps cddb cdparanoia cdr crypt cups curl dga dv dvd dvdr dvdread emboss encode exif fam ffmpeg flac foomaticdb gd gif gnutls gphoto2 gpm gtk2 guile hal howl iconv ieee1394 imagemagick imap imlib innodb jpeg jpeg2k kde kdeenablefinal ldap libg++ libwww lirc lm_sensors lmtp logitech-mouse lufsusermount lzo mad maildir mailwrapper mbox mikmodmjpeg mmx mozilla mp3 mpeg mppe-mppc nas ncurses nntp no-old-linux nptl nptlonly oav odbc ogg oggvorbis openal opengl pam pcre pda pdflib pic png pwdb qt quicktime quotas readline real rtc samba sasl silc skey slang slp smartcard spell ssl symlink tcpd tetex threads tiff transcode truetype truetype-fonts usb utf8 v4l v4l2 vcdimager wifi wmf xine xml2 xv yv12 zlib linguas_ru" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL
Created attachment 52433 [details, diff] patch for LABEL && UUID support
Seems to be more of an enhancement since you haven't specified this is required for basic functionality of genkernel, nor that it breaks anything major. Assigned to package maintainer, downgraded to enhancement.
... And why is this needed?
I have used in my fstab LABEL=/ also I use linux on 3 different hdd and while swithing hdd it is not comfortable to rewrite grub settings every order change I hope you will add this fix to genkernel, it is highly actual for many people afaik
Well, there are some issues with the patch that you'd need to fix: * Need a --disklabel for genkernel so the findfs utility is only compiled in when that's enabled. * Need either a static checker if we use a manual external e2fsprogs compilation or a compile_e2fsprogs() section in genkernel to generate your static binary.
ok I will improve code and add the support for --disklabel asap - new patch in the progress
how about considering the blkid tool instead of the findfs tool? blkid is a lot smaller (as it links against much less), and offers the same functionality in a more flexible way. While looking at this, I found that with USE="static" e2fsprogs-1.36-r2 didn't actually build a proper static version, so I fixed it up to properly do so. USE="static -diet -nls" blkid = 29kb findfs = 97kb (actually a symlink to tune2fs) USE="static diet -nls" blkid = 36kb findfs = 113kb
Created attachment 60572 [details, diff] genkernel-3.1.6.label.patch This updated patch to uses blkid, has a --disklabel command line parameter, and has a compile_e2fsprogs() function. This patch is quite useful for me since I boot from a usb disk and the block device may vary depending on what other usb disks (dvdrw, etc...) are plugged in.
vapier notes that findfs will be available in busybox very soon. the patch to linuxrc isn't quite right. instead of supporting label= and uuid= arguments, it should instead be: real_root=LABEL=foo I'll try to put together an updated patch tonight.
Created attachment 62937 [details, diff] genkernel-3.2.0_pre18.label.patch Added support for findfs, real_root=LABEL=foo syntax, and initramfs. If findfs is not found then it falls back to blkid.
Fixed in 3.2.2; thanks for the patch!