LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-03-2002, 12:48 PM   #1
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Exclamation Startup/Shutdown


I don't have a Power button on my LinuxBox. In order to turn on or off my computer
I have to just flip the power switch.

Now, sometimes I don't do a "proper" shutdown, and just flip the switch from
right inside KDE.

When the system boots the next time it takes an extra minute or 2 while it checks
the drive to make sure there are no errors.

How do I disable Linux from checking it?

Oh, I am running mandrake 8.0/KDE.

Last edited by MasterC; 05-03-2002 at 12:49 PM.
 
Old 05-03-2002, 01:13 PM   #2
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
There are two very easy steps:

1) Shutdown properly.

2) If you forget/can't/don't shutdown properly, wait for the fsck (file system check) process to finish -- it's trying to figure out if something went wrong during the last improper shutdown.

You can skip these steps only if you move to a different filesystem, such as ext3/ReiserFS/etc., that does journaling, but even then there are no absolute guarantees !
 
Old 05-03-2002, 05:02 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
erm, you could stop it checking the systems on boot by replacing the numebrs at the end of the relevant line in /etc/fstab to "0 0", but that's a VERY stupid thing to do, and someone who sees fit to do that deserves every FAT corruption they deserve. it's not reasonable to expect a computer to happily survive for ever by pulling the plug literally.
 
Old 05-03-2002, 05:45 PM   #4
shoot2kill
Member
 
Registered: Jan 2002
Location: California
Distribution: Red Hat
Posts: 402

Rep: Reputation: 30
Re: Startup/Shutdown

Quote:
Originally posted by MasterC
ASUS A7M266 DDR
AMD 900Mhz
640MB DDR PC2100
32MB ATI RAGE FURY PRO
Creative SoundBlaster Live! MP3 +5.1
Dual Boot Mandrake 8.1/WinXP
Is your PC or mother board ACPI compliant??? Are you able to do a proper shutdown when you boot into windows?
 
Old 05-05-2002, 09:34 PM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
hmm, correct me if i'm wrong, but the halt command usually just halts the os even on computers that DO switch themselves off when the os shuts down, (to actually turn off the machine, you have to call 'poweroff' or 'shutdown -h now' or select 'halt' from the graphical login screen for x) all you really have to do is issue a halt command, wait for the OS to shut properly down, THEN it will be safe to switch the computer off, the only thing different is it simply says "system halted' (or something like that) instead of a "it is now safe to switch off your computer" splash screen like in mac or windows, give it a try

Last edited by frieza; 05-05-2002 at 09:36 PM.
 
Old 05-05-2002, 09:57 PM   #6
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
Yo, MasterC, why you don't wanna turn off your computer the right way?, too lazy?,
Besides doing the shutdown command, you can just reboot, and as soon as you do it then you can pull the plug.
The problem is that while your computer is running normally, the heads on your hardrives are not in a shutdown position. You see, your hardrive never stop spinning when your computer is on, but the head do stand still at time when there is nothing being read or written onto the hardrive. When you shutdown properly, your computer sends orders to the hardrive that it's gonna shutdown, and the heads are positioned in shutdown position (away from the hardrive), and when your computer is working normal it's ontop of the hardrive disks. If you just pull the plug out, the heads remain there ontop of the disks. The problem is that these heads are flexible because they have spings that help move them. If the heads are powered down, these spring can slowly give up stretch. If this happens, and your heads are ontop of the disk, this will cause a major head crash in your hardrive when you turn your computer on, because the heads will be touching the hardrive disks. And of course, because hardrive manufactures know this, they make very good springs and inside parts...you would hope at least, but even highly unlikely...you do it enough times and it will happen. It may depend on what kind of hardrive you have.
Anyway, really you don't want to keep shutting down the hardway.

zLinuxz
 
Old 05-07-2002, 01:08 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Thanks for all the replies. I am not using the PC that is in my signature line. I am using an ultra cheap mobo with ultra cheap parts. I am not sure what "ACPI" is.

See I don't have a screen, or a mouse. I use this PC as an MP3 Player in my truck. All I do is play MP3's with it. But it's hard to issue a shutdown or any command while I am driving. I use XMMS and can press "B" to go to the next track, but that's about it. Oh and "X" to get it playing. If I do issue a shutdown command, it has to be once I have stopped and am in the driveway. So then I have to wait the 30 or 45 seconds for the PC to shutdown before I can shutoff the Power Inverter and finally the truck.

The only thing I use the hard drive for is to play MP3's.

If anyone knows an easier way to do this and still be able to switch songs with 1 button commands, please let me know. I don't know how to make MACROS so I can't use a 1 button shutdown either. That would be just fine if I could do something like that.

Thanks for any more suggestions.
 
Old 05-07-2002, 04:10 AM   #8
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well the main thing that goes wrong is when it's still trying to write to the drive when you shut it down cold. Since it's just an mp3 player you could get away with only reading from the drive. Might even want to mount the drives in read only mode. If you are just reading from the drive then it shouldn't be a problem to shutdown cold and you can disable checking the filesystems on boot the way acid_kepie suggested.
The only thing that might get written to is /tmp and /var. You could get around that by making a ramdrive and mounting /tmp and /var there. Once you have gotten everything running properly you could probably turn off most of the error logging to save a lot of space in your ramdrive. You could even switch off syslog all together if you want. Depending on how far you've stripped down your linux distribution, the only other things that will be written to /var is just a few pid of several daemons that are running. Since you aren't shutting down properly anyways you wouldn't really need those either. But they take up practically no space at all so leaving them wouldn't be a disaster.
Just out of curiosity what kind of distribution are you running? And what kind of steps have you gone through to get it to boot up as fast as possible? Since it's just a dedicated mp3 player you can go quite far into skipping a bunch of stuff that is not needed.
 
Old 05-07-2002, 06:01 PM   #9
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
you do know how to issue a time delayed shutdown command, right?
shutdown -h (x minutes), just enter that in on a seperate virtual console for however many minutes you need for travel time, not quite an elegant solution, but it should work. another solution would be to chain the command to invoke the mp3 player and the shutdown command into the same line with a ';' eg
[user@hostname /directory]$ *mp3 player*; halt
someone correct me if i'm wrong, but the halt command shouldn't be carried out by the computer until the mp3 player quits so when driving all you have to do is issue a quit command to mp3 player which probably is a one button (or maybe two) command then the system will shut down automatically
 
Old 05-14-2002, 02:51 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Thanks for all the ideas, I have ended up going with the following config:

I still boot into X but this time into gnome instead, it seems to be about 3 seconds faster than KDE. Plus it has an option to set what programs start at boot. So I have an xterm starting up at 25 (whatever that means, I think microseconds) and then I have ran the command
xmms;reboot

And since this is the last command I ran, all I have to do on each consecutive boot is push the arrow up key and it runs the command again for me. Then about 5 seconds before I get to my driveway I press "ALT+F4" and it shuts down xmms and runs the command "reboot" and restarts the PC. I think I am going to take it 1 step further, instead of xmms;reboot I think I will run a xmms;shutdown -h But am not sure how to yet (unless that is the command, huh huh). Cool, thanks for all the great ideas.

By the way I am down to about a 25 second boot up time now! Not too bad from a minute and 10 or so.
 
Old 05-14-2002, 03:52 AM   #11
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Just a question, but why are you using X? If all you use it for is just an MP3 player then you don't need gnome and x for that. I'm sure you could get that 25 seconds to 10 or less if you don't use X and maybe a few other optimilisations.

The shutdown command usually needs a time attribute. You can use the 'now' keyword to make it shutdown instantly.
Ex. 'shutdown -h now'
 
Old 05-14-2002, 04:02 AM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Cool, thanks for the shutdown command. I boot into X because I know XMMS only uses 1 key to move from song to song, and to pause etc. mpg123 seems to want me to type the entire filename including path to get it to play a song. Unless I am wrong?
 
Old 05-14-2002, 04:17 AM   #13
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Why not use an interactive console mode mp3 player. This one seems rather nice http://www.stack.nl/~brama/mp3blaster/index.html

I'm sure there are more if you search around a bit.
 
Old 05-14-2002, 04:28 AM   #14
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
I had no idea things like this existed! Thanks a billion!!!
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
startup and shutdown script android6011 Slackware 3 11-03-2005 04:04 PM
hanging up on startup / shutdown labworker Linux - Laptop and Netbook 3 01-23-2005 05:56 PM
dm is ok at startup, but failed during shutdown spyghost Linux - Software 0 09-21-2003 07:29 AM
How to change startup/shutdown sounds? davidz10 Linux - General 0 04-15-2003 08:27 PM
Startup Items... can I shutdown Stephanie Linux - General 4 08-28-2002 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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
Open Source Consulting | Domain Registration