Slashdot Mirror


The Boot Loader Showdown

Francesca writes "What utility do practically all Linux users use, regardless of their job or expertise? A boot loader. In this article from IBM, see how a boot loader works, meet two popular loaders -- LILO (LInux LOader) and GNU GRUB (GRand Unified Boot loader) -- and review the pros and cons of each." From the article: "Most simply, a boot loader loads the operating system. When your machine loads its operating system, the BIOS reads the first 512 bytes of your bootable media (which is known as the master boot record, or MBR). You can store the boot record of only one operating system in a single MBR, so a problem becomes apparent when you require multiple operating systems. Hence the need for more flexible boot loaders."

17 of 349 comments (clear)

  1. Why couldn't they post this BEFORE the weekend? by duguk · · Score: 3, Interesting

    *Bangs head on table* Now I wish I had this page when I tried to install Gentoo over the weekend. Call me dumb but I couldn't get it to dual boot with Grub. Worked great with Lilo tho :) Its just a shame you have to rewrite Lilo stage 1 when you change stuff. Though I've never really got the hang of the Grub command line (why -1 for partitions, eh?!) so I'll stick with Lilo - its easy enough with a boot or livecd to fix anyhow. Grub's quicker though isn't it? Dug

  2. AMD64 by Snoolas · · Score: 4, Interesting

    I use AMD64 Gentoo, dual booting with Windows XP Pro. Of course, LILO doesn't work with AMD64, so I have to use Grub. The bad part here is that Grub hangs whenever I try to get it to load Windows. I don't think it likes a 32 bit kernel image. So.... I have to go into the BIOS and change primary boot drives everytime I want to switch. I want a bootloader that can do that for me, or at least a way to make Grub do it. (Of course, I never really boot into Windows...)

  3. Re:Lilo...pros? by duguk · · Score: 3, Interesting

    What about because its far easier to use?

    nano /etc/lilo.conf
    lilo
    reboot

    Grub has just been a pain for dualbooting in my experience. Lilo, no trouble, though you're right, they're very few pros.

    Dug

  4. Re:Useful tool, but necessary article? by Fallingcow · · Score: 2, Interesting

    We gentoo users look at it every time we upgrade the kernel :)

    I used to be a Lilo fan, until I ran into trouble with it on my IBM laptop -- it took WAY longer at the part where it loads the kernel to memory than it had any business to, a stage that goes by so fast it's easy to miss on most computers. Yeah, it's got a P4-based Celery in it, but my laptop's not THAT slow. I've seen Pentium I systems go through that stage faster.

    Switched to Grub, problem went away. Whatever. Guess I'll just use it from now on.

  5. Re:Huh? by NutscrapeSucks · · Score: 3, Interesting

    Unlike LILO and GRUB, I've never had a single problem configuring the Windows Boot Manager -- and I've installed NT on some pretty weird systems over the years.

    Sure, sometimes you have to enter the "ARC Path", but the Win Boot Loader ALWAYS seems to have the same view of your hardware that the OS does, which can't be said for Linux boot manglers.

    --
    Whenever I hear the word 'Innovation', I reach for my pistol.
  6. Too smart by KiloByte · · Score: 1, Interesting

    A problem I see is that GRUB has too much brains for its own good. It needs to understand all filesystems it can possibly boot. If you upgrade your foofs to a new version that can be misunderstood by GRUB, use an exotic fs or even the newest donation of IBM/SGI/whoever, you run into deep shit if GRUB tries to read the files in a way even minutely different from the newest spec.

    Bootloaders of the past (hell, even I wrote one that was primitive but worked) had the selection and actual loading separated. You had a piece of code inside the partition table (and perhaps track 0), which in turn passed control to the actual bootloader of the OS which you selected. This approach was a lot better where dual-boot configs are concerned.

    --
    The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
  7. Could a micro-OS bootloader aid security? by G4from128k · · Score: 4, Interesting

    Given all the concern with rootkits, backdoors, worms, spyware, et al, it would seem that a nonflash-ROM bootloader could provide a secure micro-OS that in turn checks and helps maintain the integrity of the main OS. A boot-time diagnostic and some key read-only API code segments (encompassing access to crucial functions such as encryption, hash calculation, memory access, disk access, UI access, network access, etc.) would help ensure that the main OS was not compromised and was less susceptible to malware.

    A small OS, even one with a GUI, can fit in less than a MB. Perhaps a heavily secured, stripped-down copy of some stable version of *nix could provide a high-integrity read-only core underlying a more sophisticated, extensible, and flexible full-featured OS.

    --
    Two wrongs don't make a right, but three lefts do.
    1. Re:Could a micro-OS bootloader aid security? by joelsanda · · Score: 3, Interesting

      The Macintosh Classic had this. For some reason, during graduate school the night before a paper was due, my HD wouldn't boot. I accessed three keys on the keyboard while turning the machine on. The Mac booted from a ROM OS and presto - my Mac was up and running and the HD, though unbootable, still worked so I could access my word processor and documents.

      --
      The Luddites were ahead of their time.
    2. Re:Could a micro-OS bootloader aid security? by kinema · · Score: 2, Interesting
      Perhaps a heavily secured, stripped-down copy of some stable version of *nix could provide a high-integrity read-only core underlying a more sophisticated, extensible, and flexible full-featured OS.
      Take a look at LinuxBIOS.
  8. overwhelming majority don't dual boot by Anonymous Coward · · Score: 1, Interesting
    and i suspect in most cases that linux's built-in boot loader would suffice.

    $ file /boot/bzImage
    /boot/bzImage: x86 boot sector

  9. Re:Lilo...pros? by grumbel · · Score: 2, Interesting

    How is that easier than:

    grub-install /dev/hda
    nano /boot/grub/menu.lst
    reboot

    ?

  10. Re:Useful tool, but necessary article? by buckhead_buddy · · Score: 4, Interesting
    I think boot loaders in general will become a much bigger topic for the technically ignorant because:
    • Mac OS X will bring some of the most tech-phobic users to Intel in mid-2006 and much will be talked about setting up one's computer to boot different OS's if there is no "Red Box" included.
    • Boot loaders are a big security point of failure and may rise again as a popular exploit if easier targets like Word Macros ever die off. IMHO knowledge is better protection than ignorance though.
    • Declining interest in boot loaders could solidify Microsoft's goal of being the only OS people want to use. Open Source boot loaders aim for versatility; Microsoft aims for extreme ease of use and zero versatility. If the first chapter of every linux install book is how to troubleshoot your boot loader; this is great at maintaining Windows monopoly.
    Boot loaders aren't really sexy, but they are important. Hence any article that tries to build some interest in them is a good thing (even if this one may have some imperfections in it).
  11. LILO vs GRUB by 93+Escort+Wagon · · Score: 4, Interesting

    GRUB rocks. Its just too easy to render a computer unbootable with LILO (not permanently, of course; but it's still annoying). Why should I have to rewrite the boot sector just because I want to change what I call a particular boot option?

    Interesting to hear of people's GRUB problems with Windows - I've never had an issue with this. My dual boot machines have been 98SE or XP Pro alongside Red Hat or Fedora. GRUB setup works out of the box. I've got to admit I've only used multiple partitions on one disk though - never done it with different OSes on different disks.

    --
    #DeleteChrome
  12. Re:WHAT THE FUCK, SLASHDOT? by Anonymous Coward · · Score: 0, Interesting

    Not to sure if you noticed the subtitle for this site... "News for Nerds" as in tech news, its not the freakin weather channel.

  13. Re:Lilo...pros? by the_greywolf · · Score: 2, Interesting

    well, for one, it doesn't result in:

    # grub-install /dev/hda
    # nano /boot/grub/menu.lst
    # reboot
    # ls -Af /boot
    /boot:
    boot@
    #

    oh, joy of joys.

    every time i've used grub, i've lost the contents of my /boot partition on reboot. don't even suggest that it might not be mounted! upon next reboot, it doesn't boot.

    that one bad experience is all i need to stop using grub.

    --
    grey wolf
    LET FORTRAN DIE!
  14. Re:Lilo...pros? by doorbot.com · · Score: 3, Interesting
    What about because its far easier to use?


    My understanding of how LILO works is that it hardcodes the location of your kernel image when you run "lilo". Then when it boots it just starts loading the kernel from that point. If I upgrade the kernel I have to rerun "lilo", and I better hope that kernel will boot and I had a backup boot entry or I will be digging out my boot CDs.

    Now I'm using GRUB because at least if I goof up/corrupt my config file it will still boot. It boots into a very simple shell from which I can inspect partitions and determine where my kernel went, and then boot it.

    How many times did I end up with a "LI" on the screen and nothing else... or endless rows of "01"? I haven't had these problems with GRUB; it just boots to a prompt and I can recover from there.

    <promotion target="self" type="shameless">
    Also, for those of you wanting to migrate to a software root RAID, check out a guide I wrote:
    Migrating To A Mirrored RAID Using GRUB
    </promotion>
  15. Re:Huh? by dryeo · · Score: 2, Interesting

    I still use OS/2 bootmanager, works great to boot most everything I've tried. Nowadays it uses closer to 8 MB partition (one cylinder). For Linux it is just a matter of installing LILO or Grub in the Linux Partition. Windows of course wants to use ntloader in C: to finish the boot. It does have some occasional problems nowadays with losing the INT13x extensions to boot a partition past the 8.4 GB mark or whatever it is. Also does not support booting a cdrom.
    Also Win2k totally fscked it up (fixed in service pak 1, you'd think MS would do at least a bit of testing)
    I find most of these other boot loaders to be to complex, LILO is too easily broken and Grub has a pretty steep learnng curve for a regular user.

    --
    https://en.wikipedia.org/wiki/Inverted_totalitarianism