Booting Linux In Three Seconds
cramhead writes: "Some very cool technology that motherboard manufacturers should consider adopting. Using Linux to boot a system allows flexibility and speed. Thought the world deserved a look at [the LinuxBIOS homepage]"
This project sounds similar to the OpenBios project which has mentioned before on Slashdot, but a lot has happened since then, and even since CmdrTaco last posted about LinuxBIOS. The news page indeed reveals that (with certain motherboards), adventurous flashers-of-RAM can have Linux up in three seconds, and they promise improvements even on that. They also note that LinuxBIOS is working with an Alpha DS10 and with an Athlon / SiS730S combination. (This may also remind you of the etherboot project).
It takes about 10 seconds for my palm to boot, with about 20 programs and hacks installed. But you're probably thinking about the near instantaneous wake up when you press the power button, because the power button is more accurately a sleep button. The article above is about a cold boot, so if you'd like to compare apples to apples, press the reset button on your palm and see how long it takes to get to the main menu.
Very fast boot times isn't the only great feature of LinuxBIOS. LinuxBIOS can boot Linux and other OS's like Be or QNX, though it's not for Dos or Windows since they rely heavily on the legacy BIOS for certain features of operation that LinuxBIOS doesn't bother with. LinuxBIOS has a very stripped down linux kernel that just sets up some basic features of a PC better than many OEM BIOSes (memory, cache, super I/O) and then jumps to loading whatever kernel you wish to take the system from there.
Quidquid latine dictum sit altum viditur
http://www.scyld.com/products/beowulf/software/mon te.html
It's called Two Kernel Monte. It's a module that loads a new kernel into memory, does a little do-si-do dance to get it where it needs to be in the mode it needs to be in, then simply jumps to it. (Yes, you need to do
umount -a;mount -o ro,remount /
before doing this, since it doesn't do any of that...) No, it's not an in situ change, since all your processes die, but for systems with multiple SCSI or RAID cards, it can mean the difference in a few seconds for reboot and a few long minutes....
On a side note, make sure and grab my link; the one on Google is wrong (until they fix it), and it took me a while to find the right thing...
--
Never assume TFM is right.
This would be useful for Windows, considering how often you need to reboot.
Why would you need it for Linux, though? I mean, who reboots more than once every major kernel upgrade? What would be really cool is a way to upgrade your kernel without rebooting, like QNX...
If anyone out there who has any say in next generation BIOSes that are not intended to boot windows or other OSs that requires primary and extended partitions, then please implement this.
I would a system with unlimited partitions, no legacy hard drive rubbish etc. Instead of mounting / on sd1s3a1 etc, why not mount / on "root", mount /var on "var", mount /usr on "usr" etc, just like the Amiga ("Work", "Workbench", "System 3.0" etc. The same goes for removable media - the Amiga has "CD0", "Zip0", "DF0", "DF1", etc for various types of removable media. Instead of mounting a floppy as /mnt/floppy from /dev/fda or whatever, mount a floppy as /mnt/floppy from "fd0" or "floppy", or "zip" or "playdisk" or "dvd" or whatever.
Add naming to disks themselves. Then when you do cd /mnt/backup, the system will ask you to insert the disk named "backup", which could be in any drive. The OS would autoload the disk when inserted, see that the disks name was "backup", and everything would continue fine.
Computers have gone a long way backwards since the elegant solutions that existed and died in the past with the likes of the Amiga, etc. This can mostly be blamed directly on Microsoft and Unix systems where usability was put last on the list of priorities. Now it is important, there are a whole load of nasty hacks to get around the crufty old PC system that just doesn't work nicely. The sooner it dies, the better.
Go to their site and read some of the pages. This started at Los Alamos _for_ their Beowulf clusters exactly for that reason.
the good ground has been paved over by suicidal maniacs
This would be useful in building internet/compute appliances with standard PC motherboards. People have come to expect a device to be on instantly when they hit the power button. How successful do you think a modern TV would be if it took 20-30 seconds before the user could do anything? In their case, they wanted to have the ability to add a compute node to their Beowulf cluster, turn it on, and have it ready for work in a few seconds.
the good ground has been paved over by suicidal maniacs
Speaking as the person who started linuxbios and runs the project from here at LANL, I thought I would mention a few things.
... oh, and of course, EFI only works on one architecture; LinuxBIOS already works on two, and PowerPC is on the horizon.
3 second boot. Trust me, it's nice. And no matter how fast you make your boot, mine will probably always be faster, since you'll always be stuck with that crazy BIOS doing all that unnecessary work so that DOS will run.
3 second boot: it's nice but it's not our primary reason for doing this. We need to replace the BIOS
because of its many stupidities:
- zeroing memory on boot, so you can never REALLY know what happened when your machine crashed
- Those 'no keyboard, hit F1 to continue' messages on nodes that have no keyboard. Think this is only happening on old machines? Guess again! It happens even now on a rack of Compaq DL360 machines we just bought. Every once in a while, they ignore the 'no keyboard' bios setting. Imagine trying to deal with this if you had 256 nodes with no display. No fun.
- Current BIOSes allow no good way to boot without disk, floppy, or CDROM. I'm well aware of PXE, but the many defects of that standard make it only partially useful.
- BIOSes are getting worse. Intel's next-generation BIOS, the EFI, will require that you have a FAT-32 formatted partition somewhere, and as part of the boot process you will have to run CHKDSK. Nice, Huh? If you have a strong stomach download the 400-page standard, read it, and then wonder why this is better than just loading Linux from flash
Our main use of LinuxBIOS is for clusters. That said, I have a LinuxBIOS machine as my desktop and it is really nice. When you're doing kernel work you tend to reboot now and then, and LinuxBIOS takes the pain away.
Even cooler: we have an 8 MB Millenium Disk On Chip on one of our clusters. Ollie Lho and David Woodhouse worked out how to make the last 7MB into a root partition. We put the Scyld root file system onto that partition, so that the nodes boot up right into the Scyld cluster environment. Voila, silicon cluster nodes. Life is much easier.
See http://www.linuxlabs.com/linuxbios for a ompany that will be selling these as cluster nodes. Also see http://www.lnxi.com for another use of LinuxBIOS. For other systems that boot Linux from flash, you can check out synergy, CSPI, and API.
For an embedded use, booting in 3 seconds is pretty helpful. Do you really want to wait 15-30 seconds for your stereo to come up? I've talked to a few companies that want to use this for set-top boxes, and one that is probably going to use it for a CD player.
For a really interesting embedded use, check out http://www.cachier.com
OpenBoot: Yes, if you don't mind writing all your own protocol stacks, drivers, etc., etc., all of which Linux will do better, then go for it. But we've found here that Linux makes a beautiful bootstrap. We currently only boot Linux from Linux, but both Plan 9 and OpenBSD are in the works. Linux is a good bootstrap.
I've only scratched the surface here for reasons and uses of LinuxBIOS. I hope this helps a bit.
For the record, I run Win2k, Linux, and BeOS.
BeOS boots in literally 3 seconds. Linux 2.4 about 10, and Win2k in about 45 (stupid long @$$ boot time)
Why do you need a new BIOS just to boot Linux faster??
... how about replacing this really stupid, crappy and annoying partition-scheme that seems to cripple the x86-architecture?
... what *is* that?
Primary, extended... etc.
I *really* miss the way Amiga did it. Partition your drive as you see fit. Use *naming* instead of numbering of partitions. Remove, add, split, join partition without affecting the other partitions and needs to reconfigur (eg. hda9 suddenly become hda8 or hda10 or something).
Just my 2 cents....
If such a thing went through, having a open source bios image to flash might be the only thing that saves us from Dumb/Prejudical/Just-Plain-Evil(TM) HD access restictions.
EX: The BIOS refuses see LILO in the boot sector...
Trivial now, Vital Later.
Novel theory: Modern Man evolved from psychopath
Beyond that, there is a patch for the 2.2 kernel called "swsusp" IIRC. It allows the kernel to suspend itself to disk by flushing all its buffers and writing process memory out to the swap file. When the machine reboots, the kernel recognizes a special signature on the swap file and reinitializes from where it was suspended. Last I checked, this hadn't been ported to 2.4 yet.
...WinBIOS? "Boot in 3 hours!"
--
--
silence is poetry.
If a compute node takes two minutes to boot, you can't risk it being powered off when you need it. If it only takes a few seconds for a compute node to rejoin the cluster you can freely power down idle nodes. If you look at the average utilization for medium sized clusters, you'll see that this could save a lot of power.
Scyld Beowulf
Maybe I've been out of the Linux distro comparison charts, but do any of the Linux kernels or distributions have hibernate support?
(Hibernate: all power goes off, and the hard drive's boot sector is set to load memory and processor state directly from a memory mapped chunk of the disk, avoiding all the individual component loading time.)
My laptop's now a few months old, and I have never truly rebooted it: every day I just open the lid and up pops Windows 2000, right where I left it. It's never bluescreened(*). I use a 11Mbps wireless LAN to read in bed. I love the fast boot from hibernation, especially when battery time is already less than a transcontinental flight.
(*) It's the drivers that'll kill Windows 95/98/NT/2K. The system isn't well-written to deal with shitty third parties like ATI, but a laptop's setup is pretty simple and doesn't depend on flaky bizarre upgrades of drivers all the time. Months of uptime (minus hibernate at night and driving), no bluescreen.
[
I have a old ppro200 server which uses MrBios, and it takes approximately 0.5 seconds to go through post and start booting. Linux kernel takes another few seconds. This is not much of an improvement. Most BIOS's that come with new computers these days are too slow and show a lot of crap during post, which can't be disabled. Check out www.mrbios.com, they make replacement bioses for a lot of different motherboards, and they usually have a lot more options to tune for a particular chipset, etc
I have been working on getting LinuxBIOS ready for sale in commercial systems. The three second boot is interesting, but really isn't a major attraction for servers. The real advantages are reliability, full configurability over serial console, diskless operation, built in rescue disk, and an OpenFirmware like capability.
A Flash chip is much more reliable and convieniant than a boot floppy. It is possable to use a flash boot image remotely over a serial console even if the root filesystem on the HD is damaged to the point of being unmountable. The kernel in the Flash just has to mount a rescue root fs in the chip (using the nftl driver in the MTD patch).
In normal operation, the LinuxBIOS kernel will boot up, and either mount the boot partition or load the final kernel image from a boot server. Then it used the two kernel monte module (kmonte) to boot into the final running kernel. Should that step fail, the rescue image can page the sysadmin for help.
For diskless operation, the final kernel loads from the server and mounts it's root via NFS. GFS over fibre channel is also a possability.
Currently, I have a prototype Scyld cluster where the slave nodes boot from LinuxBIOS. The slave nodes are not capable of video. I also have prototype with a 2.4 kernel that comes up with a fb_console.
<PLUG nature="shameless">Go to http://www.linuxlabs.com/linuxbios.html for FAQ on our 1U server and Scyld cluster systems using LinuxBIOS. They will be ready for sale in a few days.</PLUG>