LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Safe Shutdown (https://www.linuxquestions.org/questions/linux-newbie-8/safe-shutdown-645513/)

hammertime1983 05-29-2008 01:38 AM

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.

ronlau9 05-29-2008 04:34 AM

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

dieduster 05-29-2008 06:15 AM

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.

hammertime1983 05-29-2008 07:13 AM

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...

mrrangerman 05-29-2008 08:01 AM

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.

kummiliim 05-29-2008 08:12 AM

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 : ).

H_TeXMeX_H 05-29-2008 02:23 PM

Quote:

Originally Posted by hammertime1983 (Post 3168033)
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.

masterclassic 05-29-2008 03:21 PM

I'm afraid pulling the power plug could even damage electronic parts as well as the power supply.

lleb 05-29-2008 04:11 PM

Quote:

Originally Posted by hammertime1983 (Post 3168033)
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.

i92guboj 05-29-2008 06:55 PM

Quote:

Originally Posted by hammertime1983 (Post 3168033)
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.


All times are GMT -5. The time now is 03:52 PM.