Last Updated: 16-Aug-2011
After installing Ubuntu on a desktop PC, you may want use a bootloader other than GRUB for some reasons. For me, GRUB is not (yet?) able to boot my Intel DG965RY motherboard properly. (Check this for details.) You can choose to use extlinux [syslinux.zytor.com], which is a variant of the famous syslinux [syslinux.zytor.com] bootloader for ext2/ext3/ext4 filesystems. The steps here have been tested on from Ubuntu 8.10 to Ubuntu 11.04 (Natty) (wow, time flies!) but should be applicable to other Linux distros as well.
You need to have a Ubuntu Live Installation CD / USB stick to do the job.
fdisk and its command 'a' to toggle the bootable flag of each partition.extlinux to check if you have it. If not, you have to connect to the internet, enable the 'Universe' repository, reload the package information, and install it. If internet is not available, consider using other rescue CDs to do the job.$ sudo mount /dev/sda3 /mnt
$ sudo mkdir -p /mnt/boot/extlinux/ $ sudo extlinux -i /mnt/boot/extlinux/
This will install a file extlinux.sys under /boot/extlinux/ and update the boot sector of the bootable partition.
$ sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
(I tried to use 'cat' but encounter 'Permission denied' problem.)
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.38-8-generic APPEND initrd=/boot/initrd.img-2.6.38-8-generic root=UUID=82498ebf-f596-45b7-b81a-940bf73a6d6a ro quiet splash TIMEOUT 30 PROMPT 1
This asks extlinux to give you a prompt, and wait for your for 3 seconds before it boots the default image. If you give the PROMPT a value of 0, then the prompt will be displayed only if the Shift or Alt key is pressed, or Caps Lock or Scroll lock is set.
If your are using an old Ubuntu system which is still using GRUB1 instead of GRUB2, then you can refer to /boot/grub/menu.lst and 'translate' the entry for extlinux easily. What about GRUB2? It is better that you figure out the information required by hand.
/boot/vmlinuz-*.initrd=: Use the latest initrd file name in /boot/initrd.img-*. It should match the kernel file.root=UUID=: The root partition, which is the UUID for /dev/sda3 in our example. The easiest way to get the UUID is by issuing $ sudo blkid. You can also get it by visiting /dev/disk/by-uuid/. (Can you refer to /dev/sda* instead of using UUID? You can, but you may encounter some problems if you use several hard disks. Especially if some use SATAs, or you need to change your hard disk(s).)Reboot the computer, and extlinux should work! Done!
Once it is working properly, you may want to customize the configuration file more according to suit your need.
extlinux.conf file manually. For safety, create a new entry instead of replacing the existing one!grub to a new version.
Comments
Can easily remove grub-pc
When you are done, you can remove grub-pc or grub with sudo apt-get purge grub-pc
Also, as of this writing extlinux still doesn't need ext4 file systems