Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48339 - genkernel looks for /boot in /etc/fstab
Summary: genkernel looks for /boot in /etc/fstab
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
: 53493 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-19 10:13 UTC by Florian Effenberger
Modified: 2004-06-12 15:06 UTC (History)
1 user (show)

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


Attachments
Patch, for 3.0.2a (genkernel-3.0.2a-fstab.patch,1011 bytes, patch)
2004-05-02 10:18 UTC, Tim Yamin (RETIRED)
Details | Diff
my /etc/fstab file (fstab,1.16 KB, text/plain)
2004-05-04 00:27 UTC, Florian Effenberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Effenberger 2004-04-19 10:13:53 UTC
genkernel looks for /boot in /etc/fstab. I have a configuration where /boot is not mounted separately as it is on the main partition, and I receive the following error message (but genkernel does not abort, so it's only a cosmetic problem, I think):

* Gentoo Linux Genkernel; Version 3.0.2a
* Compiling Linux Kernel 2.6.6-rc1 for x86...

mount: can't find /boot in /etc/fstab or /etc/mtab
* WARNING: Failed to mount /boot!


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.6-rc1)
=================================================================
System uname: 2.6.6-rc1 i586 AMD-K6(tm) 3D processor
Gentoo Base System version 1.4.9
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=k6-2 -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /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/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=k6-2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/
http://128.213.5.34/gentoo/ http://gentoo.seren.com/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib accessibility acl acpi aim alsa apm arts avi berkdb
bidi bonobo caps cdr cjk crypt cups curl dga doc dvb dvd dvdr emacs emacs-w3
encode esd ethereal evo fam fbcon flac flash foomaticdb gb gd gdbm ggi gif gnome
gphoto2 gpm gtk gtk2 gtkhtml icq imagemagick imap imlib ipv6 jabber java jpeg
junit kde ladcca lcms ldap leim lesstif libg++ libgda libwww lirc mad mbox mcal
memlimit mikmod mmx motif mozilla mpeg mpi msn mysql nas ncurses nls nocd odbc
oggvorbis opengl oscar oss pam pda pdflib perl png ppds prelude python qt
quicktime readline samba sasl scanner sdl slang slp snmp socks5 speex spell sse
ssl svga svgalib tcltk tcpd tetex theora tiff truetype unicode usb vhosts videos
wmf wxwindows x86 xface xinerama xml xml2 xmms xosd xv yahoo zlib"
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2004-05-01 15:03:11 UTC
Hi,

Could you try the following patch please and see if this solves the issue?

>>> [ Snip here ]
--- /usr/share/genkernel/genkernel	2004-04-11 15:17:02.000000000 +0100
+++ /usr/share/genkernel/genkernel-48339	2004-05-01 23:00:59.000000000 +0100
@@ -72,19 +72,22 @@
 # Check /boot is mounted
 if ! grep -q "/boot" /proc/mounts
 then
-	if isTrue ${MOUNTBOOT}
+	if grep -q "/boot" /etc/fstab
 	then
-		if ! mount /boot
+		if isTrue ${MOUNTBOOT}
 		then
-			print_warning 1 "${BOLD}WARNING${NORMAL}: Failed to mount /boot!"
-			echo
+			if ! mount /boot
+			then
+				print_warning 1 "${BOLD}WARNING${NORMAL}: Failed to mount /boot!"
+				echo
+			else
+				print_info 1 "mount: /boot mounted successfully!"
+			fi
 		else
-			print_info 1 "mount: /boot mounted successfully!"
+			print_warning 1 "${BOLD}WARNING${NORMAL}: No mounted /boot partition detected!"
+			print_warning 1 '         Run ``mount /boot`` to mount it!'
+			echo
 		fi
-	else
-		print_warning 1 "${BOLD}WARNING${NORMAL}: No mounted /boot partition detected!"
-		print_warning 1 '         Run ``mount /boot`` to mount it!'
-		echo
 	fi
 fi
 

<<< [ Snip here ]

Thanks!
Comment 2 Florian Effenberger 2004-05-02 08:02:14 UTC
The following hunks are rejected ;-(
(Genkernel 3.0.2a)


***************
*** 72,90 ****
  # Check /boot is mounted
  if ! grep -q "/boot" /proc/mounts
  then
-  if isTrue ${MOUNTBOOT}
   then
-  if ! mount /boot
   then
-  print_warning 1 "${BOLD}WARNING${NORMAL}: Failed to mount /boot!"
-  echo
   else
-  print_info 1 "mount: /boot mounted successfully!"
   fi
-  else
-  print_warning 1 "${BOLD}WARNING${NORMAL}: No mounted /boot partition detected!"
-  print_warning 1 '         Run ``mount /boot`` to mount it!'
-  echo
   fi
  fi

--- 72,93 ----
  # Check /boot is mounted
  if ! grep -q "/boot" /proc/mounts
  then
+  if grep -q "/boot" /etc/fstab
   then
+  if isTrue ${MOUNTBOOT}
   then
+  if ! mount /boot
+  then
+  print_warning 1 "${BOLD}WARNING${NORMAL}: Failed to mount /boot!"
+  echo
+  else
+  print_info 1 "mount: /boot mounted successfully!"
+  fi
   else
+  print_warning 1 "${BOLD}WARNING${NORMAL}: No mounted /boot partition detected!"
+  print_warning 1 '         Run ``mount /boot`` to mount it!'
+  echo
   fi
   fi
  fi
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-05-02 10:14:03 UTC
Hm; it should all apply - did you ensure that the tabs weren't converted to spaces?
Comment 4 Florian Effenberger 2004-05-02 10:15:57 UTC
Is it for 3.0.2a?
Could you attach the patch as file so I can try it again?
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2004-05-02 10:18:31 UTC
Created attachment 30530 [details, diff]
Patch, for 3.0.2a

Patch attached.
Comment 6 Florian Effenberger 2004-05-02 10:25:56 UTC
Thanks! Unfortunately, it still does not work :(


root@floeff2:~ # patch -p0 < patch
patching file /usr/share/genkernel/genkernel
root@floeff2:~ # genkernel all
* Gentoo Linux Genkernel; Version 3.0.2a
* Compiling Linux Kernel 2.6.6-rc1 for x86...

mount: Konnte /boot nicht in /etc/fstab oder /etc/mtab finden
* WARNING: Failed to mount /boot!

* kernel: >> Running mrproper...

[...]
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-05-02 12:40:04 UTC
Hm; would you happen to have any occurances of /boot, commented or not in /etc/fstab? If so, can you try changing the 'if grep -q "/boot" /etc/fstab' line to 'if egrep -q "^/boot" /etc/fstab' and see if that helps...
Comment 8 Florian Effenberger 2004-05-04 00:27:53 UTC
Created attachment 30672 [details]
my /etc/fstab file
Comment 9 Florian Effenberger 2004-05-04 00:28:49 UTC
Your patch (grep -> egrep) seems to work, no errors anymore ;)
Comment 10 Sébastien ESTIENNE 2004-05-12 17:38:21 UTC
> 'if egrep -q "^/boot" /etc/fstab' and see if that helps...
i think that in fstab /boot is never at the begining of the line, it's the device and then the mountpoint.

maybe you could try something like this:
if ( egrep -v "#" /etc/fstab | egrep -q "/boot" )

so you'll know if you have an uncommented "/boot" entry.
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2004-05-14 11:57:42 UTC
Ah; "egrep '^[^#].+'$'\t''/boot'$'\t' /etc/fstab" should work then...
Comment 12 Tim Yamin (RETIRED) gentoo-dev 2004-06-10 08:25:16 UTC
*** Bug 53493 has been marked as a duplicate of this bug. ***
Comment 13 Tim Yamin (RETIRED) gentoo-dev 2004-06-12 15:06:49 UTC
Fixed in genkernel-3.0.2b; it should reach Portage from CVS in half-an-hour. Thanks!