LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shutdown issues... (https://www.linuxquestions.org/questions/linux-newbie-8/shutdown-issues-363310/)

Superion 09-14-2005 10:53 AM

Which Linux distros require "proper shutdowns"?
 
Hiya folks (it's been a while)!

As a recap: I've been playing around with the MEPIS LiveCD for a while now on one of my older computers, and I'm just about ready to try installing it. But first, an important question.

On another computer, I have WindowsXP. I noticed that it's been acting glitchy (again!)...Two of my games wouldn't work, and some of the photos I had on my disk looked color-garbled and/or mish-mashed in places. Last night I actually wound up having to reinstall because some operating file got corrupted! To make a long story short, I'm fairly certain I don't have a virus (thanks to AVG); I'm thinking this problem was caused by me losing power and not being able to shut down properly (We lose power on a regular basis in my area). Since the system has to close out processes and, more importantly, write some of the stuff in its memory to disk, bypassing a proper shut down can wreak havoc on your file allocation table (or so I've been told).

I've heard that some distros of Linux have this same issue: they need to save things to disk and properly terminate some processes before closing. I've also heard others don't. Would anyone happen to know which distros have this liability and which don't? Since I'm already sort of enjoying MEPIS, my next question is, even if your particular distro HAS this weakness, is there some workaround (a application, etc) that would allow you to avoid it?

THANKS!

gnukish 09-14-2005 11:20 AM

Safe unmounting will be the best bet.
Topic title isn't appropriate , change it ;)

Charred 09-14-2005 11:46 AM

It depends more on what filesystem you use, rather than what distro you use. If you're using a non-journaled file system, such as ext-2, your filesystem is more vulnerable to sudden power loss than it would be with a journaled fs such as ext-3 or reisers.

That said, the only way to really solve your problem is to get a UPS.

Superion 09-14-2005 01:30 PM

Quote:

Originally posted by gnukish
Safe unmounting will be the best bet.
Topic title isn't appropriate , change it ;)

I can't change the topic title, only my own subject title. Sorry! Do you find what I used offensive, or merely too vague? Just curious. THANKS!

Superion 09-14-2005 03:55 PM

Quote:

Originally posted by gnukish
Safe unmounting will be the best bet.
I just had a thought about what you said. I'm assuming that if your drives are unmounted, then you don't have to worry about the "proper shutdown" issue I'm talking about. So if that's the case, is there a way to set some sort of time limit (like on your screen saver) where after a certain amount of time with no activity, Linux will dismount all your drives?

THANKS in advance!

michaelk 09-14-2005 07:18 PM

You can not unmount /. If your area has frequent power outages then your best solution would be to purchase an UPS. An UPS will also prevent your hardware from being damaged.

A Journaling filesystem will help prevent corruption and recover faster from a power outage but it will but not prevent data loss.

AwesomeMachine 09-14-2005 09:12 PM

I would like to say, in a kind way, that MS Windows XP has no file allocation table. NTFS uses meta data called the "master file table" to keep track of files. Also, when you get a corrupt windows installation, you can either boot into recovery console from the Windows CD, or launch a shell prompt if you can boot into Windows, and, with the Windows CD in the drive, run <sfc /scannow> This will check every system file to see if it has been corrupted, If so, it will replace the file with either one on the CD, or from the update backup it made when the file was installed from an update.

I compliment the user who indicated the importance of file system journaling. Do not use ext2. If you have ext2 there is way to compile support for ext3 into the kernel, and change the file system to ext3. This leaves all files intact, and adds the security of journaling to the file system. In the unlikely event the system is actually replaying the journal on boot up, correcting an incomplete journal, and you lose power right then, you will have a mess.

NTFS, which is used in MS Windows XP is a journaling file system. If you continuously terminate power suddenly, especially during boot up, you can scramble a Windows XP installation. The aforementioned command can put it back. Linux has fsck. There are specific versions of fsck for ext3 and reiserfs file systems. The system runs a lightweight set of switches for fsck every time the system boots. If the system was shut down incorrectly, the journal is replayed and corrected. in SuSE linux the reiserfs file system is very stable. In others, such as debian, the ext3 file system is a better choice.

Superion 09-15-2005 12:26 AM

Quote:

Originally posted by AwesomeMachine
I would like to say, in a kind way, that MS Windows XP has no file allocation table. NTFS uses meta data called the "master file table" to keep track of files.


Bear with me, I have to correct you: I don't use NTFS...I use FAT32. That may have something to do with it. Then again, it's possible what you're saying refers to FAT32 as well...I couldn't say, myself. :-D

Quote:

Also, when you get a corrupt windows installation, you can either boot into recovery console from the Windows CD, or launch a shell prompt if you can boot into Windows, and, with the Windows CD in the drive, run <sfc /scannow> This will check every system file to see if it has been corrupted, If so, it will replace the file with either one on the CD, or from the update backup it made when the file was installed from an update.
Good grief, I wish I knew about that command before I wound up reinstalling XP on my main system...might would've saved me a lot of heartache! :-S Oh, well; live and learn.

Quote:

I compliment the user who indicated the importance of file system journaling. Do not use ext2. If you have ext2 there is way to compile support for ext3 into the kernel, and change the file system to ext3. This leaves all files intact, and adds the security of journaling to the file system. In the unlikely event the system is actually replaying the journal on boot up, correcting an incomplete journal, and you lose power right then, you will have a mess.

NTFS, which is used in MS Windows XP is a journaling file system. If you continuously terminate power suddenly, especially during boot up, you can scramble a Windows XP installation. The aforementioned command can put it back. Linux has fsck. There are specific versions of fsck for ext3 and reiserfs file systems. The system runs a lightweight set of switches for fsck every time the system boots. If the system was shut down incorrectly, the journal is replayed and corrected. in SuSE linux the reiserfs file system is very stable. In others, such as debian, the ext3 file system is a better choice.
Ah. So, like someone else said, the only REAL way to avoid these situations is to get a UPS (that may be a while).

Unfortunately, because I'm looking for maximum compatibility, I'll probably have to stick with FAT32. I'll have mainly Linux at home...but my workplace uses Windows, and I'd like for computers on both platforms to read my files. So unfortunately, that's that. I may also just have start shutting things down when they're not in use.

b0nd 09-15-2005 04:05 AM

Quote:

Originally posted by Superion


Ah. So, like someone else said, the only REAL way to avoid these situations is to get a UPS (that may be a while).


what i would suggest is.......you must use UPS otherwise it may damage your hardware too.
i've seen cases of hard disk crash, motherboard problems..with power failure.
and obviously if you will be having UPS.......you won't be fear of improper shutdown

regards


All times are GMT -5. The time now is 10:20 PM.