How Do You Configure Linux To Run From A Usb Drive?
I Have A 100 GB External Hard Drive And Want To Install Linux On To It. I Am Thinking Of Using OpenSUSE, I Found Instructions On The Internet, Which Are Below. When I Tried To Do Them However I Got Lost At Step 7 Where It Started Speaking Of Adding The Kernel And The Initrd Image To Gub In The Master Boot Record, But How Do I Do This?
Thanks,
Ben
Instuctions:
In the case of suse, you do this by:
1. Install Suse to the USB device (/sda, or sdb etc) - make sure you select to have the grub bootloader installed on the USB drive too, and not the Master drive.
2. Boot from the CD into Rescue mode
3. Issue the following commands:
'mkdir /mnt/sysimage'
'mount /dev/sdaX /mnt/sysimage'
'chroot /mnt/sysimage'
NOTE: sdaX refers to the partition u installed Suse on and the mapping of the USB drive (could be /sdb or similar too).
4. Use VI to edit the following file - /etc/sysconfig/kernel'
5. Add the following into the quotes at the line that has: INITRD_MODULES=" "
ehci-hcd
ohci-hcd
uhci-hcd
sd_mod
usb-storage
THIS LINE SHOULD NOW LOOK LIKE THIS:
INITRD_MODULES="reiserfs ehci-hcd ohci-hcd uhci-hcd usb-storage sd_mod"
6. Issue the following commands:
'mount -tproc none /proc'
'mkinitrd'
7. Add the kernel and initrd image to the boot grub loader on the master boot record (NOTE: for the initrd line, just add initrd (hd1,6)/boot/initrd - where hd1,6 is relevant to your partition setup)
A typical default Suse 9.2 install grub line for this setup would look like below (be sure to substitute according to your configuration):
title Suse 9.2 (USB)
kernel (hd1,1)/boot/vmlinuz-2.6.8-24-smp ro root=/dev/sda2
initrd (hd1,1)/boot/initrd
8. REBOOT!!!
|