Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83771 - sys-kernel/genkernel-3.1.1 must support mount root filesystem via LABEL=/ and UUID= (fix patch included!)
Summary: sys-kernel/genkernel-3.1.1 must support mount root filesystem via LABEL=/ and...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard: InCVS
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-01 21:47 UTC by Alexey Maximov
Modified: 2005-07-12 10:42 UTC (History)
2 users (show)

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


Attachments
patch for LABEL && UUID support (label_uuid.patch,1.82 KB, patch)
2005-03-01 21:48 UTC, Alexey Maximov
Details | Diff
genkernel-3.1.6.label.patch (genkernel-3.1.6.label.patch,6.02 KB, patch)
2005-06-04 05:16 UTC, Zac Medico
Details | Diff
genkernel-3.2.0_pre18.label.patch (genkernel-3.2.0_pre18.label.patch,8.93 KB, patch)
2005-07-08 08:19 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Maximov 2005-03-01 21:47:12 UTC
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
Comment 1 Alexey Maximov 2005-03-01 21:48:02 UTC
Created attachment 52433 [details, diff]
patch for  LABEL && UUID support
Comment 2 Alex Howells (RETIRED) gentoo-dev 2005-03-01 23:33:37 UTC
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.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-03-02 08:20:48 UTC
... And why is this needed?
Comment 4 Alexey Maximov 2005-03-02 08:54:59 UTC
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
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2005-03-02 10:33:21 UTC
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.
Comment 6 Alexey Maximov 2005-03-02 17:50:52 UTC
ok I will improve code and add the support for --disklabel asap - new patch in the progress
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-03-17 18:31:09 UTC
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

Comment 8 Zac Medico gentoo-dev 2005-06-04 05:16:28 UTC
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.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-06-06 17:18:16 UTC
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.
Comment 10 Zac Medico gentoo-dev 2005-07-08 08:19:48 UTC
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.
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2005-07-12 10:42:42 UTC
Fixed in 3.2.2; thanks for the patch!