-->
Previous Table of Contents Next


Using BOOTACTV

A slight modification of the last boot process is replacing the MBR with a utility called BOOTACTV which prompts for the partition to boot from. This requires a non-DOS–compatible copy of the boot sector to be written, so it should be used only when Linux will be the dominant operating system and when LILO is not booting the other operating systems properly.

When in place, the Master Boot Record holds a copy of BOOTACTV. When booted, BOOTACTV allows you to make a choice of which operating system to boot. BOOTACTV can then read a boot sector from a partition to load that operating system.

To install BOOTACTV, follow these steps:

1.  Boot Linux as usual. Make sure you have a boot floppy disk in case of problems.
2.  Copy your existing Master Boot Record to a floppy disk in case of problems. The command to copy the MBR from the main drive (/dev/hda) to a floppy using 512 character blocks (the default) is

dd if=/dev/hda of=/fd/MBR bs=512 count=1

3.  Use the setup or LILO installation program to copy LILO into the boot sector of the Linux partition (not the Master Boot Record).
4.  Install BOOTACTV into the Master Boot Record. The BOOTACTV utility is usually called bootactv.bin and should be in the current directory when you install it into the MBR with the following command:

dd if=bootactv.bin of=/dev/hda bs=446 count=1

5.  Reboot the machine to boot BOOTACTV from the Master Boot Record.

Your machine should load BOOTACTV and allow you to boot any other operating system on a partition. If Linux or another operating system does not boot, use your boot floppy disk to start Linux. If only Linux doesn’t boot, the boot sector LILO for the Linux partition is not working and can be rewritten using the setup or LILO configuration utilities. If none of the partitions will boot, remove BOOTACTV by replacing the old Master Boot Record with the following command:


dd if=/fd/MBR of=/dev/hda bs=446 count=1

You can also reinstall the Master Boot Record from within DOS, if you have a DOS boot floppy. When in DOS, issue the following command:


fdisk /mbr


Tip:  
If you don’t want to alter your Master Boot Record but have more than one partition dedicated to Linux, you can install BOOTACTV on one of the partition’s boot sectors and use the fdisk utility to toggle the active partition. However, if the hard disk is repartitioned or the file systems are altered in size, the boot sector has to be rewritten. To write BOOTACTV to the fourth primary hard disk partition, for example, copy the existing MBR to the partition’s boot sector, then install BOOTACTV with the following commands:

dd if=/dev/hda of=/dev/hda4 bs=512 count=1

dd if=bootactv.bin of=/dev/hda4 bs=446 count=1


DOS and Linux

Most Linux installations coexist with DOS and use the DOS Master Boot Record. In this case, the MBR is read and the active partition (set by fdisk) is booted automatically. This is one of the safest installation methods because no changes to the DOS-installed Master Boot Record are performed, and it is easy to remove or reconfigure partitions at any time without worrying about compatibility with the MBR.


Note:  
Later versions of DOS (6.00 or higher) overwrite an existing MBR if installed after Linux. This makes it impossible to boot Linux from the MBR, although DOS will boot. Fix the problem by running LILO again or by making the Linux partition active.

The active partition can be changed at any time using the fdisk utility or the Linux utility activate. The setup program within Linux can usually change the boot partition, too. Only one partition on a hard disk can be active at a time. Some operating systems, including Linux, let you change your mind about which operating system to boot after the active partition has been read, assuming a delay was built into the boot process. Linux, for example, can display the boot: prompt and wait for a reply or a timeout to occur before starting to boot Linux.

To use this approach for Linux, simply install LILO into the boot sector of the Linux partition. To make it bootable, run fdisk and set that partition number as the active partition. Rebooting the machine will boot into the active partition.

When Linux is replaced or removed, the boot sector of the new operating system overwrites the Linux partition’s boot sector, requiring no changes to the MBR.


Previous Table of Contents Next