This has a lot of basic stuff probably already well known on the list, but I
figured it might help someone. Felt like documenting a little. :)
On Mon, Oct 20, 2003 at 11:10:54PM +0100, Terry Blunt wrote:
I *very* much like the idea of having as much of my
system as possible
open-source, and I'm also keen on the fast start-up the website suggests
However, I'm concerend at the possibility of trying to re-flash my bios,
making a mistake and finding I have an unusable motherboard.
This is a very valid concern. Later on a rom-o-matic could be set up where
you just pick your motherboard and desired configuration using a web form
and then download a new BIOS image with instructions for flashing it onto
your motherboard. If you flash an image which isn't for your specific board,
the system will not start (at all!) and you will have to remove and
reprogram the flash memory chip outside your computer. (Messy for end users,
done several times a day by developers.) Flash memory chips soldered
directly to the mainboard is not uncommon, so people really have to beware.
Can someone help me get a clearer understanding of
what is involved?
A legacy BIOS does lots of stuff at boot, and then finally tries to find an
operating system bootloader in the MBR (Master Boot Record, sector 0) of the
first hard disk. (Subject to configuration in the BIOS setup menus, CD-ROM,
floppy, second hard disk etc..)
There are two common bootloaders for Linux written for the legacy BIOS; LILO
and GRUB. I prefer LILO, maybe because I'm too stupid to see the beauty of
LILO is installed to the hard disk by running /sbin/lilo in a Linux system.
Usually this is done from a distribution installation floppy or CDROM.
Before LILO can be installed, you have to tell it where on your harddisk the
Linux kernel you want it to load is, often done automatically by installers.
(Config file: /etc/lilo.conf)
/sbin/lilo will store the physical location(s) of the kernel (it can be
scattered throughout the disk because of how filesystems work) so that LILO
can read all these pieces at boot without knowing how the filesystem works.
LILO then jumps to the kernel.
The kernel does early setup, including switching text modes and getting the
CPU out of the hideous 8086 (popular CPU back in 1979 or so) compatibility
mode that all x86-compatible CPUs start up in. When the kernel is done
initializing subsystems, it executes /sbin/init, which forks according to
LinuxBIOS differs in many ways but for this purpose I'll only mention the
bootloader, because it's the most obvious high-level difference.
(Low-level differences are numerous and very good, however!)
LinuxBIOS is designed to live with a bootloader, or payload, in flash.
Originally a Linux kernel was intended to be used as the bootloader, and
while this is cool and works very well, motherboard manufacturers don't
currently ship boards with large enough flash memory chips for this to be
viable in the mainstream.
Instead, a couple of other payloads are used/developed. EtherBoot, FILO and
9load come to my mind right now. Sorry about those I forgot. (BarebonesTK?)
EtherBoot can boot lots of things from the network or an IDE hard disk. FILO
can boot from IDE hard disk, IDE CDROM, floppy, and maybe more? 9load I
don't know much about except that it is used to load the plan9 kernel.
Short-term, I think LinuxBIOS+FILO will be the most common OSS BIOS, mainly
because of the limited size of flash memory. Hopefully, when vendors realize
that people want to buy motherboards with LinuxBIOS+Linux, they'll put
larger flash on them. (The board would still be cheaper, since there's no
license fee to pay for the proprietary BIOS.)
Hope this helps. :)