Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Avoid a possible Safe Mode boot issue' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoid a possible Safe Mode boot issue
Authored by: sheurich on Mar 08, '06 02:35:08PM

Actually, the mounted CD had nothing to do with your machine shutting down. Surprisingly, the behavior you saw is completely normal. When the system is booted into safe mode, a file system check is forced (even on journaled filesystems) and IF the check finds any inconsistencies (i.e., makes repairs) the system shuts itself down.

From /etc/rc :
32 if [ "${SafeBoot}" = "-x" ]; then
33 fsck -fy || halt
34 else
35 fsck -p || fsck -fy || halt
36 fi

While I am not certain why Apple chose to halt the system, rather than rebooting, after the fsck, this is obviously the intended action. This can be especially disconcerting when booting into safe mode (via an nvram boot-args='-x') on remotely administered Xserve systems.

One could simply change the halt command to a reboot in rc, but without consulting Apple engineers on this issue, this may not be a safe thing to do.



[ Reply to This | # ]
Avoid a possible Safe Mode boot issue
Authored by: Zeitkind on Mar 08, '06 04:58:26PM

Hmm.. I don't see much difference between reboot and halt. I remember halt to be more ungracefully to running tasks, like a reboot -q. Perhaps they want to avoid things happening before a normal reboot. Halt and reboot -q flushes the filesystem caches and force a quite ungracefully shutdown, reboot tends to wait for processes to stop and may write more stuff to the disk which might be unwanted. Both commands send SIGTERM (and subsequently a SIGKILL) to all tasks and do quite the same. Indeed a bit strange and good to know if you do remote controls to OS X machines running for a long time without a fsck.



[ Reply to This | # ]
halt vs. reboot
Authored by: sheurich on Mar 08, '06 08:01:08PM

The difference between halt and reboot, which is a substantial difference, is that halt powers off the machine, while reboot restarts the machine. Halt is not equivalent to 'reboot -q' and in fact both halt and reboot respect the '-q' flag.



[ Reply to This | # ]
halt vs. reboot
Authored by: Zeitkind on Mar 09, '06 12:04:18AM

Of course halt powers off the machine - but what is the difference between restart from scratch and a power cycle - regarding fsck? Apple decided to power off if root fs is modified - but why? Rebooting does the same as halt except erasing the RAM and other non static memory. If you flash a firmware, OK, no question, but if you fsck? The drives are called quite late in the boot process of OF and they also do a bus-reset while rebooting. So why the halt command instead of reboot?



[ Reply to This | # ]
Avoid a possible Safe Mode boot issue
Authored by: kalisphoenix on Mar 08, '06 08:56:09PM

Well, it's going to ruin your frigging day if it's a remote box and you halted instead of rebooting.



[ Reply to This | # ]