Slashdot Mirror


The Boot Loader Showdown

An anonymous reader 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.""

21 of 281 comments (clear)

  1. more like dupeloader by Anonymous Coward · · Score: 5, Funny

    so, which dupeloader is the best?
    I use CmdrTaco, works best with my old version of the beowulf cluster....

  2. ahh by nomadic · · Score: 4, Funny

    Whoa, tone down the technical mumbo-jumbo a bit, I'm having trouble following. So now what you're saying is that Linux thing is now on computers?

    1. Re:ahh by rco3 · · Score: 5, Funny

      So now what you're saying is that Linux thing is now on computers?

      That's right. It's not just for toasters any more.

      --

      Ce n'est pas un vrai mouvement de robot!
  3. Both! by crow · · Score: 4, Interesting

    On my dual-boot laptop, the virus protection in Windows doesn't recognize Grub, so it will wipe the boot sector if it's the primary boot loader. But I realy like not having to do anything after installing a new kernel, so I want to use Grub.

    The solution? Install Grub on the Linux partition, and use Lilo to load it. It is rather funny watching the boot messages go through Lilo to get to Grub.

    1. Re:Both! by Hal_Porter · · Score: 4, Informative

      You can specify a boot sector in boot.ini. It needs this so it can boot Win98, Dos and so on. You can use it to load pretty much any OS though.

      http://www.highlandsun.com/hyc/linuxboot.html

      Or you could turn off boot sector checks in the virus protection.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    2. Re:Both! by alexhs · · Score: 4, Informative

      > Install Grub on the Linux partition, and use Lilo to load it.

      Why use LILO at all, then ? You can use mbr (http://packages.debian.org/stable/base/mbr), or even the dos / windows one (fdisk /mbr), which will silently boot the active partition, that you will set to the one containing the secondary boot loader you're using.

      --
      I have discovered a truly marvelous proof of killer sig, which this margin is too narrow to contain.
    3. Re:Both! by Eli+Gottlieb · · Score: 4, Funny

      Apparently the virus protection doesn't recognize Windows for what it is, either.

  4. Which is EXACTLY Why... by eno2001 · · Score: 4, Insightful

    ...GRUB is the ultimate choice. It understands multiple OSes (including Windows XP), is very flexible and easy to use and uses a highly ethical license. Oh... and it doesn't require you to reinstall it after you make a change to it's config file like LILO does. No need to read any further. I have spoken.

    --
    -"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
  5. I was going to post by pklong · · Score: 5, Funny

    I was going to post but computer says LIL-

    --

    Philip

    Signatures are broken

  6. Re:DUPE by hackstraw · · Score: 4, Funny

    Yeah, you have posted this before!

    Yeah, but there is a big:

    diff -u post1 post2
    --- post1 Tue Jan 3 09:35:05 2006
    +++ post2 Tue Jan 3 09:34:20 2006
    @@ -1,4 +1,6 @@
    -Francesca
    +An
    +anonymous
    +reader
      writes
      "What
      utility
    @@ -125,4 +127,4 @@
      more
      flexible
      boot
    -loaders."
    +loaders.""


    If the authors would have been the same and the second one didn't have an extra '"' at the end of it, it would have been the perfect dupe.

  7. Re:Is it really that important? by hal2814 · · Score: 4, Interesting

    Nothing serious. GRUB doesn't have to be reloaded each time you add or take away a kernel. It's only a 5 second procedure in LILO (or 2-3 minutes if you have to manually monkey with the lilo.conf file). Personally, I prefer LILO for working with kernels because I touch the lilo.conf file each time a kernel is compiled. It makes it easier for me to weed out possible boot-loading problems when I'm making changes to kernel code.

  8. Other lesser known boot loaders... by ylikone · · Score: 5, Informative
    --
    Meh.
  9. What utliity do practically all Linux users use? by Caspian · · Score: 5, Funny
    What utility do practically all Linux users use, regardless of their job or expertise?
    Windows.

    I keed, I keed! ;)
    --
    With spending like this, exactly what are "conservatives" conserving?
  10. Neither! Luna works best... by justinchudgar · · Score: 5, Funny

    My kitten Luna loads my boots with shredded paper and cat toys every night. She is the best boot loader ever!

    --
    WARNING: Smoking this sig may cause lowered IQ, insanity or short term memory loss. It is also really bad for your monit
  11. My biggest problem for not using GRUB by MikeDawg · · Score: 5, Insightful

    My biggest problem, and why I stick with LILO as opposed to using GRUB, is because of the current state of the GRUB development. I'm not exactly sure what's going on with the GRUB project, I have seen their website, and read their information, but I don't understand where they are at in their development, especially with GRUB 2. GRUB has been labelled their legacy product, which does mean it has been released, and relatively stable. However, they have completely stopped work on their legacy GRUB product and began working on GRUB 2. GRUB 2 doesn't have a stable release yet (they have builds released via CVS or whatever build versioning system they use). What should we expect from GRUB 2, that GRUB or LILO doesn't offer? I don't like the setup and install process for GRUB, I find it more convoluted than the setup, install, and configuration (lilo.conf) of LILO.

    --

    YOU'RE WINNER !
    Another lame blog

  12. Re:GRUB! by Lussarn · · Score: 5, Informative

    Try enable "USB Legacy support" or similiar in BIOS. Has helped me every time.

  13. How to program a bootstrap loader by uriah923 · · Score: 5, Informative

    This article explains how to write your own boot sector. The tutorial includes assembly language code to demonstrate loading and executing a binary image from a FAT filesystem. It's also an interesting read if you want to understand the fundamentals of the X86 boot process.

    --
    -Brandon "How much you wanna make a bet I can throw a football over them mountains?"
  14. The reason I use LILO by Scott+Wunsch · · Score: 4, Interesting

    There's one key LILO feature missing from GRUB, as far as I know: lilo -R

    This allows me to install a new kernel on a box I'm not in front of, and tell LILO to boot it by default for the next boot only. If the new kernel doesn't work, I only have to ask somebody near the machine to reboot it for me, and it'll come back up in my old, working kernel. With GRUB, I'd have to try to talk somebody through hooking up a monitor and picking the right kernel... when it's a headless colocated server located somewhere far away, that's not always an appealing idea.

    --
    \\'
  15. Re:Unwelcome guest by Fred_A · · Score: 4, Insightful
    I've tried standing on my head spitting wooden nickles, and nothing worked at removing grub.

    Did you wave the dead chicken ?
    You forgot to wave the dead chicken didn't you ?
    Bah, newbie...
    --

    May contain traces of nut.
    Made from the freshest electrons.
  16. Conclusion? The PC bios is a relic. by master_p · · Score: 4, Informative

    Why isn't the PC bios responsible for loading O/Ses? because the PC bios is a relic, a leftover from the days of 8086. Why aren't bioses 32-bit? why PCs still have to boot in real mode?

    Bootloaders are very clever pieces of coding, but their presence makes it difficult for PC bioses to be replaced.

  17. Another approach - how QNX does it by Animats · · Score: 4, Informative
    QNX has a rather different approach, because it runs on non-PC hardware and can't assume there's a BIOS to get things started. QNX uses a program called "mkifs" to build an "OS file system", which is a bootable image. This contains not only the operating system kernel, but any other programs and files you want available during the boot process. Even user programs and shared objects. You can build your own bootable image, with whatever programs you want in it.

    With this approach, there's no need to put drivers needed at boot time in the kernel. (Drivers are user programs under QNX.) The kernel doesn't need to know about disks. If you want a GUI during boot, you can have it. For embedded systems, the entire "OS file system" can be put in ROM, eliminating any need for a disk. For desktop x86 systems, there's a standard bootable "OS file system" which has all the usual disk and display drivers, the bus enumerators and plug-and-play handler, and the rest of the stuff needed to start an x86 PC. But all that startup stuff isn't in the kernel.

    This is especially useful when your target is something that doesn't have a keyboard and screen. That's why QNX does this. Doing it this way cleans much startup-only junk out of the kernel.

    The Minix 3 people, unfortunately, didn't get this, so their "microkernel" has more stuff in it than it really needs.