[NTLUG:Discuss] GRUB and USB drives.
Leroy Tennison
leroy_tennison at prodigy.net
Mon Sep 10 00:18:34 CDT 2007
Daniel Hauck wrote:
> Simple: pull the hard drive.
>
> Steve Baker 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
>>
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
This is really a two-part question: the first is how to get grub to
install the boot loader on the USB drive and the second is how to get
it activated at boot time.
Concerning "part one", have you tried grub-install? If that's not
available then, during the SuSE install (I'm looking at 10.1 but suspect
10.2 isn't too different) on the Installation Settings screen you can
click Change, select Partitioning, select Create Custom Partition Setup
and tell SuSE which partition to install on. From the Expert tab on
this screen you should be able to select Booting then the Boot Loader
Installation tab to tell grub where to install. You might be able to
get here by launching the SuSE 10 install and selecting Upgrade but I
haven't tried it.
Now, concerning how to get grub to be activated:
If the BIOS does what it claims, just do it. It will be far easier and
keep the Winders drive far more "pure". Other BIOS tricks (if
supported) are to change the boot drive order - if you do this you may
also have to mark the USB drive partition as Active as well.
Another idea:
Unless it's Vista, Windows uses a hidden file at root called boot.ini.
Try the instructions at
http://www.pmg.lcs.mit.edu/~chandra/install/install_dualboot.html and
see if they work for you (I took about five minutes and tried it on a
system I had and it worked - too easy). From this reference basically you:
plug in your usb drive (once it has grub installed on it)
boot to Linux with a live CD
'dd' the boot sector to a floppy
reboot to Windows
copy the boot sector to the root of C:
At a command prompt change to C:\ and do either 'notepad boot.ini' or
'edit boot.ini'. Add a line at the bottom: C:\<name of boot sector
file>="<Whatever label you want to associate with it>"
If it's Vista then you will have to do the Web research and let us know
what you find...
More information about the Discuss
mailing list