Grub and USB
Rashkae
ubuntu at tigershaunt.com
Wed Aug 20 13:24:41 UTC 2008
James Takac wrote:
> Hi Karl
>
> On Wednesday 20 August 2008 10:50:14 Karl Larsen wrote:
>> New Subject. I have a running hard drive connected to my computer
>> via a USB port. I need to put grub in the MBR of the USB hard drive OR
>> put it on /media/disk/. I have a big problem with this. Grub likes to
>> work with (hd1,2) and all my experience has been with things that will
>> match that kind of partition location.
>>
>> People on this list have said it is a simple matter to get a USB
>> hard drive to boot if you put the grub root at /media/disk/. I say you
>> can't do that because /media/disk/ is NOT a partition. You might treat
>> the whole hard drive as a partition but how? It isn't /dev/sb4 or like
>> that. In fact I did a df and it calls the USB hard drive /dev/sdb1. now
>> /dev/sdb1 is (hd1,0) which I can work with. I will try getting grub
>> running and say:
>>
>> grub root (hd1,0)
>> grub setup (hd1,0)
>> grub quit
>>
>> This should work.
>>
>> Karl
>>
>
>
> I've got it going once or twice and from memory I had to edit the refs in
> menu.1st to reflect (hd0,0) as the boot drive is seen as hd0
>
I've always used the grub shell.. First you need to determine what
device your USB hard drive is located at. /media/disk is a mount point,
but not the device node. Use the mount command (with no other
arguments) to list all your mounted filesystems.
Assume somewhere is a line that says /dev/sdc1 is mounted on /media/disk
(substitute sdc with whatever matches your system)
Now run grub, and use these commands.
device (hd0) /dev/sdc
root (hd0,0)
setup (hd0)
quit
**Notes:.. (hd0,0 assumes your /boot is on the first partition of your
usb drive, Increment the last 0 as needed
I'm not sure is 'quit' is the right way to get out of the grub shell, it
might be 'exit' instead, or something else,, I'm sure you'll figure it
out :)
More information about the ubuntu-users
mailing list