Problems with wtmp and Super-UX
Sep. 20th, 2007 08:03 pm- During shutdown, a record is written to
wtmpon the partition/var/sx/admindicating that the run level has changed to 6 — reboot level. - During the first part of the book, the system mounts
/,/usrand/var. It does not mount/var/sx/adm. - The boot scripts write a record to
wtmp, this time on the/varpartition, indicating that the system is in multiuser mode. - The
/var/sx/admpartition, along with itswtmpclaiming that the system is at about to reboot, is mounted on top of thewtmpwith the multiuser record. - The rest of the boot scripts check the run level, decide that the system is about to shutdown, and crap out.
There are a couple of ways to work around the problem. The simplest way is not to use a separate partition for /var/sx/adm.
The second way is
silvershooter's R12.2 special: delete symbolic links from /etc/wtmp to /var/sx/adm/wtmp, move the real file to /etc and create some symbolic links from the adm directory (both on /var and /var/sx/adm) pointing to the real version in /etc.
The third method involves adding an entry to the undocumented, but nonetheless extremely potent, /etc/checkfile. This lists any additional file systems that need to be mounted along with / etc as early as possible in the boot sequence. If /var/sx/adm is listed here, it gets mounted before the boot scripts attempt to write out the run level records, which ensures that wtmp correctly describes the current run level of the system.
As I said, we seem to get caught by this every time we attempt to upgrade. How do I know this? Well, last time we upgraded — October 2005, for the curious — I added checkfile to our set of local mods. Somewhat embarrassingly, I then failed to add it to the configuration files, so it wasn't actually copied out with the rest of our localisations. Oops.