Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Operating Systems Software Linux Hardware

In-Depth Look At LinuxBIOS 284

DrSkwid writes "With PhoenixBIOS reading your email because of such inordinate boot up times for Windows and other OSs, it was remarked in #plan9 about our 5s boot times using LinuxBIOS. My friend f2f pasted an article from Linux Journal which looks at the basic structure of LinuxBIOS, the origins of LinuxBIOS and how it evolved to its current state. It also covers the platforms supported and the lessons they have learned about trying to marry a GPL project to some of the lowest-level, most heavily guarded secrets that vendors possess."
This discussion has been archived. No new comments can be posted.

In-Depth Look At LinuxBIOS

Comments Filter:
  • Re:A bootloader? (Score:5, Informative)

    by ciroknight ( 601098 ) on Wednesday March 24, 2004 @08:37PM (#8662678)
    Not from how I understand it. This is actually saving a Kernel-Image onto the bios chip itself, therefore booting straight to the kernel from the chip, basically skipping the step of "BIOS tells HD to find MBR, then read the data from MBR to ram, execute MBR instruction". Or at least, that's how I understand it?
  • by Anonymous Coward on Wednesday March 24, 2004 @08:41PM (#8662717)
    Well, the article says you can get it on MBs from Tyan.
  • Re:A bootloader? (Score:5, Informative)

    by ciroknight ( 601098 ) on Wednesday March 24, 2004 @08:44PM (#8662743)
    Well, for starters if my understanding of eXecute In Place is holding, it's completely different. The ROM chip holds a compressed kernel, that's decompressed on the fly and used to start the system. The only thing this skips is the need to do a startup seek for harddrives, and that whole step of initalizing slow hardware (ie, Hard Disk platters). eXecute In Place is intented to simply run the program natively, ie uncompressed kernel image sitting in ram, so it can just be thrown straight into the processor and executed. The difference is slight, but none-the-less important.
  • Re:Already tried...? (Score:3, Informative)

    by garcia ( 6573 ) * on Wednesday March 24, 2004 @08:54PM (#8662809)
    but the problem is that MS is currently the leader (and will likely remain to be). Their joining evil forces with Phoenix will cause all computers to be locked down.

    Windows is not going to run on LinuxBIOS and Linux isn't going to run on Phoenix/MS BIOS.

    While it's all well and good for the majority of us it's not good for the consumer.
  • Re:A bootloader? (Score:4, Informative)

    by ciroknight ( 601098 ) on Wednesday March 24, 2004 @08:55PM (#8662824)
    Errr... I really need to re-read what I write. It's a different THEORY, but similar execution.. eXecution In Place is speed via giving the computer EXACTLY what it needs to run, whereas LinuxBIOS is simply skiping the step of harddrive start. Completely different in the fact they're starting from opposite ends of the same problem, but slight in the fact that they've reached an almost common ground.
  • Re:Clustering (Score:5, Informative)

    by Hiro Antagonist ( 310179 ) on Wednesday March 24, 2004 @08:57PM (#8662837) Journal
    On top of that, it can make life easier for admins, because a LinuxBIOS could be configured to allow a serial console with full hardware control, just like a Sun box does.
  • by whoever57 ( 658626 ) on Wednesday March 24, 2004 @08:59PM (#8662846) Journal
    Ah, to answer my own post, it looks like it does [linuxbios.org], for many motherboards
  • Re:Already tried...? (Score:5, Informative)

    by sflory ( 2747 ) on Wednesday March 24, 2004 @09:02PM (#8662862)
    Actually Linuxbios already boots windows;-)
    http://www.linuxbios.org/news/index.ht ml#NT
  • Re:How do I try it? (Score:3, Informative)

    by kundor ( 757951 ) <kundor@mem[ ].fsf.org ['ber' in gap]> on Wednesday March 24, 2004 @09:02PM (#8662870) Homepage
    They have a list of supported/vaguely working motherboards.

    No athlon64 mobos are on the list, sorry.

  • by WarWizard ( 549306 ) on Wednesday March 24, 2004 @09:05PM (#8662886)
    Try http://www.opencores.org/ they have many open source hardware projects that you could program an FPGA with.
  • Handy tips... (Score:5, Informative)

    by GoRK ( 10018 ) on Wednesday March 24, 2004 @09:13PM (#8662938) Homepage Journal
    I was recently doing some research to get started working with LinuxBIOS. The first thing I have done is to order a BIOS Savior [ioss.com.tw].. This is a little gadget that runs about 15 bucks. It puts a switch on the outside of your case allowing you to switch to an alternate BIOS. With it, you can happily screw up your LinuxBIOS image all you want and still be able to boot your computer from the original BIOS.

    Some motherboards have a dual BIOS or similar arrangement; however, there is not always a foolproof way to switch to your backup if the primary BIOS is hosed..

    Keep these things in mind if you want to start playing with LinuxBIOS
  • by Ryan C. ( 159039 ) on Wednesday March 24, 2004 @09:18PM (#8662983)

    Here's a list [linuxbios.org].

    This isn't really aimed at Joe Linux, but that may change when DRM starts getting imbedded in the major BIOSes.
  • linux bios faq (Score:2, Informative)

    by Anonymous Coward on Wednesday March 24, 2004 @09:20PM (#8663000)
    here. [linuxbios.org]
  • Re:A bootloader? (Score:5, Informative)

    by AxelTorvalds ( 544851 ) on Wednesday March 24, 2004 @09:30PM (#8663068)
    I have developed a commercial set-top box that used ideas from LinuxBIOS. It's kind of a bootloader, like there are on non-x86 machines.

    How it typically works is you develop a kernel with a small foot print. The LinuxBIOS guys are really sane about things, there is a few lines of assembly which is just about enough code to start running C code. After that the gist of it is C with some assembly macros. There isn't anything too complex, we're talking about outp mostly. There isn't anything too secret here, it's just that booting a PC is not documented really well. Some BIOS vendors have software that does runtime function with system managment interrupts. DRM will be something like that. Supposedly and there have been discussions about it on the LinuxBIOS list, Phoenix and company do some hardware error checking and such and that's why they are so slow but some of the LinuxBIOS folks think that they don't do that and that the code is so complex and has so much legacy that it does a bunch of extra crap that it doesn't need to.

    That code does enough to turn on memory, it may do some checking now, when I looked at it last there wasn't a ton of integrity checking code. Light up a few other components, like VGA. Then copy a kernel from flash in to memory (think of it as a slightly tweaked bzImage) At that point you can pretty much jump to the start of the kernel and execute it. The kernel doesn't use BIOS for most device IO so it knows how to spin up drives and light up the rest of the hardware.

    Now how we did it and understood the goal of LinuxBIOS to be was we had an initrd that the kernel from flash would load and execute. Said initrd would look at the drives, look at some other variables, authenticate the system, possibly do a fsck on the disks if needed and then locate a kernel on the disk. After locating that kernel it would use kexec, now called fastboot, and replace the kernel in memory. The idea was that we could upgrade kernels on disks without changing flash.

    It works very well and has been incredibly reliable. We can get in to kernel space in a few seconds. Subsequently, if it's a settop box type device, it could download a brain from cable or satellite. It could rebuild itself if needed. You could have diagnostic code in there for manufacturing, etc, whatever you want. Pretty much only limited by flash size and memory.

    I know that they now and do other things like boot windows and such, at which point LinuxBIOS is potentially a serious threat to Phoenix and company, the BIOS is an expensive piece of the computer.

    I've been toying around with some linuxbios type projects. Since disk space is so insanely cheap and disks are so big anymore, you could set aside a backup partition, easily do a really quick backup daily and then weekly do a backup of that to long term media from "BIOS land" regardless of the operating system. Or you could have something like snapshots of your system, maybe a clean install, a configured system, a backup, a different OS or something like that and then all from "BIOS Space" pick them at boot time and have it restore them. Something like that, I have always wanted backup support at the BIOS level.

  • Re:Boot Time... (Score:3, Informative)

    by Vaevictis666 ( 680137 ) on Wednesday March 24, 2004 @09:40PM (#8663149)
    For the clusters (which is what they were talking about) it's from powering on the first machine, to having every machine connected and registered with the Master, and able to start accepting code chunks to process.

    At least, that's how I'd measure it.

  • by DeathPenguin ( 449875 ) * on Wednesday March 24, 2004 @09:53PM (#8663248)
    It's a BIOS to load an operating system. They've booted Linux, FreeBSD, Plan9, and even Windows 2000 [linuxbios.org].

    The trick is finding a bootloader that doesn't depend on legacy BIOS services [te.to].
  • by DeathPenguin ( 449875 ) * on Wednesday March 24, 2004 @10:06PM (#8663341)
    You'll have a hard time finding one pre-loaded with LinuxBIOS, but the VIA EPIA port has come a long way and would make a good starting point. EPIAs are mini-itx boards, usually with VIA EDEN CPUs, that should run for under $500.
  • Re:OpenFirmware (Score:1, Informative)

    by Anonymous Coward on Wednesday March 24, 2004 @10:17PM (#8663434)
    For those of you that haven't heard of OpenFirmware, it's basically the "BIOS" on Macs.

    ... and Sun machines (where it's called OpenBoot). And also the now-extinct CHRP and PReP (both PowerPC-based) platforms. And also on some ARM-based platforms. And on other platforms too, since there are two companies (this one [codegen.com] and this one [firmworks.com]) that sell OpenFirmware development kits, which are typically used for embedded systems.

    By the way, it is an IEEE standard: standard #1275. For more info, you might want to check out The OpenFirmware web site [openfirmware.org].

  • by DeathPenguin ( 449875 ) * on Wednesday March 24, 2004 @10:20PM (#8663452)
    Yes. It's been known to load Windows 2000 [linuxbios.org] in addition to Linux and a couple other *nixes (FreeBSD, Plan9). I'm not certain if WinXp will boot, though.
  • Re:OpenFirmware (Score:5, Informative)

    by Laur ( 673497 ) on Wednesday March 24, 2004 @10:25PM (#8663482)
    You are looking for OpenBIOS [openbios.info]. It is still in the developement stages and is not ready for prime time yet. Incidently, the developers are planning on using LinuxBIOS code for the initial boot-up sequence. Also, OpenFirmware is not just the BIOS for Macs, it is an IEEE standard and alo used by other vendors such as Sun.
  • by spacefrog ( 313816 ) on Wednesday March 24, 2004 @11:08PM (#8663663)
    Actually in many cases, that works without even having to flash the card with the appropriate mac image, even in cases where the card was never designed to work in a mac, or even has a flashable firmware.

    A lot of PCI cards that do not have any firmware, work just fine on a ppc/linux setup to begin with, even when the cards do not have any support in MacOS or OSX.

    I have a realtek ethernet card and a generic AMD usb card in my oldworld 603e machine already.

    In addition, a lot of cards that do have firmware will work as long as you do not care about the device being available from boot. I have an older matrox card and an adaptac 2940UW in my machine.

    Both work just fine as long as I don't need them until the linux kernel takes over. With proper kernel parameters, the matrox card is even my console, I just don't see anything until the kernel is booting. Ditto, I boot and load kernel from a 250MB narrow-scsi drive on the machines onboard scsi. My root partition is on an UW drive on the adaptec card.

    Took a little bit of doing, but this 'grossly obsolete' machine is running just great after adding some 'somewhat obsolete' parts. With 256MB, a fast drive, and a card with decent X performance (the 10-year-old matrox)... It performs a heck of a lot better than it's 180Mhz would make you guess.
  • Re:Clustering (Score:5, Informative)

    by DeathPenguin ( 449875 ) * on Wednesday March 24, 2004 @11:29PM (#8663816)
    >>I mean does LinuxBIOS initialize hardware and then load my kernel for regular operations?

    It initializes the necessary hardware and then loads any "payload." The payload can be anything--A kernel image if you have enough space on your flash part, a bootloader [te.to] to boot from over a network or local disk, etc.

    Currently the Lightning cluster (Ranked at #6 @ top500.org) uses LinuxBIOS to load a bootloader (Etherboot or FILO, I forget which) which then loads a kernel and BProc [sourceforge.net]. No spinning hard disk, no CD-ROM, just an added solid state flash device on the IDE bus containing a bproc-patched kernel with a driver for the interconnect and bpslave. The rest of the operating system for slave nodes, which is only a few kilobytes, is pulled down over the network (Not necessarily ethernet) and loaded into RAM.

    >> How are kernel updates done if it is the latter.

    Since all the hardware is same for a cluster like Lightning, a kernel update can be done pretty easily with the bpcp (BProc copy) command if you have a new kernel sitting on the master node. I haven't used it in a while, but I think the command goes something like: bpcp vmlinuz 0-N:/boot/vmlinuz, where N is the last node. The syntax is very similar to RSH/SSH, but you can specify as many nodes as you want so you don't need any shell scripts to count up for you. I guess you might also need to tell bpsh to mount a boot partition, depending on how you have it set up.

    If you have your kernel in the BIOS, then you have to rebuild and reflash. With the magic of BProc, you don't even need to put the BIOS flashing utility (See their flash_and_burn utility) on the slave node. Just run bpsh 0-N flash_rom newbios.rom. LinuxBIOS even provides fallback functionality so if something goes horribly wrong during this process or the new image doesn't work it can automatically load an old image that does work.

    These are just a few of many possible configurations, of course. There are no strict guidelines as to how a LinuxBIOS system must be used. It's extremely flexable, which is one of its main appeals.
  • Re:Heres a picture (Score:2, Informative)

    by Drantin ( 569921 ) on Wednesday March 24, 2004 @11:33PM (#8663844)
    And here I was expecting this to be something when run through a binary->ASCII converter like the one at http://nickciske.com/tools/binary.php [nickciske.com]

    A real picture of LinuxBIOS:
    01001100011010010110111001110101011110 000100001001 0010010100111101010011
  • Re:plug n play smp's (Score:2, Informative)

    by mabinogi ( 74033 ) on Thursday March 25, 2004 @01:13AM (#8664503) Homepage
    A large multi processor machine that supports partitioning and virualisation allowing multiple different operating systems to run simultaneously, and supports dynamic allocation of resources (CPU, Memory, etc) to each partition.

    Unisys, for example, have been using Intel processors in their machines for a long long time. They realised that the CPU was not their selling point, it was their archetectural experience. So they stopped making their own CPUs and started using Intel ones instead.
  • by Anonymous Coward on Thursday March 25, 2004 @02:54AM (#8665025)
    Just an FYI to slashdot readers, but linux-bios is not the first, best, or only GPL'd firmware. u-boot is vastly superior and taking over the embedded market quickly. It's being used by at least a dozen of the fortune 50. It provides support for several architectures already (arm,ppc,m68k,i386,etc). It's very flexable and small.

    More information at the u-boot [sourceforge.net] homepage. The u-boot README [sourceforge.net] file lists all the architectures, supported platformas and options.

    Credit goes to Wolfgang Denk, the father of the project.

    Best wishes,
    A firmware engineer

  • Re:oh yeah? (Score:3, Informative)

    by DeathPenguin ( 449875 ) * on Thursday March 25, 2004 @03:06AM (#8665063)
    http://slashdot.org/article.pl?sid=04/03/19/132225 3&mode=thread&tid=137
  • by pe1chl ( 90186 ) on Thursday March 25, 2004 @03:51AM (#8665210)
    It does not matter how much memory is really in the machine, or how much the motherboard can physically hold.
    The processor can address 4GB using 32 address lines, and that defines an address space of 4GB.
    Newer processors address 64GB using 4 extra address lines but they are yet another add-on that has to be enabled lateron by special software support.
  • by MyFourthAccount ( 719363 ) on Thursday March 25, 2004 @07:34AM (#8665815)
    My idea, then, is that instead of having an operating system kernel on your hard drive, it and its bootloader should reside in a really friggen powerful BIOS chip.

    You can do that today. Get a CompactFlash to IDE adapter and a CompactFlash device of the size of your choice. You probably think that's slower than putting it in the same Flash as the BIOS. Well, it's not. The BIOS Flash sits on most motherboards on the ISA bus, which is notoriously slow.

    Remember, the BIOS is nothing more than a Flash device. And because it sits on a relatively slow interface, it really is not a great place to store large amounts of data.

    BIOS itself should be a relatively powerful microprocessor.

    You misunderstand what the BIOS is. The BIOS is just a chunk of code, nothing more. It's not a microprocessor. The microprocessor is whatever Intel, AMD, Via etc. chip you have on the board. That's what executes the BIOS.

    and since the BIOS is designed for the computer (by the factory) or configured (by a hacker who puts together his own system), there is nothing to detect or load

    Again, this is something you can do today. You have to configure the Linux kernel to do that. Before modules people would do this a lot more often, but one of the downsides of Linux going 'big' is that most people don't know/understand how to strip their kernel from stuff they don't need, while on the other hand, features such as Plug and Play detection etc have increased the boot time dramatically.

    then you "freeze" it a la VMWare, put it in the BIOS Flash,

    Remember that Flash write speed is very slow compared to a harddrive, no matter what bus it sits on. Even CompactFlash is much slower than even a slow harddrive. Imagine storing a snapshot on a fully loaded system with 1GB or RAM. That's a lot of stuff to write to anything.

    Anyways, I know where you are coming from, but with all due respect, you don't really have the background to come up with a realistic system design.

    Believe me, BIOS & OS coders _do_ come up with ideas like this all the time and I think that alternatives to the old (obsolete) BIOS will come up more and more. (hint: I am a BIOS coder that might be working on a skunkworks project ;-)).

    In the meantime, if you want a fast boot, do the following:
    - use LinuxBIOS
    - put your kernel on CompactFlash. CompactFlash is available almost immediately vs. the 3-5 sec spin-up time of a normal HDD.
    - configure your kernel properly and link all drivers you need statically instead of using modules (as much as you can).
    - As soon as the HDD is ready, you can mount your main filesystem on that.
  • by MarcQuadra ( 129430 ) * on Thursday March 25, 2004 @11:39AM (#8667492)
    Well this isn't really moving THE kernel into flash, it's moving A kernel into flash. The LinuxBIOS kernel 'skips' the fluff that the typical BIOS handles, inits what it has to, and then it executes a 'real' kernel from a disk or network location.

    If things move to LinuxBIOS you won't be flashing every time a new kernel is released, you'll be installing kernels normally, and instead of GRUB the LinuxBIOS will handle 'bootloading'.

    moving THE kernel into flash isn't practical, my kernels are typically about 2MBytes, today's flash on most PCs is about 2Mbits (512KB). The typical full-kernel would have NO CHANCE of fitting into there.

    What this does, essentially, is give us something much like OpenFirmware for x86 machines, it's a full 32-bit protected system from the second you hit the power button, and it can initialize and configure much more 'native' info to the full kernel that it loads subsequently. Pairing this with a 16MB DiskOnChip would be excellent though, if you'r system fails you could boot to the DOC (with a small system onboard) and repair the main drives, or change configs, or chroot into the 'real' system and get something done.
  • by carabela ( 688886 ) on Thursday March 25, 2004 @02:35PM (#8669957)
    I'm surprised why all eyes on /. are at MS when Intel is moving up with the EFI [intel.com] technology that could take out the need for BIOS (at least in future versions).

    From their page:
    "The EFI specification defines a new model for the interface between operating systems and platform firmware. The interface consists of data tables that contain platform-related information, plus boot and runtime service calls that are available to the operating system and its loader. Together, these provide a standard environment for booting an operating system and running pre-boot applications.

    The EFI specification is primarily intended for the next generation of IA-32 and Itanium(R) Architecture-based computers, and is an outgrowth of the "Intel Boot Initiative" (IBI) program that began in 1998."

    /me is betting that MS is involved in this initiative too.

It is easier to write an incorrect program than understand a correct one.

Working...