[NTLUG:Discuss] GRUB and USB drives.
terry
trryhend at gmail.com
Tue Sep 11 11:15:57 CDT 2007
On 9/9/07, Steve Baker <steve at sjbaker.org> wrote:
>
> I have an HP laptop with WinXP - and I'm not supposed to 'mess it up' by
> installing Linux onto it - but I have a 300Gb USB drive, so I'd like to
> boot Linux from that instead.
>
> The BIOS lets me hold down the ESC key during startup - and to select
> "boot from USB"...so this sounds do-able.
>
> I installed SuSE 10.2 on the USB drive - but GRUB tried to write to the
> laptop's internal drive instead...and that's a "No No".
>
> I can't figure out what to tell GRUB to make it install a boot loader
> onto the USB drive that'll boot from the USB drive. I can boot from a
> SuSE Live-CD and run grub - but I can't figure out what to tell it.
>
> The USB drive mounts as /dev/sda1 (system partition) and /dev/sda3
> (user partition). Both are formatted 'Linux Native'. The "must not
> touch" hard drive is /dev/hda
>
> Help! Thanks!
>
>
>
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
From:
http://forums.devarticles.com/the-lizard-lounge-10/linux-install-suse-on-an-external-usb-drive-6250.html
Create an INITRD Ramdisk that will force the kernel to preload USB support
during boot.
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!!!
--
<><
More information about the Discuss
mailing list