Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39861 - Genkernel --install copies kernel and initrd in /boot dir, not the /boot file system
Summary: Genkernel --install copies kernel and initrd in /boot dir, not the /boot file...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: High major
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-30 03:24 UTC by giovanni.bobbio
Modified: 2004-02-21 03:09 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 giovanni.bobbio 2004-01-30 03:24:52 UTC
Genkernel doesn't realize that /boot is a different file system rather than a directory, so the new kernels are put in the wrong place - unless for some reason /boot was already mounted when genkernel is run.
I am using genkernel-3.0.1_beta9 but I think this has been the case since 3.0.1_beta4.

Reproducible: Always
Steps to Reproduce:



Expected Results:  
 

Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.23-ck1) 
================================================================= 
System uname: 2.4.23-ck1 i686 Intel(R) Pentium(R) M processor 1700MHz 
Gentoo Base System version 1.4.3.10 
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
ccache version 2.3 [enabled] 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X X509 aalib apm arts artswrappersuid avi berkdb bluetooth cdr crypt cups 
dga directfb dv dvd encode ethereal fbcon fbdev ffmpeg foomaticdb gdbm gif gpm 
gtk2 imlib java javascript jpeg kde libg++ libwww mad mikmod mmx motif mpeg 
ncurses nls oggvorbis opengl oss pam pcmcia pda pdflib perl png pnp python qt 
quicktime radeon readline samba sdl slang spell sse ssl svga tcpd truetype usb 
x86 xml2 xv xvid zlib video_cards_radeon"
Comment 1 Brad House 2004-01-30 19:20:23 UTC
yeah, boot must be mounted before running genkernel .
probably needs to be documented like that. Not all people
have a seperate partition for boot. I'm not sure of a portable
way to be able to detect if /boot needs to be mounted or not
because of this.  Scanning /etc/fstab won't work b/c if it's a new
install, it won't be set up correctly, can't rely on any specific
files existing for the same reason.  Just not something we can really
support, so you must mount before running genkernel.

Reopen if you have a valid suggestion of how to detect this, otherwise
there's no use in reopening :/
Comment 2 Zack 2004-02-14 03:11:58 UTC
I think it's possible for genkernel to determine whether or not /boot needs to be mounted. It could grep /etc/fstab for "/dev/BOOT" and use that to determine if the user has fully configured their system. If /dev/BOOT is still there, the user is still in Chap. 7 of the Install Handbook and has yet to configure their fstab, which is done in Chap. 8. If this is the case, it's safe to assume /boot is already mounted, as the Handbook instructs the user to do this before entering the chroot.

If /dev/BOOT isn't in the fstab, that means that the user already has a up-and-running system, and is updating their kernel. It could grep the fstab again to figure out which partition is used for boot and then mount it.

Untested pseudocode:
if `grep "^/dev/BOOT" /etc/fstab` == "" then
    mount `grep "/boot" /etc/fstab | awk '{print $1}'` /boot
endif
Comment 3 Steven Wagner 2004-02-21 03:09:05 UTC
The old genkernel used to mount /boot.  How did it do it?  I don't see how running 'mount /boot' would cause any problems if the boot parition didnt exists, but it would definitly solve this blooper.