On Friday 01,October,2010 11:32 PM, Dennis Cao wrote:
Now, I find another confusing problem. If I choose to boot from USB
Hard Disk(/dev/sdb1), the screen will show the welcome message of Grub
1.97 beta, then it quickly show the grub menu which is configured in
the hard disk (/dev/sda8).

I wonder whether this is caused by the command 'grub-install'? Because
I still do not very understand what '--root-directory' does in the
grub-install command.  According to Goh's explanation, I guess it
installs the boot.img and core.img to specified device and tried to
load 'grub.cfg' from {boot-device}:{root-directory}. Is it right?


Cao, when you just do a "grub-install /dev/sda" it 'sets' the grub to the mbr. Similarly, when you do a "grub-install /dev/sdb" it sets the grub to that disk's (sdb) mbr section. So when you boot from sdb directly, it uses the grub from where it was set from. That's what exactly it does.

When you do a "grub-install --root-directory=/media/something /dev/sda", it creates a /boot and /boot/grub/ (without any grub.cfg) from the OS to that /media/something and sets the /media/something's grub to the mbr.

Hope that is clear. Good luck again.

Regards - Goh Lip

_______________________________________________
Help-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to