[PATCH] Don't suppress stderr in mountfs

Dan Nicholson dbn.lists at gmail.com
Thu Apr 26 07:37:14 PDT 2007

Is there a reason why stderr is suppressed in most of the mount calls in
the mountfs script? It only seems to cause valid errors to not be
printed to the screen. For instance, I was recently getting [FAIL] on
boot and thought there might be something drastically wrong with my
system. It turned out that I had just forgotten to make a mount point
for an extra partition I had.

Patch below removes the stderr suppression.


Index: bootscripts/lfs/init.d/mountfs
--- bootscripts/lfs/init.d/mountfs	(revision 8109)
+++ bootscripts/lfs/init.d/mountfs	(working copy)
@@ -18,7 +18,7 @@
 case "${1}" in
 		boot_mesg "Remounting root file system in read-write mode..."
-		mount -n -o remount,rw / >/dev/null 2>&1
+		mount -n -o remount,rw / >/dev/null
 		# Remove fsck-related file system watermarks.
@@ -35,13 +35,13 @@
 		# This will mount all filesystems that do not have _netdev in
 		# their option list.  _netdev denotes a network filesystem.
 		boot_mesg "Mounting remaining file systems..."
-		mount -a -O no_netdev >/dev/null 2>&1
+		mount -a -O no_netdev >/dev/null
 		boot_mesg "Unmounting all other currently mounted file systems..."
-		umount -a -d -r >/dev/null 2>&1
+		umount -a -d -r >/dev/null

More information about the lfs-dev mailing list