help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does grub-install do?


From: Goh Lip
Subject: Re: What does grub-install do?
Date: Sat, 02 Oct 2010 00:01:28 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]