Skip navigation.
Home
Write anything I want to write...

Setup Extlinux Instead of GRUB for Booting Ubuntu 7.10

Note: Please check out the new post here if you use Ubuntu, as this post has become obsolete since the Ubuntu Live CD / USB stick is now shipped with extlinux. This post is however still useful for those distros that are not shipped with extlinux.

After installing Ubuntu on a desktop PC, you may want use a bootloader other than GRUB for some reasons. You can choose to use extlinux [syslinux.zytor.com], which is a variant of the famous syslinux [syslinux.zytor.com] bootloader for ext2/ext3 filesystems. The steps here have been tested on an Ubuntu system but should be applicable to other Linux distros as well.

1. Preparation

Prepare these:

  • Prepare a working SystemRescueCd [www.sysresccd.org], an excellent GNU/Linux system specifically design for repairing computer system and recovering data after a crash.
  • To be safe, the /boot directory of the GNU/Linux installed should reside in a primary partition. (It has been reported that extlinux may not always be able to locate a bootable logical partition successfully.)

2. Installation

2.1. Install Extlinux on the Bootable Partition

  1. Boot the SystemRescueCd CD-ROM/USB.
  2. Set the bootable flag of the partition you want to install extlinux to be active. The partition must use the ext2/ext3 filesystem, and should contain the /boot directory. You can use fdisk and its command a to toggle the bootable flag of each partition.
  3. Mount the partition you want to install extlinux. For example, if the partition is /dev/sda3, then do:
    $ mkdir /mnt/linux
    $ mount -t ext3 /dev/sda3 /mnt/linux
    
  4. Install the extlinux on the partition.
    $ mkdir -p /mnt/linux/boot/extlinux/
    $ extlinux -i /mnt/linux/boot/extlinux/
    
    This will install a file extlinux.sys under /boot/extlinux/ and update the boot sector of the bootable partition.

2.2. Create a Simple Extlinux Configuration File

Create a simple extlinux configuration file /boot/extlinux/extlinux.conf in the bootable partition. No need to rush for a sophisticated one because it is better to test if extlinux really works first. Below is a simple but working configuration file:

DEFAULT Ubuntu
LABEL Ubuntu
  KERNEL /boot/vmlinuz-2.6.22-14-generic
  APPEND initrd=/boot/initrd.img-2.6.22-14-generic root=UUID=82498ebf-f596-45b7-b81a-940bf73a6d6a ro quiet splash
TIMEOUT 100
PROMPT 1

To prevent typing error, I recommend copying /boot/grub/menu.lst to /boot/extlinux/extlinux.conf and working on it. It is not difficult to 'translate' an GRUB entry for extlinux. If we have:

title title
kernel kernel_file kernel_options
initrd initrd_file

The corresponding extlinux entry looks like:

LABEL title_without_whitespaces
  KERNEL kernel_file
  APPEND initrd=initrd_file kernel_options

2.3. Install the Master Boot Record

Finally, you need to update your master boot record with the one provided by extlinux. For example, if the first harddisk is /dev/sda, then do:

$ cat /usr/lib/syslinux/mbr.bin > /dev/sda

2.4. Reboot and Further Enhancement

Reboot the computer, and extlinux should work! Done!

Once it is working properly, you may want to customize the configuration file more according to your need.

growthflex

hi i read your post thank you for this information..................

EXTcellent

Many thanks. Very helpful indeed