Run grub-install from a live CD

From ArchBang

Jump to: navigation, search
m (added more info on drive/partition numbers, error I got and resolution of error.)
Line 18: Line 18:
   (hd0,0)
   (hd0,0)
-
Next enter the command to install grub to the mbr:
+
Grub numbers the hard drives and partitions starting with 0.  So hd0,0 would be the first partition on the first hard drive.
 +
 
 +
Next enter the command to install grub to the master boot record (MBR):
   # grub> setup (hd0)
   # grub> setup (hd0)
 +
 +
If you need to install grub to a partition instead of the MBR, then enter that partition.  For example, to install on the second partition of the first hard drive enter:
 +
 +
  # grub> setup (hd0,1)
 +
 +
If you get an error like "Error 12: Invalid device requested".  Then enter:
 +
 +
  # grub> root (hd0,0)
 +
 +
Using the location of the boot directory as found by the find command above.  Then run the setup command again.
Finally exit the grub shell:
Finally exit the grub shell:
   # quit
   # quit
-
 
If you can't get grub to find the stage1 file or even recognize your drive then we'll use a Gentoo tip:
If you can't get grub to find the stage1 file or even recognize your drive then we'll use a Gentoo tip:

Revision as of 04:40, 30 November 2011

Personal tools