Rapid re-boot (Windows or Linux)

I'm working on a system using an embedded PC, and one major problem is the age the system takes to boot. To my naive mind, it would seem possible to "simply" take a snapshot of the system status, save this to HD, and re-load it for a rapid shut- down and reboot without going through the full boot process. After all, the total memory is only half a gigabyte, and I've got loads of gigabytes on the hard disk. Does any such utility exist, for either Windows or Linux? The system currently runs Windows 2000, but there's nothing that's too M$ dependent to port to Linux.

Paul Burke

Reply to
Paul Burke
Loading thread data ...

Well, in Windows, that's "hibernation" and you already have it for free. In Linux, it is "suspend to disk" and you already have it for free, though it will involve installing patches and scripts.

The difficult bit is that if you're using this feature to provide "quick start", you have two major problems:

  1. A lot of time wasted by the BIOS, which you can't avoid. linuxbios.org could be your friend.
  2. Filesystem consistency. Hibernation assumes that non- removable filesystems have not changed across wakeups. If this is not true, then you need to jump through a lot of hoops.

Oh, and as a minor issue :

  1. loading half a gigabyte of RAM off hard disk, and resetting all your attached devices, does take a finite time :)

I think your biggest time savings will be realized by changing to linuxbios, going to Linux, and ruthlessly trimming the driver list.

Reply to
larwe

What is your definition for "fast" boot? Assuming the same hardware (no hardware and x-probes), we can boot X/KDE in 20 seconds from a 20M Bbytes/sec flash drive.

Reply to
linnix

Or as Mr Linnix has pointed out, you can gain quite a bit of boot speed simply by ruthlessly trimming the driver list and booting from a fast medium like flash.

I'll even go out on a limb a bit here -- depending on your application, you may find that some things are much more important than others. If you can arrange the boot process so that the really important things come up first, you may be able to have the 'rest' of the boot happening in the background. This would only work if you have a really well partitioned system -- I can think of more ways that you'd have to have things fully functioning at once than ways that you could get by with the functionality increasing in a stepwise manner.

Perhaps if you start by bringing up a really salacious splash screen, that will distract the user long enough for the rest of the boot to complete before they get over being stunned?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Err... refer to the section I requoted above. Given the size of this system (half a gigabyte is a distinctly nontrivial chunk of data) I do agree the OP's best focus would be to migrate to Linux and build the slenderest possible kernel and startup scripts. The flash vs HDD issue is (in my experience) not a big decider in the matter. It's been a long time since my second book, and I don't have a copy here at hand, but I did have a rather fast little distro booting off either a HDD or a CF card - I think it was about 25 seconds (with a bunch of "extra" drivers, at that) on a 233MHz Geode.

Depending on the BIOS in the machine, moving to linuxbios could subtract ten seconds or more from the boot time; in the Geode case, the BIOS splash screen and POST stuff was about 3-4 second.

I don't believe this could be achieved under Windows.

People get jaded very quickly; you would need to keep upping the ante. And if a new guy comes along, who hasn't been acclimatized to the system state, he might faint and injure himself.

Reply to
larwe

This would be like when MS upped the speed of the little scroll on the bottom of the Win98 splash screen so it looked like it was booting much faster than Win95. Was briefly impressed until my cynicism was able to club my gullibility into submission.

Reply to
Tom Lucas

For Windows:

(a) You can get some improvement by removing drivers and system services that are not required by your application Check

formatting link

(b) If your system is networked and uses DHCP, the server responsiveness may be a factor. Try using hard-coded IP addresses.

For Linux, basically the same:

(a) Build a minimalist kernel including only the drivers you need, (building them into the kernel as opposed to making loadable modules may also save some time.)

(b) Remove any unnecessary daemon processes.

(c) Boot from flash instead of hard-disk?

(d) Do not used DHCP or NTP synchronization. (At least not at system startup)

As usual, it should be easier to play with different setups under Linux than under Windows.

Roberto Waltman

[ Please reply to the group, return address is invalid ]
Reply to
Roberto Waltman

Our 20 second boot to KDE desktop includes DHCP, which is initialized very earlier, but not used until the user starts an apps. Most of the time, firefox (another 5 seconds) comes up and the IP would be valid.

Reply to
linnix

Thanks, I'd not heard of this feature. That's the first thing I'll give a whiz.

That seems acceptable, it's the age of rolling credits that I'm trying to avoid. Fast doesn't have to be blazing, just quick enough to dissuade the user from wandering off.

That ought to be true unless the thing's been hit by a meteor, as there are no removeable media.

I think there might be a bit more of a learning curve involved in that, so I'll go for the suspend/ hibernate option as a first try.

Thanks for all the replies.

Paul Burke

Reply to
Paul Burke

Just to be sure we're talking about the same thing: If I didn't misunderstand, you are trying to include a fixed system state to use instead of the normal boot process. This frozen system snapshot will fall over spectacularly (corrupt the filesystem and die) if the filesystem changes from the way it was WHEN THE SNAPSHOT WAS TAKEN. Special measures need to be taken to prevent this.

Hibernation in W2K lets you put the machine to sleep nicely and wake it up without doing a full reboot. It does NOT let you start the machine quickly after a power failure.

Linux's STD feature - with a little jiggery-pokery - can be made to do a "fast start" of the type you require, although it's quite messy.

Reply to
larwe

No, the idea is that the thing goes into this state immediately before it powers down, then reloads it when powered up. There's no power on to change the disk inbetween. If the image is corrupt, just a normal boot would be fine. It's only to save a few minutes (it's a slow 600M processor) at boot.

I might well end up moving to Linux of some flavour anyway. Not one of the lighter OSs, because I need the GUI and network stuff without too much advanced cookery, but I suppose it won't be long before Vista means that my devices (hammed with an ancient driver system called DriverAgent, a sort of expanded GIVEIO) won't work.

Though I do wish Linuces came with an easy installer. And what is the Linux STD feature? Is it the same as the security tool

formatting link
or something else?

Paul Burke

Reply to
Paul Burke

Ah! Then hibernation will only cost you the time to click the checkbox in Power options, and the disk space for a RAM image.

On a generic PC, if you don't mind spending a lot of hours stripping [not something generally encouraged in an engineering department...] just start with a friendly distro and run the friendly installer which will dump 4GB of friendly unwanted stuff on your drive. But it will be friendly.

tool

formatting link
or something else?

No, it's Suspend to Disk.

Reply to
larwe

No, I was referring to application and driver installation... particularly drivers. Why do they need to be specific to distributions?

Suspend SAYS it

Reply to
Paul Burke

... snip ...

Ubuntu 6.06, as loaded, was well under 2G and I have installed quite a lot extra. Still under 2G. Get the DVD version if you want to expand things conveniently. No problems so far.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.