1

I'm following this tutorial of Dedoimedo to install GRUB on USB flash drive. Though this tutorial doesn't talk of installing in pen drive but I though it can be used here even.

       [ 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> find /grub/stage1
 (hd0,4)

grub> root (hd0,4)

grub> setup (hd1)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd1)"...  21 sectors are embedded.
succeeded
 Running "install /grub/stage1 d (hd1) (hd1)1+21 p (hd0,4)/grub/stage2 /grub/me
nu.lst"... succeeded
Done.

grub> 

Still I don't see anything in the flash drive. Also when I rebooted my laptop setting USB flash drive to boot, it didn't boot from my USB.

Please throw some light on this.

[I have seen sites (pendrivelinux.com) http://www.pendrivelinux.com/install-grub2-on-usb-from-ubuntu-linux/ where it talks on installing on USB but I want to know why my method isn't working]

Ravi
  • 3,823
  • 1
    hd1 in grub is most likely your second hard drive. I could be wrong though. – UVV Jan 13 '14 at 08:05
  • @UVV I too feel the same. So for booting from the usb flash drive (which is hd1) is it that I need to chainlod it from default GRUB which is in hd0? And for that I need to make an entry in menu.lst to include hd0 GRUB! – Ravi Jan 13 '14 at 13:07
  • @UVV from your comment one thing struck my mind. Installing GRUB on hd1 (usb flash drive) doesn't mean that my laptop would boot from it? I was thinking that way only that installing GRUB on usb will make my usb bootable. But whatever the case be, why after running the above commands, the contents of flash drive doesn't show anything related to the installation of GRUB. I went to the folder where my usb was mounted & ran ls -a but it didn't reflect. – Ravi Jan 13 '14 at 13:16
  • 1
    setup command of grub installs booting sector of grub to the MBR of a device, not data files to partition or a drive itself. – UVV Jan 13 '14 at 13:21
  • Did you toggle boot flag in your partition? – Patrick Feb 01 '14 at 15:16

0 Answers0