LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-13-2004, 12:21 AM   #1
Necronomicom
Member
 
Registered: Jun 2004
Distribution: Slackware, Solaris
Posts: 127

Rep: Reputation: 15
Can turning off the cpu without halting cause problems?


Im going to build a "router" using a old 468 computer with slackware for another person, all this computer does is when you turn it on it connects to the internet and shares the connection with the LAN.

So can the person turn it off without having to halt it via SSH?? Will it cause any problems like screwing the data tree, or making the boot time slower?
 
Old 08-13-2004, 12:45 AM   #2
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Usually any filesystem has to now be unmounted properly to avoid problems. How often are they going to have to shut it off? Mine's been "up" for about a month (had a power outage).
 
Old 08-13-2004, 12:46 AM   #3
WMD
Member
 
Registered: Jul 2004
Location: Florida
Distribution: Slackware, Debian
Posts: 484

Rep: Reputation: 30
As long as you use ext3 or reiserfs filesystems, turning off while running won't hurt the system. With ext2, it has to run fsck after rebooting, which takes forever.
 
Old 08-13-2004, 01:03 AM   #4
lucho
LQ Newbie
 
Registered: Nov 2003
Distribution: Slackware 10.2
Posts: 22

Rep: Reputation: 15
Yes, use ext3. (or reiserfs, or xfs, but ext3 is probably simplest) I got exactly that and keep turning it off while running several times a day. No problems, ever. Speaking from experience, you probably have to look out for two problems: My CMOS memory battery died recently (after 10 years, maybe?) so it probably makes sense to change your battery now. Second is, most old computer will halt on keyboard errors, so you need to keep a keyboard connected, or do something creative.
 
Old 08-13-2004, 01:41 AM   #5
Necronomicom
Member
 
Registered: Jun 2004
Distribution: Slackware, Solaris
Posts: 127

Original Poster
Rep: Reputation: 15
Its likely to be shut down everynight before they stop using the internet or go to sleep, leaving it own forever isn't such a great idea because many crappy power supplies break if you leave it own for some months without turning it off.

I know about the keyboard problem with some of the older machines, they wont boot unless you have a keyboard, in that case im going to plug a keyboard in it.

hmmm I got a idea, since the machine is likely to have a keyboard, is there any way to make a script where whatever i press a key it halts the computer (without having to log in it)? that would solve the problem.
 
Old 08-13-2004, 02:32 AM   #6
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I think the problem would be solved by buying a router, they are $20 now.

But whatever works for you.

Also, no matter what FS you use, there is always a danger when powering off without halting and unmounting the file system.

I have lost power on ReiserFS systems and have had them unbootable after power returned.

Your only safe option would be to never mount the volumes RW in your boot scripts, or better yet, run the entire thing from a read-only Compact Flash card.

Last edited by MS3FGX; 08-13-2004 at 02:34 AM.
 
Old 08-13-2004, 02:43 AM   #7
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
You can make a script to ssh into the pc with the halt command, ie make executable a file with:
Code:
#!/bin/sh
ssh root@XXX.XXX.XXX.XXX halt

Last edited by gbonvehi; 08-13-2004 at 02:47 AM.
 
Old 08-13-2004, 02:46 AM   #8
WMD
Member
 
Registered: Jul 2004
Location: Florida
Distribution: Slackware, Debian
Posts: 484

Rep: Reputation: 30
Exclamation

Quote:
Originally posted by Necronomicom
leaving it own forever isn't such a great idea because many crappy power supplies break if you leave it own for some months without turning it off.
Unless you replaced the one in that machine...old power supplies are much more reliable than newer ones. I have a Pentium 1 machine with a ~1994 power supply that runs for months on end with no failure. (Turned it off for other reasons)
 
Old 08-13-2004, 02:59 AM   #9
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
I've a better put this lines in rc.local:
Code:
                                                                                                                                                           
echo 'Shutdown? (Y/N)'                                                                                                                                           
read sure                                                                                                                                                            
case $sure in                                                                                                                                                        
  "y" ) halt
esac                                                                                                                                                                                                                                                                                                                           
case $sure in                                                                                                                                                        
  "Y" ) halt
esac
If you press the Y it'll shutdown, else it'll continue to boot, if you put this in rc.local the machine will boot (this includes all the init scripts), but it'll then wait until you press Y to shutdown or else to continue boot.

EDIT: A better script, this will shutdown if you press Y or y but also you can type some other letters, as long as there is a Y before pressing enter it will shutdown:
Code:
echo 'Shutdown? (Y/N)'                                                                                                                                           
read sure
if echo "$sure" | grep -i "y"
then
    halt
fi

Last edited by gbonvehi; 08-13-2004 at 03:08 AM.
 
Old 08-13-2004, 03:30 AM   #10
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
A read only filesystem is the way to go here. A floppy bootable floppy system would be ideal, that's the way I did it with a 486 before. Three NICs, a keyboard, and a bootable FreeSco router distro on a floppy.

--Shade
 
Old 08-13-2004, 05:00 AM   #11
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Hey if computer need to shutdown ' everynight before they stop using the internet or go to sleep'

The best idea IMHO is to add a crontab like :

00 24 * * * /sbin/poweroff

So the computer shutdown cleanly every day at midnight
 
Old 08-13-2004, 12:23 PM   #12
suslik
Member
 
Registered: Jul 2004
Distribution: OpenSuse 10.x
Posts: 262

Rep: Reputation: 30
Quote:
Originally posted by Shade
A read only filesystem is the way to go here. A floppy bootable floppy system would be ideal, that's the way I did it with a 486 before. Three NICs, a keyboard, and a bootable FreeSco router distro on a floppy.
--Shade
Shade has a point about the read-only. Plus, there are a lot of micro "router" distros that you can use right out of the box.
http://www.linuxrouter.org/ - Linux Router Project immediately comes to mind.
 
Old 08-13-2004, 03:20 PM   #13
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Well, the best way to handle shut down of machine would be so create a script that ping scans it's subnet every few minutes, and shuts itself down when the scans show that is is the only active computer.

That way, after all the other computers are off, it will turn itself off soon after.
 
  


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
CPU fan speed/Turning off APM dangerousdave Linux - Hardware 1 10-18-2005 09:06 PM
Help please... System Halting!?! MadLogic Linux - Software 2 07-21-2005 08:16 AM
halting problem help me navaladi Mandriva 3 02-01-2005 05:05 AM
Problems Logging Out/ Halting sutley Linux - Software 1 07-06-2004 03:42 PM
halting reepark Linux - Newbie 1 08-13-2002 01:51 PM


All times are GMT -5. The time now is 04:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration