When I installed my first Linux distro several weeks ago I looked around the web trying to figure out how to boot the distro from Grub4Dos and I got the impression that the task is next to impossible or, at best, extremely complicated. As it turns out, booting Linux from Grub4Dos is actually quite easy, but it's not intuitive, poorly documented, and can be outright intimidating for new Linux users migrating from Windows. So I decided to create this thread, with the intention that it becomes a place for tips and tricks about booting Linux.
In the three examples below Xubuntu is installed on the seventh partition on the first hard disk (/dev/sda7). In theory all this should work the same for any distro based on Ubuntu that has Grub2 bootloader.
Example #1: booting using hard coded UUID
1) Convert the partition number: Linux => Grub4Dos
/dev/sda7 => (hd0,6)
2) Find out UUID of boot partition /dev/sda7 - run the following command from the terminal, UUID will be shown in the right column:
blkid -o list
Tip for newcomers from Windows: Linux terminal has Edit-Copy functionality, so you can easily copy/paste UUID to your menu.lst.
3) Copy UUID on the kernel line as shown in the code example below. UUID must be followed by a space and ro (which stands for "read only").
4) Check the kernel version number in /boot directory (in the example below it is 3.13.0-35):
http://i.imgur.com/KleEUE1.png
5) Create menu.lst file:
title Xubuntu root (hd0,6) kernel /boot/vmlinuz-3.13.0-35-generic root=UUID=95c8g184-fdze-7b49-8st5-b88g4f5d3729 ro initrd /boot/initrd.img-3.13.0-35-generic
To get the splash screen add the following at the end of kernel line: quiet splash
kernel /boot/vmlinuz-3.13.0-35-generic root=UUID=95c8g184-fdze-7b49-8st5-b88g4f5d3729 ro quiet splash
The default Xubuntu installation also has $vt_handoff parameter at the end. For the life of me I couldn't figure out what it is supposed to do so I just removed it and the distro boots just fine without it. For the record, here is the original kernel line with all default parameters:
kernel /boot/vmlinuz-3.13.0-35-generic root=UUID=95c8g184-fdze-7b49-8st5-b88g4f5d3729 ro quiet splash $vt_handoff
6) Remember that after each kernel upgrade the kernel version must be manually edited in menu.lst.
----------
To see all default kernel parameters do the following:
- boot to Grub2
- select the line that reads Advanced Boot Options or something similar
- hit Edit (it's usually E key)
- check the kernel line
Example #2: booting via Grub2. This may be handy in case the previous boot method has stopped working for some reason.
title Grub2 of Xubuntu kernel (hd0,6)/boot/grub/i386-pc/core.img
Example #3: booting with symlinks
The following method uses symlink to vmlinuz file, so you never have to edit menu.lst after kernel updates. Sounds good on paper, but on my system the boot process seems to be slower compared to the method with hard coded UUID described in Example #1. Sometimes the system just won't boot at all. Maybe the kernel line needs some changes:
title Xubuntu (symlink) root (hd0,6) kernel /vmlinuz root=/dev/sda7 ro initrd /initrd.img