help-grub
[Top][All Lists]
Advanced

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

Re: Clarification of what grub-install does, versus grub-mkconfig/update


From: Pascal Hambourg
Subject: Re: Clarification of what grub-install does, versus grub-mkconfig/update-grub
Date: Fri, 22 Nov 2019 23:26:48 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Le 22/11/2019 à 23:07, Chris Green a écrit :
On Fri, Nov 22, 2019 at 10:40:18PM +0100, Pascal Hambourg wrote:

No, there is no default location for the boot image and core image. Anyway
"first hard disk" is meaningless. First for what ? The BIOS ? Linux ?

So how does it decide?  ... or at least how does, for example, an
Ubuntu install decide?

I don't know how the Ubuntu installer works. The Debian installer asks the user to choose.

Yes, I see that, one can install them on every drive but which gets
run at boot time then?

The one on the disk booted by the BIOS according to its boot preference order.

What I still don't quite understand is what happens with (as I have)
more than one OS installed.  Presumably only one grub.cfg gets used
even though there is more than one. How does the initial boot process
(starting with MBR etc.) and created by grub-install decide which
/boot it should use (and is it easy to change which /boot it goes to?).

The BIOS boots one drive. Its MBR contains a GRUB boot image which loads and
runs the core image of the same installation, which loads modules and
configuration files from the same installation.

But someone said it doesn't matter which drive is marked as the boot
drive,

What do mean by "marked as the boot drive" ?
As I already wrote, there is no disk boot flag in the MBR, only primary partition boot flags. The BIOS should not care about the boot partition flag, but some non compliant implementations consider a disk for booting only if one of its partitions has the boot flag set. If your PC has such BIOS implementation, you can set the boot flag to a primary partition on the boot disk.

how does the BIOS decide which drive to boot from?

From the boot order defined in the BIOS settings.



reply via email to

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