Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Operating Systems Software Linux

The Boot Loader Showdown 281

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.""
This discussion has been archived. No new comments can be posted.

The Boot Loader Showdown

Comments Filter:
  • by Anonymous Coward on Tuesday January 03, 2006 @09:29AM (#14384084)
    so, which dupeloader is the best?
    I use CmdrTaco, works best with my old version of the beowulf cluster....
  • ahh (Score:4, Funny)

    by nomadic ( 141991 ) <nomadicworld.gmail@com> on Tuesday January 03, 2006 @09:30AM (#14384089) Homepage
    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?
  • 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)

    Cool. I didn't know Ric Romero [go.com] was writing for Slashdot now.
  • Both! (Score:5, Interesting)

    by crow ( 16139 ) on Tuesday January 03, 2006 @09:33AM (#14384105) Homepage Journal
    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.
  • by eno2001 ( 527078 ) on Tuesday January 03, 2006 @09:35AM (#14384116) Homepage Journal
    ...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.
    • syslinux is the bootloader for me, at least on all of my routers and firewalls. Sometimes, you need small, and that's not LILO or GRUB.
    • by dan g ( 30777 )
      GRUB still lacks LILO's incredibly useful feature of changing the default image to boot for only the next boot process. This functionality is not wholly replaced by the 'fallback' directive either. I use GRUB now but when I used to often dual boot I would use LILO for the ability to be able to say from the command line "boot windows" and then have linux be the default boot image again after I shutdown windows.
  • by CastrTroy ( 595695 ) on Tuesday January 03, 2006 @09:36AM (#14384123)
    Is it really all the important? You see it for about 3 seconds, each time you boot your computer. If you are booting your computer more than 3 times a day, you should look into VMware so you don't have to reboot so often to access all those different OSes you have. Either that, or switch to a more stable OS. As long as it can boot the OSes you want, is there any real reason to have one over the other? I think this is kind of pointless. I just go with whatever my distro (mandriva) offers by default (lilo). It's such a minimal part of my computer, that I couldn't be bothered to even think of changing it.
    • As others here have pointed out, if you monkey a lot with multiple *NIX kernels, GRUB is a bit easier to use. For those of us who don't do that sort of thing, there really isn't much of a difference.
      • I've compiled a few different kernels in my day, and had 4 or 5 of them on Lilo. What shortcomings are you refering to? Because I haven't noticed any.
        • by hal2814 ( 725639 ) on Tuesday January 03, 2006 @10:03AM (#14384286)
          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.
          • And I think it's easier to dynamically edit the grub configuration while you booot (say if you screwed up the kernel parameters).
            I haven't used Lilo for a while (haven't rebooted any of the Mandr[ake,iva] machines I use in person for ages), but I seem to remember it wasn't as easy as it is in Grub. If you screwed up your config file, you pretty much had to use a rescue disk.

            Regarding the joys of booting systems, I recently had lots of fun getting my usual workstation to boot after adding a third SATA disk.
    • Is it really all the important? You see it for about 3 seconds

      OK, I'll bite. Is the starter in your car important? You only use it briefly (2-3 seconds), then you're motoring on down the road.

      Just try doing without one, you'll see how important it is.

      (I agree, though, VMware rocks.)

    • This is kind of the question I was asking myself. Maybe a few years ago, multi-booting was worthwhile, but there are so many other options that make this largely unncessary. VMWare is the first one I thought of -- why bother multi-booting your primary HDD when you could run multiple OS at once?

      A lot of modern motherboards will willingly boot off of any drive in the system and you can also look at removeable drive trays as well. And the most obvious one is multiple PCs -- it's hard not to have accumulated
    • Well, the greatest utility of these things comes only handy if you're not getting the "flashes there for three seconds" boot. Simpler boot loaders probably need more tweaking in the cases when things don't just work like they used to.

      For example, yesterday I installed a new hard drive and copied my shit over from the old disk. When I was done, I spammed the bootloader back to the MBR and rebooting I went. Turns out I had forgotten to update the actual bootloader menu file to correspond to my new partition

  • Need LILO for VMWare (Score:4, Informative)

    by div_2n ( 525075 ) on Tuesday January 03, 2006 @09:38AM (#14384141)
    For anyone getting ready to load a Linux instance on a VMWare virtual machine, save yourself some time and use LILO. GRUB does not work as best I can tell. Boots to a fun error message after initial install. LILO works like a charm.
    • Uhhhmmmmm.... I don't ever remember having to do that at all. Are you quite sure? I have only done a few installations, but our kickstart sets up GRUB by default, and all of them have booted. This is VMware 3-5.5 with RedHat/RHEL/Fedora.

      Please post Host/Guest OS Details as well as the version of VMWare. Just kind of curious.
      • I agree with un1x10ser. I've used various versions of VMware Workstation starting with 3.2 up to the current (5.5.1) with many different Linux distributions (Redhat 8 through Fedora Core 5 beta, SuSe 8 - 10, plus various other distributions). I've never had a problem with Grub in a VM.
    • by bunyip ( 17018 ) on Tuesday January 03, 2006 @09:45AM (#14384179)
      Boots to a fun error message?

      Would this be error 18? How large is your partition?

      The quick fix for this is repartitioning so that /boot is small and the first partition on the disk, then it will work fine. I use Grub to boot SuSE 10 with VMware on my system at work (where Windows is the corporate standard). If this is not the fix, try Google - it's your friend.

      Alan.
    • This is pure nonsense; GRUB works fine. I have a number of VMWare installations which use GRUB. In fact, I avoid LILO like the plague, as GRUB has a lot more capability and is IMHO easier to maintain.

      Now, you might well be having some problems; I won't dispute that. But it seems like it's more specific to your own configuration.

      VMWare has an excellent support message board; I suggest you raise this issue over at vmware.com, and be sure to include the specifics of your configuration.

      Or just install any

  • by pklong ( 323451 ) on Tuesday January 03, 2006 @09:40AM (#14384149) Journal
    I was going to post but computer says LIL-
  • raid-extra-boot (Score:2, Interesting)

    by camt ( 162536 )
    Until GRUB implements the equivalent of LILO's raid-extra-boot, I'll keep using LILO thankyouverymuch.

    I don't understand how GRUB can have gone so long without that feature. I know there are ways to do it (we'll call them work-arounds), but I don't want to have to work around the lack of a feature!
    • Re:raid-extra-boot (Score:3, Informative)

      by emag ( 4640 )
      You beat me to it. I was using LILO on my last system, and installing my most recent one, GRUB was the default boot loader. Only problem being that / and /boot are both software RAID1, which once I found the magical incantation worked flawlessly under LILO. Apparently GRUB and my BIOS disagree as to what disk is actually the first though, so after a bit of frantic googling from a system that worked, I discovered I needed to tell the BIOS to boot disk 3. Joy. I also can't believe that GRUB's made it thi
      • Just install Grub on the disk your machine booots from. Whether Grub thinks it's the first disk or not is irrelevant.
        • Which completely misses the point of booting from raid. Not to mention that the machine won't boot unless you know which disk grub thinks is the first.
          • Grub is irrelevant, what matters is what disk the BIOS thinks is the first. If it comes to that, you can always install Grub on all the MBRs.

            The raid aspect should ideally be handled by the BIOS, if not then I suppose you're screwed.

            I just had to re-setup Grub on my workstation where a new disk was added on the Raid controller (used as a standard SATA controller) resulting in Grub (and the Bios) believing in one disk order and Linux in another.

            Normally, Grub polls the Bios to figure out the list of availabl
            • Re:raid-extra-boot (Score:3, Informative)

              by emag ( 4640 )
              BIOS by default booted disk 1,2,3,4. Grub wouldn't boot unless 3 was first. Which has some interesting implications for reliably booting a sw raid setup with grub, unless you go through a wholly manual process of telling grub to explicitly put the MBR on each disk, and then either edit the boot config in grub when needed, or have duplicate entries for each disk changing the root line each time.

              And why in the world would BIOS *ever* handle a linux software raid setup itself?
    • Re:raid-extra-boot (Score:4, Informative)

      by m50d ( 797211 ) on Tuesday January 03, 2006 @10:39AM (#14384529) Homepage Journal
      What do you use that to do? Grub booted my raid1 flawlessly, just map (hd0) and (hd0,0) to the /dev nodes and install normally.
  • you need

    btmgr

    http://btmgr.webframe.org/ [webframe.org]

  • by Godai ( 104143 ) *

    Only Slashdot & linux users (myself included) could argue the merits of a boot loader :)

    Now, having said, I'm sure someone will post a reply explaining in excruciating detail how my choice of boot loader could make or break my system. Hell, maybe you'll convince me. It'll be a hard sell though; I've used both in the last few years and, frankly, barely noticed a difference.

    • Any geek news site could argue the merits of a boot loader, but only on Slashdot could we go through the whole argument twice just to make sure the first time was not a coincidence.

      'cuse me while I go cut/paste some of the insightful comments from the first time this story was posted...
    • We can be certain you have never used OS/2.

      OS/2 users argue more about boot loaders than Linux users, and they are proud of it!

  • I can run linux on my lilo?
  • Showdown??? (Score:3, Informative)

    by LABob ( 870126 ) on Tuesday January 03, 2006 @10:07AM (#14384314)
    No 'showdown' is needed. Aren't there enough flamewars around the Web as it is? Technically, both bootloaders are good. Use the one that works best for you.

    Politically, if you must use only GPL software, then go with GRUB. LILO has a _very_ open license, but it does not meet RMS's strict and unyeilding requirements.
  • by ylikone ( 589264 ) on Tuesday January 03, 2006 @10:10AM (#14384338) Homepage
    XOSL (graphical) [arnes.si]

    GAG (graphical) [sourceforge.net]

    Gujin [sourceforge.net]

    Syslinux [zytor.com]

  • by account_deleted ( 4530225 ) on Tuesday January 03, 2006 @10:10AM (#14384345)
    Comment removed based on user account deletion
  • My kitten Luna loads my boots with shredded paper and cat toys every night. She is the best boot loader ever!
  • by MikeDawg ( 721537 ) on Tuesday January 03, 2006 @10:11AM (#14384351) Homepage Journal
    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.
    • 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.

      I would of tested and compared them in the context of boot environments... but you're right, a confusing web site/documentation definetly translates into "subpar product"... in fact,
    • So ? If Grub works and Grub 2 isn't stable yet, just use Grub.
      Or Lilo, or whatever else.

      But I don't get the logic of "X works fine, however they're working on Y (labeled as X 2) which isn't done, so they aren't working on X anymore, so I'd rather use Z..."

      Just say you like Lilo better than Grub, it's not like anybody cares anyway...
      • X works fine, however they're working on Y (labeled as X 2) which isn't done, so they aren't working on X anymore, so I'd rather use Z...

        It's more like "They consider X to be old and crappy code, and are working on Y (labeled as X 2) which isn't done, so they basically have abandoned X while X2 is not yet ready, so I'd rather use Z..."

        It's poor form to drop support for your current product while its successor is not yet ready for prime-time. The professional way is to support both for one or two releases

        • Free software in general does not come with support. If it breaks, you get to keep both pieces. If you want professional support, buy a commercial Linux distribution from a vendor. It's the vendor's job to fix problems and support the product.
        • Old and crappy it may be but it works and it has been chosen over numerous alternatives in a number of cases. So basically it works, there isn't much to add to it as it is, so unless a major bug is discovered, there's no reason to actively maintain it.
          The main thing Grub has against it is that it's relatively ugly. The fact that the 1.x branch isn't actively developped is quite irrelevant. Because it works. Should it suddenly stop working, well, there are lots of other similar programs available.

          Maybe I'm dense but I really don't get your concern. Are you worried you won't be able to get spare parts when your program will get worn out from booting everyday or something ?
          • So basically it works,

            True enough... unless some new kinds of boot devices (such as SATA) come out, which might necessitate additional development...

            there isn't much to add to it as it is,

            There's one feature that's been sorely missing: the equivalent of lilo's -R option (boot another OS once).

            With their proclaimed feature-freeze, there's not much point waiting for this...

            The main thing Grub has against it is that it's relatively ugly.

            And ugly it is... I especially hate the "nice" curses interface o

            • >There's one feature that's been sorely missing: the equivalent of lilo's -R option (boot another OS once).

              You can probably do what you need using Grub's 'savedefault' command, eg

              grub> help savedefault
              savedefault: savedefault [--stage2=STAGE2_FILE] [--default=DEFAULT] [--once]
              Save DEFAULT as the default boot entry in STAGE2_FILE. If
              '--once' is specified, the default is reset after the next reboot.
              grub> savedefault --default=1 --once

              iirc some
  • Yaboot (Score:2, Funny)

    by so1omon ( 577498 )
    I use Yaboot you insensitive clod!
  • What utility do practically all Linux users use

    While it is true that Windows 98/ME users do not use a boot loader, all Windows NT/2000/XP/2003 users also have one. Further, even when using Linux as part of a multiboot setup, the Windows boot loader is sometimes the best to go for. That is especially true when there are multiple Windows systems. In a machine with both 64-bit and regular Windows versions alongside various Linux distributions, the cleanest approach is the Windows boot loader in conjunctio

  • by uriah923 ( 867690 ) on Tuesday January 03, 2006 @10:38AM (#14384518) Homepage
    This article [omninerd.com] 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.
  • by Scott Wunsch ( 417 ) on Tuesday January 03, 2006 @11:03AM (#14384699) Homepage

    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.

  • by Xonstein ( 927931 ) on Tuesday January 03, 2006 @11:22AM (#14384821)
    If there were two pieces of software which I would say actively ward off more people from installing Linux, it is the boot loader and X video driver config. Both of them can be installed without issue using any standard installer with a user accepting defaults, and the system can fail to boot properly which are very, very poorly documented to debug and repair, especially in a dual-boot scenario. Recently I did a Suse 10 install, and it installed a video driver which even prevented Sax from working. Also, although I installed it on a secondary partition on my primary boot drive, for some reason it decided to install the boot loader on some other drive. Both were a pain to fix, but I wouldnt know how a first-time Linux user would even know where to start.
  • LILO forever! (Score:3, Insightful)

    by tie_guy_matt ( 176397 ) on Tuesday January 03, 2006 @11:35AM (#14384909)
    One of the things I love about linux is that you don't have to re-learn how to use everything with each version of the OS. So you know how to set all of the network setting under NT (that is to say you know where all the happy icons to do it are.) Well with 2000 and then again with XP you have to look like an idiot looking through all of the happy icons trying to find the right one to reset your network configuration (or whatever.) How often have you felt like saying "it was here under NT or 98 or 3.11 or whatever, so why isn't it here now?" Well it is not there anymore under XP! And you are going to have re-learn everything (and maybe re-train your staff) because someone says that this new way is better. If this new way is so much better why didn't they have it set up this way from the very beginning?

    I have used lilo from the beginning of my linux adventure. I know how to configure it and I know how it works. It does everything I need it to do (which is mostly just to load linux and maybe keep track of several kernels/ distros that I am playing with.)

    So why should I even spend 2 seconds trying to figure out how to use grub? Gentoo tells you to use grub by default. I say no I will always install and use lilo until grub does something that I want/need that lilo doesn't do. True if I were just starting out I would learn grub -- but that ship has sailed. Once I know how to do something I don't want to relearn it just because someone says I should.
  • Judge for yourself which is cleaner.

    Personaly I think the article is one of the worst articles I've seen from IBM. Omitting features from LILO, and failing to elaborate how complicated GRUB's command line interface can actually be.

    boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=100 compact default=Linux image=/boot/vmlinuz-2.4.18-14 label=Linux root=/dev/hdb3 read-only password=linux other=/dev/hda label=WindowsXP default=0 timeout=10 splashimage=(hd1,2)/grub/splash.xpm.gz passwo

  • by PhYrE2k2 ( 806396 ) on Tuesday January 03, 2006 @12:16PM (#14385172)
    I'm really not trying to be a troll here, but a boot loader is such a small part of the OS. Nothing is saying you can't use LILO, GRUB, or any of the other smaller boot loaders out there (or bigger ones from former companies such as PowerQuest that also supported Linux). Each has their plusses and their minuses and they're all nicely documented in countless comparisons. Each distro has its own preference, but often gives you the option.

    So the answer is to use what you're comfortable with. It's not like we're comparing Zeus/Apache, Linux/Windows, Vim/Joe- this is a boot loader. It runs for fractions of a second and then you never see it again. If it does its job, you should never even know that its there.

    -M
  • by master_p ( 608214 ) on Tuesday January 03, 2006 @12:41PM (#14385368)
    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.

  • by Animats ( 122034 ) on Tuesday January 03, 2006 @12:56PM (#14385490) Homepage
    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" [qnx.com] 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.

"Marriage is low down, but you spend the rest of your life paying for it." -- Baskins

Working...