LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-29-2008, 02:38 AM   #1
hammertime1983
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Rep: Reputation: Disabled
Safe Shutdown


Hello,

I'm trying to research why Linux requires a safe shutdown...basically I can't find anything on the internet.

I was wondering if anyone has any detailed links explaining the procedure that linux follows, and why.

Thanks.
 
Old 05-29-2008, 05:34 AM   #2
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
What do you mean safe shutdown ?
If you mean that you just can not turn the power off when you stop using the computer,well in my opinion you have to stop
the process before turning off and closes the files that is open.
I do not know how we call it LInux but in some OS we call it hard shutdown just turning off the power when the computer is still running and do not make habit to do so

all the best
 
Old 05-29-2008, 07:15 AM   #3
dieduster
LQ Newbie
 
Registered: Dec 2005
Distribution: Mandriva, Fedora Core
Posts: 7

Rep: Reputation: 0
Hey

If your talking about a Safe way to stop all the running processes then just run 'halt -p'

This will stop all Running Processes and switch off the computer when everything is finished.
 
Old 05-29-2008, 08:13 AM   #4
hammertime1983
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: Disabled
Yeah I'm referring to the 'shutdown -h now' command and why it isn't a good idea in Linux to just pull the power plug...
 
Old 05-29-2008, 09:01 AM   #5
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Quote:
hammertime1983
Yeah I'm referring to the 'shutdown -h now' command and why it isn't a good idea in Linux to just pull the power plug...
This is not a complete anwer, but if you just pull the plug any file open in ram mem will be lost. It doesn't allow the HD to Park, you can get data corruption just to name a few.

Most every bit of machinery needs to be shut down in a safe manner, (this is crewed) think what would happen if you didn't shut down your car the right way. Your driving down the road at 55 and just stepped out.
 
Old 05-29-2008, 09:12 AM   #6
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
Yeah, it's mostly about the hard drive part. If you unmount and sync it first you can pull the plug as much as you want without any problems : ).
 
Old 05-29-2008, 03:23 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
Quote:
Originally Posted by hammertime1983 View Post
Yeah I'm referring to the 'shutdown -h now' command and why it isn't a good idea in Linux to just pull the power plug...
lol, so you really just pull the plug on your computer like that ? That's funny. And you don't get any data corruption, system instability, etc ? If not, you must be very lucky ...

The only thing I can recommend is that you either search the internet and educate yourself a bit or a whole lot on the topic of computers and perhaps even electronics or go buy a book on it.
 
Old 05-29-2008, 04:21 PM   #8
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
I'm afraid pulling the power plug could even damage electronic parts as well as the power supply.
 
Old 05-29-2008, 05:11 PM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by hammertime1983 View Post
Yeah I'm referring to the 'shutdown -h now' command and why it isn't a good idea in Linux to just pull the power plug...
you can not do that with any OS and not risk hardware + software issues as a result.

Windows, Linux, BSD, Unix, OSx, etc... you name it, any computer running any type of OS will have issues with just pulling the plug as the only means of turning off the power to a system.

the shutdown -h now or shutdown -r now are great ways to turn off/reboot a Linux computer.

no different then

START > Log Off > Shutdown/Restart/Hibernate/ > OK in Windows.
 
Old 05-29-2008, 07:55 PM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by hammertime1983 View Post
Yeah I'm referring to the 'shutdown -h now' command and why it isn't a good idea in Linux to just pull the power plug...
That is bad on any OS, not just linux, because:

1.- it causes filesystem corruption, which depending on what you are doing at the moment can mean from some lost clusters which will only contain garbage, to a complete garbaged filesystem (as in "on, no, I lost all my files").

2.- it CAN seriously damage some devices if they are moving while you do such bestiality. Modern hardware is usually smart enough to prevent this. But it's not impossible to break something that way. In effect, I see all weeks some fried motherboard due to an electrical blackout. Turning the electrical supply off suddenly is exactly the same than an electrical outage, and electrical outages break hardware everyday.

I suppose you are just a lucky person if you are really asking this here.

Cheers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My Linux box does not shutdown i do when i do /sbin/shutdown -h now yawe_frek Linux - Hardware 6 09-14-2007 08:48 AM
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 08:38 AM
Linux full shutdown vs. manual shutdown? LQtoto Linux - General 9 01-26-2005 07:21 PM
Safe shutdown of external USB hard-drive? blixel Linux - Hardware 3 12-12-2003 01:57 PM
konsole shutdown possible? or key combo = shutdown possible? Laptop2250 Linux - Newbie 3 11-16-2003 11:44 AM


All times are GMT -5. The time now is 07:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration