-
Senior Member
registered user
The short answer about startup files is that yes, there are a handful of scripts that might run when X kicks in. But right now I only have time to address one topic, and I think orderly shutdown is the most important.
There are at least three or four kinds of problems that can happen with sudden loss of power. One is affectionately (not!) known as head crash, and it doesn't mean that your hippie friend just went to sleep! 
The thingies that read from, and write to, magnetic media (hard drives, floppy drives, 8-track casettes) are called heads, right? The ones that work on fast-moving media like hard drives are gliders that float on an air cushion, and when power is shut off, they land.
Like airplanes, if they land on a populated area, somebody could get hurt pretty badly. In fact, it's a bit of a miracle if somebody - or some data on the drive - doesn't get hurt.
So an orderly shutdown is needed to move the heads to where they can safely land. Otherwise you stand an excellent chance of putting a permanent scratch in the thin, thin coating on the platters that hold the puny little magnetic fields that, in turn, hold your programs and data.
Sometimes other hardware needs to go through some kind of shutdown procedure.
Knoppix is unusual in wanting to eject your CD so that you can put it away before it reboots or halts your computer. But the kernel won't let Knoppix do that until the information on the CD is removed from the overall file system. So Knoppix has to take care of that, then slide out the tray and keep running until you tell it everything's okay by hitting the <ENTER> key.
Other examples that I can think of at the moment deal with networks and may not be very relevant to your situation. But consider - Linux is capable of true multi-user operation, so it's not only rude to shut down the system that other people are using without warning them, it will probably cause them software problems.
It's good discipline to take care of your hardware. And then there are the software problems!
Some software shutdown is done behind the scenes on processes you don't have to think about. Knoppix sends them one signal telling them to take care of stopping themselves, and then another to kill them off in case they weren't listening. 
To help keep the 2.4 kernel from getting bollixed up, Knoppix unloads modules before shutting down. With the unionfs file system in version 3.8, Knoppix needs to move some links around before it halts.
And that's just the stuff you don't know about!
Lots of things that you do on a computer make changes, and you want those changes saved. That pretty much means that they have to be written down - to hard disk, floppy, USB drive, or whatever.
A sudden power loss means your changes might not have been saved!
The obvious example is a file you've been editing. But you may have changed the wallpaper on your desktop or switched to a different desktop manager. The system also keeps track of what commands and programs you use to make it faster for you to use them again next time.
These changes to files, configurations, and histories don't necessarily get written to disk as soon as they happen. To be more efficient, operating systems can save up these writing tasks to do in batches because accessing media is slow relative to other things the processor can be doing for you.
At shutdown, you want to give all those changes one last chance to get written to media because whatever's in RAM is lost when power goes off. And it's not just your bits of data that need to be saved, there are stores of information about your data that have to be updated. So you want to "flush buffers" and "sync filesystems."
To bring this rant to a close, there's lots of housekeeping to do before you turn off your computer. And there are those hard-drive platters to protect. And that's why some people, when you tell them that you just pull the plug, fall over in a dead faint! 
Others, like my son who is now the computer tech in the family, just smile. Job security! 
-- Ed
Similar Threads
-
By mio in forum Hardware & Booting
Replies: 1
Last Post: 08-15-2006, 08:09 AM
-
By spiwokv in forum General Support
Replies: 1
Last Post: 04-01-2004, 06:18 PM
-
By Cowboy7704 in forum Hdd Install / Debian / Apt
Replies: 8
Last Post: 03-30-2004, 09:40 PM
-
By Cowboy7704 in forum General Support
Replies: 1
Last Post: 03-30-2004, 03:49 PM
-
By bob58 in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 03-27-2004, 01:37 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Computer Photo History Altair 8800 Philco 212 CDC 6600 DEC PDP-8 Apple 1 UNIVAC
$69.99

S-100 Vector Graphic 64K Ram Board (Altair, IMSAI)
$99.95

S-100 Vector Graphic 12K PROM/RAM Board (Altair, IMSAI)
$99.95

S-100 Bus Handbook Altair 8800 IMSAI 8080 Board Schematics Xitan Pertec Cromemco
$89.99

Intel 4004IBM Mark 1 UNIVAC Cray-1 Babbage ENIAC Apple 1 Steve Jobs MITS Altair
$50.99

1979 Microprocessor Projects Altair 8800 Intel 8080 KIM-1 COSMAC Elf SWTPC 6800
$59.99

Vintage Digital Research ZSID 1.4 8" Floppy Disk CP/M Z80 Software S-100 Altair
$69.99

640pg Best of BYTE Magazine 1984 Mac Steve Jobs Altair 8800 IBM 5100 Bob Moog
$85.00

CP/M 86 1.1R 8086 Highmonitor 8 Inch Floppy Diskette 80s IMSAI Altair
$29.99

ALTAIR Bitcoin Mining Solutions PDU IEC SERIES 100-250V 30A/24A Power Distribute
$99.00