[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing LILO in MBR or in another partition



Terry Boon <terry@counterfactual.org> writes:
TB> In "Running Linux", the example lilo.conf includes the line
TB> 
TB>    boot = /dev/hda
TB> 
TB> This will install LILO into the master boot record (MBR) of hda.  The
TB> explanation continues "If you give a partition device name (such as
TB> /dev/hda2), instead of a drive device, LILO will be installed as a
TB> secondary boot loader on the named partition.  (Debian users should
TB> always do this.)"
TB> 
TB> I can't find an explanation of why Debian users cannot put LILO into
TB> the MBR of the disk.  I've currently got grub in the MBR (the result
TB> of installing Mandrake in a spare partition after installing Debian).
TB> To boot Debian, grub then runs LILO installed in /dev/hda2.  It's not
TB> terribly elegant.

I think the default setup for Debian is to use a fairly simple MBR,
which lets the user press any of "1234" to boot to /dev/hda[1234],
repsectively.  If you had Some Other OS installed on /dev/hda1 and
LILO on /dev/hda2, you could use the MBR to pick which one and avoid
the LILO configuration.

Given grub, though, there's no reason to run LILO.  My system uses
grub to boot to one of a couple of Linux kernels or Win98, and I
haven't touched LILO here since I installed the machine (a couple of
months ago).  I don't think grub is any harder to set up for this
case; it's just different.

(Also, with grub, you don't need to do anything special when you
install a new kernel.  With kernel-package, though, this is less of an 
issue, since it's harder to forget to run lilo.)

TB> Please could someone explain whether it is safe to install LILO in the
TB> MBR?  Alternatively, what *can* I put in the MBR to replace the
TB> current installation of grub (whose configuration is sitting in the
TB> Mandrake partition)?

You could:

-- Install LILO in the MBR.  There's nothing actually wrong with doing 
   that.
-- Install the Debian MBR (from the mbr package) in the MBR.
-- Reinstall grub in the MBR, either tweaking the grub configuration
   you have in Mandrake to boot Debian, too, or starting over with
   configuration in Debian.

If you've got Debian on /dev/hda4, say, you'd add

title Debian GNU/Linux
root (hd0,3)
kernel /boot/vmlinuz-2.2.16 root=/dev/hda4

to your Grub menu.lst.  The (hd0,3) specifies the OS root partition;
hd0 is the first hard disk (probably hda under Linux) and 3 is the
fourth partition (/dev/hda4).

-- 
David Maze             dmaze@mit.edu          http://www.mit.edu/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: