Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36624 - /etc/runlevels/boot/checkroot doesn't take nfsroot into account
Summary: /etc/runlevels/boot/checkroot doesn't take nfsroot into account
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 40202 (view as bug list)
Depends on:
Blocks: 53104
  Show dependency tree
 
Reported: 2003-12-28 00:26 UTC by Peter Zijlstra
Modified: 2004-10-03 01:37 UTC (History)
1 user (show)

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


Attachments
actual patch file adding the suggested fix (checkroot.nofsck-nfsroot.patch,503 bytes, patch)
2004-07-15 21:45 UTC, Gregory P. Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zijlstra 2003-12-28 00:26:33 UTC
when booting a gentoo system over nfs checkroot fails since you can't fsck an nfsmount.

Reproducible: Always
Steps to Reproduce:
1. build yourself a chrooted gentoo install
2. nfs-export it
3. build a nfsroot enabled kernel
4. put it on a floppy
5. take your spare box, and boot it over nfs

Actual Results:  
checkroot fails

Expected Results:  
to not check the root filesystem since its not local

should be easy to detect; I'll attache a proper fix once I get around to it.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-28 08:12:37 UTC
Easy:

--
if mount -vf -o remount / | \
   awk '{ if ($5 !~ /nfs|ncpfs|coda/) exit 0; else exit 1; }'
then
    fsck ....
fi
--
Comment 2 SpanKY gentoo-dev 2004-06-05 21:04:50 UTC
any update on this ?  ive hit it when playing around with my dreamcast :)
Comment 3 Gregory P. Smith 2004-07-15 21:45:49 UTC
Created attachment 35524 [details, diff]
actual patch file adding the suggested fix

this adds the suggested check to checkroot.  someone please apply this. 
checkroot  has been whining about fsck.nfs missing forever and i've just been
ignoring it.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-08-29 20:59:14 UTC
could this please be placed in baselayout?
one further issue with it, under 2.6 kernels.

if you are using an fstab without an / entry as you are using / from nfsroot, automounted by the kernel. 

Change
-----
if mount -vf -o remount / 2> /dev/null | awk '{ if ($6 ~ /rw/) exit 0; else exit 1; }'
then
-----
To:
-----
if egrep '/' -w /proc/mounts | egrep -v rootfs | egrep -w rw then
einfo "Root filesystem already mounted read/write"
elif mount -vf -o remount / 2> /dev/null | \

and change:
mount -f /
into:
awk '$2 == "/" && $3 != "rootfs" {print}' /proc/mounts >>/etc/mtab
Comment 5 SpanKY gentoo-dev 2004-10-03 00:05:59 UTC
now in cvs
Comment 6 SpanKY gentoo-dev 2004-10-03 01:37:36 UTC
*** Bug 40202 has been marked as a duplicate of this bug. ***