Subject: Re: reboot vs shutdown -r
To: None <pavel.cahyna@st.mff.cuni.cz>
From: Marcin Jessa <lists@yazzy.org>
List: current-users
Date: 02/14/2006 20:18:05
On Mon, 13 Feb 2006 12:01:35 +0100
Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz> wrote:

> On Mon, Feb 13, 2006 at 11:38:09AM +0100, Marcin Jessa wrote:
> > Hi guy.
> > 
> > I wondered if reboot could be made "RAID safe" ?
> 
> Linux version of reboot does it. Reboot detects if it was called during a
> normal reboot sequence. If it was not, it executes shutdown -r.
> (http://www.freebsd.org/cgi/man.cgi?query=halt&sektion=8&apropos=0&manpath=SuSE+Linux%2fi386+8.2)
> 
> This is IMHO an ugly workaround. Maybe reboot and halt could be moved to
> /libexec (out of the $PATH) so that people have to learn to use shutdown?

Another way could be to put aliases for reboot in the dotfiles of default install shells.
Or adding an appropriate message warning about consequences of reboot and instead
advicing usage of shutdown.
Something a la the message displayed by FreeBSD's /usr/libexec/locate.updatedb :
>>> WARNING
>>> Executing updatedb as root.  This WILL reveal all filenames
>>> on your machine to all login users, which is a security risk.

> > It seems like my RAID1 on two SATA drives was damaged after I
> > accidently used reboot instead of shutdown -r. My kernel panics trying
> > to read raid drives after boot. The reason I typed reboot was just
> 
> This should not happen, regardless of reboot...

Yes, I fixed the raid parity with my custom made livecd and still got kernel panic.
I suspect some parts of the userland misbehaved (sh or init) 
after former system update.

Cheers,
Marcin