URN Logo
UNIX Resources » Linux » Linux Forum » Miscellaneous » Page.5 » Unplugging the computer
announcement The content of this page is collected from Linux Forum, All copyrights and other associated rights are reserved by the original authors of the articles.
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.com
  LinuxForum General Chat
  Linux Advocacy
  LinuxForum Polls
  Introductions
  Linux Kernel Support
  Patch Management
  Development Release
  Linux Programming
  Linux Security
  Linux Software
  Linux Hardware Problems
    Linux Video Problems
    Linux Sound Problems
  Linux Networking Support
  Linux Printing Support
  Linux Human Interface Devices Support
  Linux Data Storage Support
  Linux Applications Support
  Linux Installation Support
  Linux Laptops Support
  Linux Motherboard, Chipsets, CPU, Memory
  Miscellaneous
  Debian Linux Support
  Ubuntu Linux Support
  LiveCD Discussions
  Gentoo Linux Support
  Mandrake Linux Support
  Redhat / Fedora Linux Support
  Slackware Linux Support
  SuSE Linux Support
  CentOS Linux Support
  Linux Web Servers
  Linux DNS Servers
  Linux Database Servers
  Linux Email Servers
  Linux FTP Servers
  Linux Squid Proxy Server
  Linux Samba Help
  Linux cPanel Help
  Linux Ensim Help
  Linux Plesk Help
  Linux Webmin / Usermin Help
  Qmail Toaster Help
  Linux Games
  Windows Game Emulation
  Linux Discussions
  General Linux Discussions
  Red Hat Linux Discussions
  More Red Hat Linux Discussions
  Mandrake Linux Discussions
  Slackware Linux Discussions
  SuSE Linux Discussions
  Debian Discussions
  Samba Help
  Linux Security
  Linux Networking
  Gentoo Help
  Operating System Rant Forum
  Hardware Rants
   
Unplugging the computer
Subject: Unplugging the computer
Author: hyperutila    Posted: 2006-08-26 19:56:14    Length: 665 byte(s)
[Original] [Print] [Top]
Whenever our computer, running Ubuntu 6.0 on a 500 MHz AMD Athlon freezes, my brothers, or my dad, have the tendancy to reach down and unplug the computer, not knowing what else to do. This usually messes things up, sometimes to the point of having to reinstall the distribution and all of the software. Most of the time, I just have to perform an fsck and then everything's good. In any case, I think I've explained to them that it's bad to do that, but what happens when there's a power outage? Should I have to lose all of my information and have to reinstall everything whenever the power goes out? There has to be a better solution to this.
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: TrickyRic    Posted: 2006-08-27 06:52:54    Length: 734 byte(s)
[Original] [Print] [Top]
the file system should usually only be damaged if write operations are in progress at the time. even at that, unless your writing to system files very little damage should occur (please note its still not recommended to just kill the power regularly).

so long as you only ever login as a user and use the su command when root privileges are required, write access to system files will be kept to a minimum. that said, i'vevery little experience with ubuntu and its ways.

i always recommend computers be attached to a surge protector, as i live in an area prone to regular power surges, but if an actual power cut occurs there's not much you can do other than purchase a very expensive backup generator.
----
Laptop: 2GHz Acer Aspire 9301AWSMi, 1GB DDR2, 17" TFT, 256MB GeForce Go 6100
Sold Development System:
2GHz AMD Opteron 246, Socket 940 Asus K8N-DL
Server System: 1.2GHz AMD Athlon, Socket 462 Apollo KT133 VT82C686
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: pa4wdh    Posted: 2006-08-27 08:56:19    Length: 1,062 byte(s)
[Original] [Print] [Top]
Hi,

I think the best way is to find out why the system freezes :-) It shouldn't happen that ofter (ideally never :-) ).

But serious: An easier way is to push the power button for a few seconds, this will turn of most systems, but this still doesn't prevent damage to files.

If you know this is going to happen frequently, see if you can use a journaling filesystem. These filesystems keep logs of whatever happens on the disk. When you boot the machine, it can check if everything that's in the log also really happened on the disk. This has 2 advantages:
- It's MUCH quicker than checking the whole disk
- It's less likely that you loose data

Filesystems with this functionality are (among others) etx3 and reiserfs. I usually use reiserfs, but ext3 should also handle the job.

Just in case: Changing to an other filesystem usually means formatting and reinstallation, and so losing all data you didn't backup before you started.

Best regards,
pa4wdh
----
The biggest difference between M$ stuff and the rest ? Most stuff is secure by design, M$ stuff is secure by accident.

bash# killall gaim
killall: Don't shoot the messenger !

If we have /dev/powerbutton, what would touch /dev/powerbutton do ?
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: hyperutila    Posted: 2006-08-27 15:55:38    Length: 1,339 byte(s)
[Original] [Print] [Top]
Hmm...thanks for your input. I rarely log in as root, and most often do just use sudo, though sometimes I switch to root if I know that I'm going to be doing a number of commands that require it. But...I don't think that any of the times that the file system got damaged happened while in root, or while the computer was writing any files. It has happened 3 times that I can think of. The first time was while using wine to run an older windows 95 program. The second was while using DosEmu with FreeDos. And the third, the only thing running was the OS. It seems like there's a relation to emulators and filesystem corruption. Though maybe not. The third time, the only thing that happened was that the mouse started acting weird. It didn't even freeze. But my brother couldn't shut down the computer with the mouse, and, not knowing an alternative, unplugged the computer. That one messed up the filesystem, and after an fsck, the X Display Manager was corrupted. So, as far as I know, there weren't any system files currently being written to when the computer was unplugged. Does anyone have an idea about why its so unstable? Oh, and it is and ext3 filesystem. It doesn't seem to me like it should completely mess up the computer to the point where it doesn't boot right just from that. Thanks!
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: TrickyRic    Posted: 2006-08-28 13:10:19    Length: 1,972 byte(s)
[Original] [Print] [Top]
Quote
I rarely log in as root

...thats good, but to be blunt its not really good enough Wink. unix file access permissions depend entirely on user permissions. for example, even if only read access is required on a file, if you open that file up from a superuser account without explicitly telling the editor to open in read mode then it will simply be opened in read-write mode. usually this isn't a problem but poorly written functions with minimal error trapping etc. in a specific software running from a superuser environment can accidentally damage system files and shared libraries by parsing writable data through them. a good example of this would be the older kde builds - back in the days of kde 1/2 if you logged in as root into a kde environment you could be pretty sure fsck would show errors upon the next bootup, and kde itself would prove far less stable than if logged in as a regular user.

also worth noting is, again due to the way access permissions work in a unix environment, if you were to somehow grab malicious software while say... browing the web or reading emails, such software simply wouldn't have the permissions to damage the system in any great way so long as you were logged in as a user at the time, as all softwares take on the permissions of the owner account and group - thus its considered insecure to login as root. generally gnu/linux is a secure and stable operating system, but no system can remain secure and reliable if its users don't.

having said all that, it does sound more like the softwares your running are causing instability - not the fact that your killing the power once such softwares have crashed out. in other words the problems are already in place prior to your shutting down, regardless of the way in which you do so.
----
Laptop: 2GHz Acer Aspire 9301AWSMi, 1GB DDR2, 17" TFT, 256MB GeForce Go 6100
Sold Development System:
2GHz AMD Opteron 246, Socket 940 Asus K8N-DL
Server System: 1.2GHz AMD Athlon, Socket 462 Apollo KT133 VT82C686
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: pa4wdh    Posted: 2006-08-28 13:37:35    Length: 372 byte(s)
[Original] [Print] [Top]
Hi,

If the crashes are really this random, i think it's usefull to test your memory. Many distro's provide memtest86 in the boot menu, and else you can download bootable cd images here: http://www.memtest86.com/

Try running this for a long time (overnight for example), and see if it returns any errors.

Best regards,
pa4wdh
----
The biggest difference between M$ stuff and the rest ? Most stuff is secure by design, M$ stuff is secure by accident.

bash# killall gaim
killall: Don't shoot the messenger !

If we have /dev/powerbutton, what would touch /dev/powerbutton do ?
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: hyperutila    Posted: 2006-08-28 15:41:53    Length: 396 byte(s)
[Original] [Print] [Top]
Okay, thanks! What do I do if it does return an error? Or, from the previous post, if the problem's already there, what caused it? All of the crashes happened while logged in as a user, not as root. The only times that I have file system problems are after the computer was shutdown wrong. That seems to indicate to me that the problem is caused by the improper shutdown and not prior to it.
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: KenJackson    Posted: 2006-08-29 05:34:33    Length: 528 byte(s)
[Original] [Print] [Top]
Quote from: pa4wdh
An easier way is to push the power button for a few seconds,...

This is the key.  If you just press the power button on most PCs, nothing will happen.  It's not obvious to, but you have to press and hold the power button for 5 seconds (I think it's 5) to turn power off.  This works even if the PC is crashed because there is no software involved.

Some PCs let you change this in BIOS to allow instant off.
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: TrickyRic    Posted: 2006-08-29 13:10:21    Length: 511 byte(s)
[Original] [Print] [Top]
Quote
If you just press the power button on most PCs, nothing will happen.  It's not obvious to, but you have to press and hold the power button for 5 seconds (I think it's 5) to turn power off.

...this is a feature of all acpi enabled motherboards. to kill power you hold for x seconds. if you enable acpi in your bios and apic in your kernel boot string, hitting the button just once will perform a complete and proper shutdown.
----
Laptop: 2GHz Acer Aspire 9301AWSMi, 1GB DDR2, 17" TFT, 256MB GeForce Go 6100
Sold Development System:
2GHz AMD Opteron 246, Socket 940 Asus K8N-DL
Server System: 1.2GHz AMD Athlon, Socket 462 Apollo KT133 VT82C686
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: pa4wdh    Posted: 2006-08-29 14:16:54    Length: 239 byte(s)
[Original] [Print] [Top]
Quote
Okay, thanks! What do I do if it does return an error?
If memtest86 returns an error, it is very likely that one of your memory modules is faulty, and you should replace it.
----
The biggest difference between M$ stuff and the rest ? Most stuff is secure by design, M$ stuff is secure by accident.

bash# killall gaim
killall: Don't shoot the messenger !

If we have /dev/powerbutton, what would touch /dev/powerbutton do ?
[Original] [Print] [Top]
Subject: Re: Unplugging the computer
Author: hyperutila    Posted: 2006-08-29 21:41:16    Length: 17 byte(s)
[Original] [Print] [Top]
Alrighty, thanks!
[Original] [Print] [Top]
« Previous thread
Syntax
Miscellaneous
Page. 5
Next thread »
Library dependancies.
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
Powered by FreeBSD    webmaster: webmaster@unixresources.net
This page created on 2007-08-01 12:00:09, cost 0.042545080184937 ms.