Grub and USB

Karl Larsen k5di at zianet.com
Wed Aug 20 00:58:19 UTC 2008


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
>
>   
    Here is what happened:

      [ Minimal BASH-like line editing is supported.   For
         the   first   word,  TAB  lists  possible  command
         completions.  Anywhere else TAB lists the possible
         completions of a device/filename. ]

grub>  root (hd1,0)

grub> setup (hd1,0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1,0)"... failed (this is not 
fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd1,0)"... failed (this is not 
fatal)
 Running "install /boot/grub/stage1 (hd1,0) /boot/grub/stage2 p 
/boot/grub/menu
.lst "... succeeded
Done.

grub>

It appears that (hd1,0) has a boot system in it's MBR and IF the BIOS 
can find it it will boot. Now to try it... :-)

Karl


-- 

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
   PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7





More information about the ubuntu-users mailing list