Bug 210738 - netboot mount completely broken
netboot mount completely broken
Product: Fedora
Classification: Fedora
Component: system-config-netboot (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Radek Brich
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-10-13 20:51 EDT by Pierre Ossman
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-17 08:12:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pierre Ossman 2006-10-13 20:51:58 EDT
The mount that is currently shipped with rawhide doesn't work well with netboot.
There are lots of complaints about out-of-range access to the ram drive, and
mounting the nfs root fails without specifying the problem.

I've concluded that the problem is with the mount command as the only change
needed to get a working initrd is to steal 'mount' from an older machine (FC4 in
my case).
Comment 1 Mitchell Blank Jr 2006-10-26 12:40:09 EDT
I am seeing this too -- after upgrading to FC6 on both server and diskless
client mount is having severe problems.  Disclaimer: I'm using a homegrown
diskless setup on the client which has a slightly modified FC userland. 
However, my investigations so far indicate that this is a legitimate FC bug.

The symptom I am seeing is that the boot pauses for several minutes after
printing the "Remounting root filesystem in read-write mode".  Eventually the
system does boot but root ends up being mounted twice and the overlaid one is in
read-only mode, causing lots of things to fail.

I added some debugging to /etc/rc.d/rc.sysinit and found that the line that it's
pausing on:

  # Enter mounted filesystems into /etc/mtab
  mount -f /

That ought to be pretty innocuous -- the "-f" flag after all SHOULD prevent any
actual mount from happening.  This doesn't seem to work on NFS mounts, however.

Running that mount command under "strace -f" I see:

  execve("/sbin/mount.nfs", ["/sbin/mount.nfs", "MY-SERVER:/MY/PATH", "/", "-o",
"rw"], [/* 18 vars */]) = 0

So it seems that when /bin/mount calls /sbin/mount.nfs it forgets to pass along
the "-f" flag, causing breakage.  I verified that calling mount.nfs with "-f"
seems to work just fine.  I suspect this might be the root cause of the problem
Comment 2 Pierre Ossman 2006-12-03 16:46:27 EST
Can we get some action on this?
Comment 3 Pierre Ossman 2006-12-27 16:45:37 EST
Hellooo? netboot is completely broken, so I would expect a little more attention
to this bug.
Comment 4 Tomi Orava 2007-01-21 13:49:32 EST
Are you really sure that your initrd.img actually contains the /sbin/mount.nfs
binary at all ? In my case the "system-config-netboot-0.1.41-1.FC6.noarch"
package is forgetting (?) to copy/include the /sbin/mount.nfs into the
initrd.img and therefore you get a cryptic mount error while the diskless client
tries to mount the root-device from the NFS-server.

By making the one line change below, the NFS-mount succeeds just fine
(ie. copy the /sbin/mount.nfs into initrd.img)

This broke in FC5 and the last kernel which worked without this modification as
2.6.17-2187 (in my case at least)

Tomi Orava

--- /usr/share/system-config-netboot/diskless/updateDiskless    2007-01-21
20:46:42.000000000 +0200
+++ /usr/share/system-config-netboot/diskless/updateDiskless.mod       
2007-01-21 17:48:43.000000000 +0200
@@ -114,7 +114,7 @@
 #/bin/cp "$ROOT"/usr/share/hwdata/pcitable $MNTPOINT/usr/share/hwdata/ || die;
 # disklessrc now uses modules.pcimap, not pcitable
-BINS="/sbin/busybox.anaconda /sbin/insmod /sbin/modprobe /sbin/rmmod
/sbin/dhclient /bin/bash /bin/mount /sbin/route /sbin/ip /usr/bin/expr
/sbin/lspci /sbin/ifconfig /sbin/consoletype /sbin/pivot_root /bin/hostname
/bin/domainname /usr/bin/host"
+BINS="/sbin/busybox.anaconda /sbin/insmod /sbin/modprobe /sbin/rmmod
/sbin/dhclient /bin/bash /bin/mount /sbin/mount.nfs /sbin/route /sbin/ip
/usr/bin/expr /sbin/lspci /sbin/ifconfig /sbin/consoletype /sbin/pivot_root
/bin/hostname /bin/domainname /usr/bin/host"
 # Set up links to all the busybox functions -
 # may be different for different versions of busybox!
 if [ ! -e $ROOT/sbin/busybox.anaconda ]; then 
Comment 5 Pierre Ossman 2007-01-22 05:29:19 EST
Now that's a very plausible explanation. I'll test it later tonight.
Comment 6 Pierre Ossman 2007-01-22 14:22:58 EST
Works like a charm! Please apply ASAP!
Comment 7 Davide Rossetti 2007-02-02 11:19:10 EST
/sbin/mount.nfs is only the beginning... it goes over, mounts nfs root, there
appear some error which scrolls quickly, then it seems to lock after selinux
prints on screen... after a while I get some message on 'vfs ... lockmanager'
(don't remember well).
Comment 8 Alexander Aminoff 2007-02-22 17:03:51 EST
This is the same bug as 227903


The workaround that works for me is make that mount -f -i /.

Comment 9 Pierre Ossman 2007-07-19 17:08:21 EDT
Helloooo? Could we have this fixed?
Comment 10 Radek Brich 2007-10-17 08:12:11 EDT
fixed in 0.1.42

Note You need to log in before you can comment on or make changes to this bug.