LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Installing GRUB2 to a dedicated partition (http://www.linuxquestions.org/questions/linux-general-1/installing-grub2-to-a-dedicated-partition-938504/)

jpr123 04-06-2012 12:22 PM

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.
Code:

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

2.
Code:

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

3.
Code:

grub-install /dev/sda6
Thanks.

Larry Webb 04-06-2012 01:24 PM

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

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 11:44 PM

Unfortunately it did not work.
Code:

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.

Code:

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

Code:

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


Larry Webb 04-09-2012 04: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 03:19 AM.