-   Linux - General (
-   -   Installing GRUB2 to a dedicated partition (

jpr123 04-06-2012 11:22 AM

Installing GRUB2 to a dedicated partition
Hi all,

I want to install Grub2 to a dedicated partition - sda6
Grub2 will go to sda6 partition boot sector.
Grub2 files will also be in sda6
MBR will be unchanged.
I will chainload Grub2 from the Windows XP boot manager.

I will be installing from a Parted Magic Live CD (February 2012).

Which of the following are the right commands to use?

1. Found this one on the web, slightly changed. Not sure about the '/dev' usage.

mkdir /mnt/sda6/boot
mount /dev/sda6 /mnt/sda6
mount --bind /dev /mnt/sda6/dev
grub-install --boot-directory=/mnt/sda6/boot --force /dev/sda6


mkdir /mnt/sda6/boot
mount /dev/sda6 /mnt/sda6
grub-install --boot-directory=/mnt/sda6/boot /dev/sda6


grub-install /dev/sda6

Larry Webb 04-06-2012 12:24 PM

using thw live cd and from terminal #2 should work fine.

mkdir /mnt/sda6/boot
mount /dev/sda6 /mnt/sda6
grub-install --boot-directory=/mnt/sda6/boot /dev/sda6
You will still need to create a grub.cfg file or boot from the grub prompt.

jpr123 04-08-2012 10:44 PM

Unfortunately it did not work.

root@PartedMagic:~# mkdir /media/sda6
root@PartedMagic:~# mount /dev/sda6 /media/sda6
root@PartedMagic:~# mkdir /media/sda6/boot
root@PartedMagic:~# grub-install --boot-directory=/media/sda6/boot /dev/sda6
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.


root@PartedMagic:~# grub-mkconfig -o /media/sda6/boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot stat `aufs'.


root@PartedMagic:~# grub-install --version
grub-install (GRUB) 1.99

Larry Webb 04-09-2012 03:56 AM

You need to have a mbr of a h/d point to the grub particion.

grub-install --root-directory=/media/sda6/boot /dev/sda

All times are GMT -5. The time now is 04:39 AM.