23.11.2014, 13:47 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
anvilhead
Titel: Live CD: Is shutdown necessary?  BeitragVerfasst am: 21.05.2006, 23:30 Uhr



Anmeldung: 12. Mar 2006
Beiträge: 91
Wohnort: Canada
Hi dudes,

When running from a live Kanotix CD, is it really necessary to wait for the system to "shut down"? If you've mounted any writeable devices, couldn't you just do a sync (as root) to save any data, umount everything, then just turn off the machine?

Cheers, a.

_________________
I'd rather have Kanotix
Than a houseful of narcotics
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel: Live CD: Is shutdown necessary?  BeitragVerfasst am: 21.05.2006, 23:42 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16295

When everything is umounted you can switch off.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
slh
Titel: Live CD: Is shutdown necessary?  BeitragVerfasst am: 22.05.2006, 00:21 Uhr



Anmeldung: 16. Aug 2004
Beiträge: 1905

Although ensuring that really all writeable media is properly umounted definately takes longer than just issuing a proper shutdown... (and it's always bad practice to just yank the power cord, even if it doesn't hurt badly if the conditions depicted above are valid)
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
anvilhead
Titel: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 23.05.2006, 03:58 Uhr



Anmeldung: 12. Mar 2006
Beiträge: 91
Wohnort: Canada
Zitat:
slh > Although ensuring that really all writeable media is properly umounted definately takes longer than just issuing a proper shutdown...


Not if you haven't mounted anything. :?)

Zitat:
slh > (and it's always bad practice to just yank the power cord, even if it doesn't hurt badly if the conditions depicted above are valid)


Sure, that's what I'd usually think. But when you power down a live-CD session, you're "pulling the plug" on your boot drive (RAMdisk) even when you do let the shutdown finish.

So, while I am enough of a geek to enjoy the display of shut-down progress messages, there are times when I'd rather have the extra 30 seconds or so to do other things. I just wanted to be sure I wasn't overlooking any technical reason not to do it.

Cheers, a.

P.S.: Hey, I just "Vorschau'd" my message before "Absenden-ing" it. :?D

_________________
I'd rather have Kanotix
Than a houseful of narcotics
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
brodders
Titel: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 24.05.2006, 15:19 Uhr



Anmeldung: 15. Jan 2005
Beiträge: 107

Hi..

if nothing is mounted, powerdown should be safe. But people are things of habit... get used to doing that, and one day you might do it whilst something IS mounted.

If you mount and do a sync, beware that sync timing / buffer flushing is at the fancy of the system. I have known a 30 sec delay from command to disc activity.

And what about Union fs? Does sync aggregate changes and write them out? I hope so, but I don't know.

Hm. If anything had been mounted, I'd follow the usual shutdown process.

brodders
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
craigevil
Titel: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 24.05.2006, 21:05 Uhr



Anmeldung: 29. Mar 2005
Beiträge: 96
Wohnort: Terra
Depend on whether you have anythiing on HD mounted. My wife uses a LiveCD on an old laptop and just hits the power button all the time never had any problems.

But all she really uses it for is to get online.

_________________
Easter Rc4 IceWeasel 2.6.18.3-slh-up-1
How to Learn and Use GNU/Linux
My Debian sources.list
 
 Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen Yahoo Messenger MSN Messenger ICQ-Nummer 
Antworten mit Zitat Nach oben
anvilhead
Titel: Re: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 25.05.2006, 00:16 Uhr



Anmeldung: 12. Mar 2006
Beiträge: 91
Wohnort: Canada
Zitat:
brodders > If you mount and do a sync, beware that sync timing / buffer flushing is at the fancy of the system. I have known a 30 sec delay from command to disc activity.

You mean sync keeps running in the background after the command line comes back to you?

Zitat:
craigevil > Depend on whether you have anythiing on HD mounted. My wife uses a LiveCD on an old laptop and just hits the power button all the time never had any problems.

That sounds like something my wife would do, even if she wasn't supposed to. (A Master's in education, and she can't connect a VCR to a TV... :?)

_________________
I'd rather have Kanotix
Than a houseful of narcotics
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
brodders
Titel: RE: Re: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 26.05.2006, 11:42 Uhr



Anmeldung: 15. Jan 2005
Beiträge: 107

Zitat:

Zitat:

brodders > If you mount and do a sync, beware that sync timing / buffer flushing is at the fancy of the system. I have known a 30 sec delay from command to disc activity.

You mean sync keeps running in the background after the command line comes back to you?


..yes.

Well, sync isn't running - but the jobs it creates are placed as tasks on the scheduler, as per usual.

They run when the schedular can get to them - which may be sooner ... or it may be later. sync does not come with a "finished in X seconds" guarenttee.

Don't forget, these systems were NOT originally designed for GUI / human interaction - and they do not anticipate loosing power; so sync assumes the machine will be up for an extended period. It's under no pressure.

Some buffer operations can be long esp. if running a complex database. sync will issue the correct commands as needed to the fs, but all those jobs are ordinary scheduled jobs Smilie

In practice you would be OK 90%+ of the time, but again - I've seen delays into 10's of seconds from giving a command to the system writing to disk. It depends utterly on hardware, tasks, other jobs etc etc.

Perhaps this was why the suites of controlled shutdown code were written??

brodders
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
anvilhead
Titel: Re: RE: Re: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 26.05.2006, 22:13 Uhr



Anmeldung: 12. Mar 2006
Beiträge: 91
Wohnort: Canada
Zitat:
Well, sync isn't running - but the jobs it creates are placed as tasks on the scheduler, as per usual... They run when the schedular can get to them - which may be sooner ... or it may be later. sync does not come with a "finished in X seconds" guarenttee.

What? Unless a job is specifically run in the background, I always though that the prompt's reappearance indicated that the job was finished. You're saying that's not true?

What about unmounting a drive via KDE's context menu? Are you saying that the "mounted" symbol may be removed from the drive's icon before the drive is actually unmounted? Ack---how can we ever feel safe removing a USB drive? Shouldn't that be pushed to the top of the Urgent Bugs list?

Zitat:
Perhaps this was why the suites of controlled shutdown code were written??

Do I sense some resistance to this topic? That would be funny, because command-line users have always been obsessed with the most efficient, time-saving ways to do everything. I find it hard to believe that people who spend days writing two-letter script commands would be interested in waiting around for a RAM-based session to print all of its "shutdown" details... unless---dare I say it?---the GEEK FACTOR is in effect!

Seriously, though. Let's assume I unmount (not just sync) any physical storage I've mounted. Then, when I "shut down" the system, am I really required to sit there like somebody in a Star Trek episode, watching all those important-looking system messages scroll by? Do I get to say things like, "Captain, a Romulan Bird of Prey has decloaked off the starboard bow!"?

(At this point, I suppose I could also mention those Knoppix startup/shutdown soundfiles, but there's no need to be cruel... Lachen )

_________________
I'd rather have Kanotix
Than a houseful of narcotics
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
brodders
Titel: Re: RE: Re: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 26.05.2006, 23:45 Uhr



Anmeldung: 15. Jan 2005
Beiträge: 107

Hi anvilhead,

...what I have quoted is the benefit of my limited experience, rather then having read through the kernel code.

And the observation that, after issuing a sync command, disk activity is not always instant.


There may be other reasons for this. For example, filesystem devices might have lied to sync. Imagine that system RAM buffers are flushed to drive hardware, but the drive is managing it's own cache (most drives have 2M cache, often more). It says to sync "OK, I've got that" - not wrong, it's in firmware RAM - but is it on the drive platter yet?

That cache is flushed to disk - when? Does sync do that - does it tell hardware to flush to disk or does sync tell *nix managed RAM buffers to write to the device?

I know that shutdown routines will command the hardware to flush all firmware buffers onto platter.

I cannot confirm that sync will do that; I would like to think so.

What about high level applications? I cannot confirm that anything managed by a high level application (e.g. wordprocessor) will respond to sync. Perhaps it thinks it's the expert at managing its own space.

Sync flushes RAM buffers to the fs. I cannot give warrenty that everything from the user level down to the drive platters and all levels in between will respond to sync.

But... I do believe they will respond to the "system going down" signal issued by shutdown. This will be issued to every task - which _should_ be coded to respond cleanly, as far as they can, to shutdown.


All that is why I use shutdown scripts, or bang in "sync; sync; init 0"

Smilie but I am cautious!
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
anvilhead
Titel: Re: RE: Re: RE: Re: Live CD: Is shutdown necessary?  BeitragVerfasst am: 27.05.2006, 00:25 Uhr



Anmeldung: 12. Mar 2006
Beiträge: 91
Wohnort: Canada
Thanks for the info. Actually, I just ran the RC4 live CD, and it doesn't take very long to shut down, does it? So it's not a big deal.

It was a fun thread, though... Okay, I admit it---the whole thing was kind of a joke. We don't always have to be serious here, do we?

"System shutdown initiated." Heh heh!

_________________
I'd rather have Kanotix
Than a houseful of narcotics
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.