sorvad
Posts: 46
Joined: Thu Dec 22, 2011 11:04 am

shutdown procedure

Fri Jun 08, 2012 4:56 pm

OK, after a frustrating few days (as I'm new to Linux) getting my system almost where I want it, it seems to have packed up. Started first with tight vnc refusing to start up with what appears to be a popular "font" error message even though I'd been using the Pi solely through it on and off for over a day. Then SSH packed in, so I got all my keyboard and cables out to see what was happening on boot. All seemed ok, could login but now "startx" generates errors. This all happened after I'd installed "network-tools" in an effort to get my wifi dongle working. May or may not be connected.

Anyway, what I'm wondering about is shut-down procedure, the official FAQ says just unplug it which I do. But I can't help wondering if doing this could corrupt the SD card if Debian is in the middle of doing something, just "unplug" it feels a little reckless, is this really what people do ? I'd have thought using the official shut down procedures for Debian/ Linux would be safer.

So, what is the best way of shutting down ?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5422
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: shutdown procedure

Fri Jun 08, 2012 5:22 pm

Are you talking about this:
"Where’s the on / off switch?
To switch on: just plug it in!
To switch off: remove power."

I think that is just saying where you would normally switch a machine off, you just remove the power lead.
However it is not advisable to switch off or remove the power from a running system. You will (eventually) corrupt the SDCARD.

"sudo halt" from the console, or the menu option in X, and wating for halted message (or OK LED to stop slickering) should be done before removing power.

sorvad
Posts: 46
Joined: Thu Dec 22, 2011 11:04 am

Re: shutdown procedure

Fri Jun 08, 2012 5:39 pm

Yes, that's what I was referring too, thanks for the advice on how to correctly shutdown. My SD card appears corrupted unfortunately, I'm in the process of trying to re-install, unsuccessfully at the moment ! Appreciate the pointers

dimonic
Posts: 41
Joined: Fri Jun 08, 2012 9:08 pm

Re: shutdown procedure

Fri Jun 08, 2012 9:10 pm

to run all shutdown scripts (if that is important),

$ sudo shutdown -h now

and

$ sudo shutdown -r now

to reboot immediately.

DavidMS
Posts: 139
Joined: Fri May 25, 2012 8:48 pm
Contact: Website

Re: shutdown procedure

Sat Jun 09, 2012 6:57 am

Can someone explain the difference between - and which is best us use (if there is a difference)

using

$ sudo halt

and

$ sudo shutdown -h now

to close my Rpi down before removing power, people seem to talk about both in various posts, while any mention this seems to be missing in the more formal information coming from the 'foundation'.

I know the line is that current software is a developer version etc, but a bit of clarity from the design owners on this and for instance making sure people know about the startx command to get the GUI up might be helpful (and save a few tears) !
http://meanderingpi.wordpress.com/
11 Raspberry Pi's and counting....

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: shutdown procedure

Sat Jun 09, 2012 7:33 am

DavidMS wrote:Can someone explain the difference between - and which is best us use (if there is a difference)

using

$ sudo halt

and

$ sudo shutdown -h now
There is no difference. If you read the manual for the commands using
man halt
man shutdown
you will see that the manual for halt states

this simply invokes the shutdown(8) tool with the appropriate arguments

Note: Use the q key to quit the manual page.
DavidMS wrote:any mention this seems to be missing in the more formal information coming from the 'foundation'.

I know the line is that current software is a developer version etc, but a bit of clarity from the design owners on this and for instance making sure people know about the startx command to get the GUI up might be helpful (and save a few tears) !
This has nothing to do with the Raspberry Pi. This is normal Linux.

DavidMS
Posts: 139
Joined: Fri May 25, 2012 8:48 pm
Contact: Website

Re: shutdown procedure

Sat Jun 09, 2012 7:43 am

Thanks
http://meanderingpi.wordpress.com/
11 Raspberry Pi's and counting....

Return to “Beginners”