Summary: | baselayout 1.12.9-r2 has problems with read-only NFS root | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | aero1967 |
Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | aero1967, ediap, gent_bz, pchrist, SebastianLuther |
Priority: | High | ||
Version: | 2007.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Checkroot script modified to avoid spots which cause NFSROOT boots with rdonly / to fail
representative fstab file for a machine with a read-only NFSROOT as described initially |
Description
aero1967
2007-07-25 03:03:48 UTC
Created attachment 125948 [details]
Checkroot script modified to avoid spots which cause NFSROOT boots with rdonly / to fail
Comment on attachment 125948 [details]
Checkroot script modified to avoid spots which cause NFSROOT boots with rdonly / to fail
This is not meant to show how to actually fix the script, just what I did in my case to go around the problem spots.
if your /etc is readonly, then make /etc/mtab a symlink to /proc/mounts post your actual /etc/fstab ... it should of course have an entry declaring / as ro (In reply to comment #3) > if your /etc is readonly, then make /etc/mtab a symlink to /proc/mounts > > post your actual /etc/fstab ... it should of course have an entry declaring / > as ro > As I mentioned in my initial submission, that is exactly what I had done. I'm attaching a representative /etc/fstab . Created attachment 125952 [details]
representative fstab file for a machine with a read-only NFSROOT as described initially
what version of util-linux are you using ? seems to be a bug in util-linux, not baselayout (In reply to comment #6) > what version of util-linux are you using ? > > seems to be a bug in util-linux, not baselayout > util-linux-2.12r-r7 yeah, this is a bug in util-linux which has been fixed upstream already ... however, ive been pondering the code and i believe i can simplify the logic while working around the bug in the process Even if problems 1. and 2. are due to bugs in util-linux, it doesn't have any impact on localmount as-is, since there is no logic there to check for a read-only /etc . Also, could you clarify which NFS-related initscripts should be in the boot and default runlevels for an NFSROOT configuration? Hi! I have a similar setup as aero1967, however I use pure diskless nodes. The /etc and /tmp partitions are remounted rw on top of ro ones using aufs trick. Anyway I confirm that since a recent upgrade of baselayout (1.12.9-r2 -> 1.12.10-r5) and util-linux (2.12r-r8 -> 2.13-r2) I had problems with booting my diskless nodes via NFS, due to this remounting try in checkroot. So, I had to comment the following lines from the init script: # if mount -vf -o remount / 2> /dev/null | \ # awk '{ if ($6 ~ /rw/) exit 0; else exit 1; }' && \ # ! touch -c / >& /dev/null # then # ebegin "Remounting root filesystem read/write" # mount -n -o remount,rw / &> /dev/null # if [[ $? -ne 0 ]] ; then # eend 2 "Root filesystem could not be mounted read/write :(" # if [[ ${RC_FORCE_AUTO} != "yes" ]] ; then # sulogin ${CONSOLE} # fi # else # eend 0 # fi # fi So, is it a bug in util-linux-2.13-r2 or in the latest stable baselayout? As for aero1967's questions: (In reply to comment #0) > Also, do I have the correct init scripts in the boot or default runlevels for > an NFS root? The gentoo-diskless howto just uses netmount, but within the > netmount script, it mentions portmap should be loaded. However, there are also > init scripts for rpc.statd and nfsmount, and I'm not sure between {netmount, > portmap, rpc.statd and nfsmount} init scripts, which should be loaded at what > runlevel for an NFS root (nor were the forums of great help -- additional > documentation would be really appreciated). I use the "netmount" init script in the boot runlevel. However, with the latest update of nfs-utils (net-fs/nfs-utils-1.0.12-r1 -> net-fs/nfs-utils-1.1.0-r1) I had to add "nolock" option to nfs fstab entries, because without this the "netmount" complained about missing rpc.statd service and does not mount the NFS filesystems. So I would also be glad to hear from some experts how to setup NFS services in Gentoo for mounting root file system via NFS. BR, /Adam |