Bug 465864 - Diskless: Document or automate disabling S10network, changing /etc/sysconfig/readonly-root, and other clean-up
Diskless: Document or automate disabling S10network, changing /etc/sysconfig...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: system-config-netboot (Show other bugs)
5.2
All Linux
low Severity medium
: rc
: ---
Assigned To: Jaroslav Reznik
BaseOS QE
: Desktop, Documentation, EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-06 15:53 EDT by Bryan J Smith
Modified: 2014-09-14 20:11 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-14 13:16:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryan J Smith 2008-10-06 15:53:07 EDT
Description of problem:  Diskless system fails to start X, and any other facility needing to write to /tmp.  The /tmp filesystem is mounted read-only, even though all other "empty" (as designated in /etc/rwtab) directories are read/write (e.g., /var/tmp).

Root cause:  Three (3) compounding issues, two (2) should be documented or automated when the Diskless image for any OS is prepared via system-config-netboot.

1.  /etc/sysconfig/readonly-root -- "yes" entries

If this is no set, /tmp fails to be mounted read/write.  A post-boot, manual /tmp filesystem can be mounted (via tmpfs).  NOTE:  Setting /tmp as tmpfs in /etc/fstab has no effect.

2.  /etc/rc#.d/S##network -- remove (disable)

This is setup during the diskless boot.  This seems obvious, but it needs to either be documented or automated during Diskless image is prepared via system-config-netboot.

It is the symptoms of not doing both #1 and #2 that can easily cause one to look at the problem differently.  E.g., all filesystems except /tmp are mounted as tmpfs read/write correctly.  It may cause the sysadmin to start changing other files, etc...

3.  Clear out (e.g., rename) various files/directories named in /etc/rwtmp

This is less important and common sense, and most sysadmins should figure this one out.  But still, it could not hurt to have the system-config-netboot automate or at least document that anything defined in /etc/rwtmp should be removed/cleared out or at least renamed.  E.g., /etc/mtab.

Version-Release number of selected component (if applicable):  0.1.45.1


How reproducible:

Always

Steps to Reproduce:
1.  Install RHEL 5 client
2.  Follow system-config-netboot Chapter 2 on Diskless OS setup (copy install, setup DHCP, TFTP, etc...) and host (client) setup
3.  Attempt boot, see hang at X and other components relying on /tmp
4.  Note how /tmp is the only filesystem not mounted read/write, try to resolve via other changes
5.  Change appropriate /etc/sysconfig/readonly-root entries to "yes", which system hang at various parts of boot around network startup

Actual results:

As #3-#5

Expected results:

X comes up without issue.

Additional info:

For Diskless, the system-config-netboot tool does a good job of setting up /etc/rwtab and many other settings in the init scripts, etc...  However, it is not usable out-of-the-box.  Just adding the first two (2) points in the "Root Cause" above in the documentation, or possibly automating or adding a "check" button in the tool, would remove a lot of trial'n error by new Diskless sysadmins.  Even Google searches on these exact details, once known, or searches for HOWTOs often do not cover anything other than setting readonly-root entries.
Comment 1 Ondrej Valousek 2009-02-05 04:35:44 EST
My comments:
1. /etc/sysconfig/readonly-root -- "yes" entries
I do not know why we actually need to set these entries manually. The "disklessrc" script sets all necessary variables automatically during the initrd stage automatically for us:
...
# Some useful environment variables to stop initscripts / dhclient-script
# doing silly things:
export keep_old_ip=yes
export fastboot=yes
export READONLY=yes

exec /sbin/switch_root -c /dev/console /mnt /sbin/init
2. system-config-netboot already handles network interfaces by removing the startup scripts like ifup-eth0. So this is already handled correctly, I believe
3. Regarding the /tmp - this filesystem is already handled by the initscripts. The shared bootimage already contains a modified /etc/fstab which causes to mount /tmp as tmpfs

system-config-netboot works OK to me (including X) but I do not use the python interface as it is far from being optimal. I call the scripts included in system-config-netboot manually.
Ondrej
Comment 2 RHEL Product and Program Management 2010-08-09 15:13:42 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 3 RHEL Product and Program Management 2011-05-31 10:30:12 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

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