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

Re: Bug#24168: Hamm: lilo installed to partition, not MBR



Hi,

On 21 May 1999, Adam Di Carlo wrote:

> Joey, AFAIK, the stock lilo.conf puts in place the MBR than puts the
> OS loader (2nd stage boot-loader, I think is the right term) on the
> partition.

AFAIK it's /usr/sbin/liloconfig which installs /boot/mbr.b by default.

-----

grep mbr.b $( 
    for a in /{,usr/}{,s}bin/*; do 
        file $a | sed -e '/script/s/\([^:]*\):.*/\1/p' -e'd' ; 
    done )
/usr/sbin/liloconfig:   system("dd if=/boot/mbr.b of=$disk bs=444 count=1");

-----

The file mbr.b is BTW in its own package, "mbr", but is only(*) installed
by a script in the "lilo" package.

(*) All of my homebrew kernel-image.debs have a postinst script which does
  the same as liloconfig.  I've noticed that the /vmlinuz shipped with the
  base system is not "owned" by a package.  It would be nice for several
  reasons if this were the case, one being that it would be possible to
  uninstall the generic kernel image and modules with dpkg instead of rm,
  another one that the included liloconf could be used by dinstall, IIRC
  kernel-package already supports many types of bootloader.  OTOH I do
  realise that this would make the bootfloppies slightly bigger :-P

As I understand it, if you have a mbr.b in the bootsector of the harddisk,
that file can chain the bootprocess on to the lilo bootblock in any
partition bootsector.  The alternative to mbr.b in the hardisk's
bootsector is writing lilo's own bootblock there.

/sbin/lilo only writes mbr.b to the bootsector if you have both of
these lines in /etc/lilo.conf:
 
  boot = /dev/hda
  install = /boot/mbr.b

Unless specified differently, lilo.conf defaults to a "boot" value equal
to the current root device and an "install" value of /boot/boot.b.

> The real bug is that lilo sucks, and silo sucks, and god knows what
> else, the the free software world needs a better boot-loader.

Grub?  Or does that work on x86 only?

Cheers,


Joost


Reply to: