[OpenIndiana-discuss] auto-scrub and its result

Edward Ned Harvey (openindiana) openindiana at nedharvey.com
Sat Dec 29 13:38:19 UTC 2012


> From: Jim Klimov [mailto:jimklimov at cos.ru]
> 
> Note however that halt, poweroff and reboot commands are binaries (and
> hardlinks of one program), and they can be ungraceful and fast.

Up till now, whenever I want to completely reboot (with bios and bootloader, not just fastreboot which reloads kernel) I always used "reboot -p" and it does gracefully shutdown services and kill processes and unmount filesystems, etc etc.  However, as a result of your email above, I went looking deeper into this, and found ...

As you said, /usr/sbin/reboot is a binary.  If used improperly (with the -n, -q, -l, flags) it has the potential of doing ungraceful reboot.  The man page seems to suggest that it normally uses the "init" process, which is normally good.  But it doesn't say this in language that is perfectly 100% clear and reliable.  Searching the internet doesn't give me anything more solid to go on.  So I can say this:  In my experience, "reboot -p" is safe and graceful, seems to wrap around "init 6" but doesn't do the fast reboot (forces system through BIOS and bootloader) without changing the system default reboot behavior.  But I only have anecdotal evidence and weak reference to my interpretation of the man page.

If you want fast reboot, which is default, this will always work (on x86):
sudo svccfg -s "system/boot-config:default" setprop config/fastreboot_default=true
sudo svcadm refresh svc:/system/boot-config:default
sudo init 6

If you want full reboot with BIOS and bootloader (on x86):
sudo svccfg -s "system/boot-config:default" setprop config/fastreboot_default=false
sudo svcadm refresh svc:/system/boot-config:default
sudo init 6




More information about the OpenIndiana-discuss mailing list