[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fast shutdown without filesystemcheck on next boot?



> Hi,
> 
> I trying to find a way to shut down my laptop
> *really* quick (1 - 2 seconds) from the console.
> 
> I can't wait until all processes have died. What I
> want to do is "sync" - "close all open filehandles"
> "umount" "poweroff"
 
Why not hibernate?  Then you don't have to close anything or even change
the state of your apps.  Your computer has to scribble its memory to disk,
but since you've never -shut down- there's no need to fsck on resume.

Standard suspend would be even faster, but most computers have to eat a 
little juice to maintain memory when you do that.  A pal of mine gets about
18 hours on suspend (well, okay, that's idealism - 18 hours is a full tank,
but you use some juice when in normal mode - he gets 2-3 hours out of 
his batteries in active mode, towards the lesser end if graphical).

In short, if you need it down for only a couple of hours, to reawaken fast
when you get to say, a board meeting - suspend is -*muuuuuuuuuuuuuuuuuuch*-
better than any half-assed attempt to shut down super-fast.

What model of laptop is it... HP Omnibook 800 had a really cool feature
of keeping itself in SRAM - which meant, no diff between suspend and true
hibernate.  SRAM always fresh, blinks to life in a moment's time with no
lossage, no matter how many hours later.

> the problem is that unmount often says that 
> some filesystems are busy. So next time I boot I
> have to do a filesystem check which is really annoying.
 
Because apps that are still running, their binaries are busy, and so are 
shared libraries.

> So how do you force an unmount of a filsystem
> (in a consisten state) even if the processes
> which access the fs haven't died yet? 

bad idea...

> Is there any
> other way to quickly poweroff without getting
> an inconsistant fs? 
 
I've seen talk of people using journaling filesystems, which shouldn't need
fscking because if they have errors, they apply rollback logic.  Crashing it
(by shutting poweroff without telling it so) would still be bad, just not AS
bad.

Learn to use suspend effectively, and you won't need to torture yourself like
this.  A pal of mine gets about 18 hours on suspended mode (machine is live
but not eating much) - only about 2 to 3 when active - when he suspends it
takes hardly a moment, and when he resumes, I dunno, maybe a second, but 
there certainly isn't a flurry of bootup activity; it's already running, so
it's right where it was.

Add 
	append="apm=on"

to your /etc/lilo.conf and APM support will be awakened in your kernel.
It defaults to off merely because an occasional desktop is allergic to it.
Run apmd and go in good health.

> Thanks a lot
>  Ron

-* Heather Stern * star@starshine.org *-


Reply to: