Tuesday, May 22, 2007

Ubuntu 7.04 (Feisty Fawn) on an external USB drive

First of all make sure you're using an ubuntu alternate cd instead of a live cd. The alternate cd lets you do a lot more than the live cd , it also includes the rescue mode missing in live cd's.

The alternate cd can be downloaded from here .

Boot from the cd , and use the text mode to install. Follow the instructions till you reach the point where you are asked to choose to partition the harddrive .

1 - Do a ALT - F2 , and find out what is your external drive. Simpy execute fdisk -l.

2 - I didnt choose the LVM install , sometimes people face problems . Choose your usbdrive . it should be more like sda , sdb . Mine was the second drive so it was sdb.

3- Let the wizard do the package installation , you can do a ALT-F4 to see if its really installing the packages as at times it seems to get froze.

4- When you are asked to choose the location to install grub make sure you type/choose the name of your usbdrive . In my case it was /dev/sdb.

5 - You'll be asked to take the cd out and do a reboot after everything is done.

6- Dont take the cd out do the reboot , get into the rescue mode . You need to go through a few steps again like language settings , keyboard and all that. Finally you'll be presented with a screen to choose the partition where the root filesystem is installed / to be rescued.

Choose the correct partition , in my case it was /dev/sdb1. The installer will mount this partition can leave you at a Shell prompt . Do a ALT F 2 to open another shell and do su - t get a root shell.

7- vim /etc/initramfs-tools/modules add the following modules

vim /etc/mkinitramfs-tools/initramfs.conf , add the line

9- Recompile the initrd.img
mkinitramfs -o /boot/initrd.img-kernal-version /lib/modules/kernel-version

Edit the /boot/grub/menu.lst . Search for groot , change it to groot(hd0,0). Also just after the comment "End Default Options" change the root to (hd0,0) , repeat the same for rescue and memtest entries . Also change the entry for Windows incase you have a dual boot with windows , for this change root to (hd1,0).

Take the cd out , Reboot . Make sure you enabled boot from usb in the bios .
Modified from the original article from Ubuntu forums article for Ubuntu 5.10 Breezy Badger

No comments: