LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How Do You Configure Linux To Run From A Usb Drive? (https://www.linuxquestions.org/questions/linux-general-1/how-do-you-configure-linux-to-run-from-a-usb-drive-489190/)

Ben Cook2 10-03-2006 08:53 PM

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!!!

darinbolson 10-04-2006 12:19 AM

Have you tried puppy on usb? It installs very easily and has a wide range of apps.

Ben Cook2 10-07-2006 02:29 AM

Thanks For The Puppy Live CD Idea But It Would Be Really Good To Try To Install OpenSUSE/Ubuntu As Some People Have Done It. I Just Get Lost At How To Change The GRUB Boot Parameters, And Where Would I Change Them?

michaelk 10-07-2006 08:09 AM

The grub boot parameters are located in the grub menu file i.e. /boot/grub/menu.lst. Use any text editor like vi to modify the file with your new initrd name.

Ben Cook2 10-08-2006 02:10 PM

Thanks For That Information But I Have Just Learned That SUSE 10.1 Setup Can Correctly Write/Configure The Initrd File & The Kernel. And Therefore The Boot Lines
Source: http://www.suseforums.net/index.php?showtopic=23904&hl= [It's Oldmans Post]


All times are GMT -5. The time now is 04:27 PM.