LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub2 installation problem (http://www.linuxquestions.org/questions/linux-software-2/grub2-installation-problem-747925/)

firewiz87 08-16-2009 10:09 AM

grub2 installation problem
 
I want to install grub2 into my external hard drive... so that i can boot from my external HDD when necessary....

So this is what i did:
1. Downloaded grub 1.96
2. Build as per instructions
3. Run the command grub-install /dev/sdb

where sdb is my external hard disk... but after issuing the grub-install, i noticed that no /boot/grub folder was created in the ext.HDD. I think the /boot of my system was replaced.... i had a backup luckily.

Since the command, grub-install /dev/sdb is supposed to install grub to /dev/sdb.... should nt it copy the files to /boot/grub inside /dev/sdb ??

Is this what the grub-install is supposed to do?? how can i make it copy the files to the ext hard disk??

thanks for your help in advance....

ronlau9 08-16-2009 12:45 PM

Why did you download grub ?
Grub is always provided by the distro you are installing.
At the rescue mode of linux rescue

type the next commands
chroot/mount/sysimage/
grub install /dev/sdb/

firewiz87 08-16-2009 02:35 PM

This is grub2 i am talking about.... wanted to test it

ronlau9 08-17-2009 12:10 AM

Quote:

Originally Posted by firewiz87 (Post 3645608)
This is grub2 i am talking about.... wanted to test it

Did opensuse 11 not using GRUB 2

firewiz87 08-17-2009 02:56 AM

Quote:

Originally Posted by ronlau9 (Post 3646052)
Did opensuse 11 not using GRUB 2

As far as i know, openSUSE 11.1 does not use grub2.From what i have read, I think only ubuntu jaunty (as of now) gives users the ability to upgrade to grub2 through package manager... all rescue CD's as of now uses grub legacy not grub2 thats why i had to download n build it

Anyway the problem has been resolved. It was a misunderstanding from my part.... ie i thought the command,
Code:

grub-install /dev/sdb
copied the grub files to boot folder inside /dev/sdb where as it installed the grub files to the /boot of the system on which the command is executed.

The correct way to install grub to a non-native device is by using the root-directory option as shown below:
Code:

grub-install --root-directory=/mnt/usbdevice /dev/sdb
where /mnt/usbdevice is the mount point of /dev/sdb1

Thanks for your help my friends...


All times are GMT -5. The time now is 09:52 AM.