Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207159 - genkernel-3.4.9 has messy errors when used to boot a livecd
Summary: genkernel-3.4.9 has messy errors when used to boot a livecd
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-01-23 14:16 UTC by Richard Scott
Modified: 2008-02-14 13:13 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 Richard Scott 2008-01-23 14:16:28 UTC
When a livecd searches for its media, there are messy unmount errors that were not there in genkernel-3.4.9_pre6

Reproducible: Always

Steps to Reproduce:
1. make a livecd using genkernel to make your initrd and kernel
2. boot the live cd
3. watch as it displays errors when finding the livecd media
4. System continues to boot ok after the errors pass and CD works fine.

Actual Results:  
cd to boot without these errors like the previous genkernel.


I've believe the code that needs changing in genkernel-3.4.9 is from the findmediamount code in /usr/share/genkernel/generic/initrd.scripts.

I think we just need to nullify the output form "umount ${mntdir}" as its currently echoing it to the screen.

So changing it to something like this may work:

umount ${mntdir} 2>&1 > /dev/null
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-23 16:31:55 UTC
Maybe you could post those 'messy errors' and emerge --info as required. Reopen then; thanks.
Comment 2 Richard Scott 2008-01-24 14:58:08 UTC
ok, here's what happens on booting the livecd:

>> Activating mdev
ls: : No such file or directory
>> Making tmpfs for /newroot
>> Looking for the cdrom
>> Attempting to mount media:- /dev/hda
umount: Couldn't umount /newroot/mnt/cdrom: Invalid Argument
>> Attempting to mount media:- /dev/hda1
umount: Couldn't umount /newroot/mnt/cdrom: Invalid Argument
mount: Mounting /dev/hda1 on /newroot/mnt/cdrom failed: Device or resource busy
>> Attempting to mount media:- /dev/hda2
umount: Couldn't umount /newroot/mnt/cdrom: Invalid Argument
mount: Mounting /dev/hda on /newroot/mnt/cdrom failed: Device or resource busy
>> Attempting to mount media:- /dev/hda3
mount: Mounting /dev/hda2 on /newroot/mnt/cdrom failed: Device or resource busy
umount: Couldn't umount /newroot/mnt/cdrom: Invalid Argument
>> Attempting to mount media:- /dev/hdc
umount: Couldn't umount /newroot/mnt/cdrom: Invalid Argument
!! Media not found
>> No bootable medium found. Waiting for new devices
>> Looking for the cdrom
>> Attempting to mount media:- /dev/hda
mount: Mounting /dev/hda on /newroot/mnt/cdrom failed: Device or resource busy
>> Media found on /dev/hda

And now it boots ok.

Here is the "emerge --info" output on the system I've compiled the LiveCD on:

Portage 2.1.3.19 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: 2.6.23-gentoo-r3 i686 Intel(R) Celeron(R) CPU 2.93GHz
Timestamp of tree: Tue, 22 Jan 2008 22:00:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=pentium4 -O2 -pipe -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind /var/service"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mtune=pentium4 -O2 -pipe -fforce-addr"
DISTDIR="/var/lib/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://128.61.111.10/pub/gentoo http://128.61.111.11/pub/gentoo http://128.61.111.9/pub/gentoo"
MAKEOPTS="-j4"
PKGDIR="/var/lib/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="berkdb cracklib crypt hardened midi nls nptl nptlonly pam pic readline ssl tcpd urandom x86 xorg 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 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="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2008-02-02 17:40:07 UTC
I'm not entirely sure what's going on here. Why can't it mount /dev/hda the first time but it can the second time around? And what's with all the "Invalid argument"?
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2008-02-04 21:12:36 UTC
Okay, I found the cause of this. It's fixed in SVN. Thanks.
Comment 5 Richard Scott 2008-02-04 23:41:12 UTC
that's excellent news, nice work! :-)
Comment 6 Andrew Gaffney (RETIRED) gentoo-dev 2008-02-05 00:22:28 UTC
Please don't close the bug. We'll close it when we release a new version with the fix.
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2008-02-14 04:32:38 UTC
I just released genkernel 3.4.10_pre1, which has this fix included.  Feel free to REOPEN this bug or make a comment if it is not resolved.
Comment 8 Richard Scott 2008-02-14 10:50:56 UTC
cool, thank you :-)
I will test later today!
Comment 9 Richard Scott 2008-02-14 13:13:12 UTC
Just installed it and noticed the genkernel script does not have the executable attribute set:

ls -al /usr/share/genkernel/genkernel
-rw-r--r-- 1 root root 11567 Feb 14 12:27 /usr/share/genkernel/genkernel

:-)