[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 22:40:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
Le 22/11/2019 à 18:08, Chris Green a écrit :
grub-install installs the 'invisible' bits of grub like the MBR and
the code executed after the MBR. These reside on parts of the disk
that one can't normally 'see'.
Yes. They are called the boot image and the core image, which must
reside on the same disk. grub-install also installs GRUB modules in
/boot (by default) or in the location specified with --boot-directory.
They are installed, by default, on the 'first' hard disk.
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 ?
There only needs to be one set of these 'bits',
But there can be as many as you want, in every disk and every partition.
grub-mkconfig (or update-grub on ubuntu etc.) creates the grub
configuration file and other stuff that resides in the /boot
directory.
No, grub-mkconfig/update-grub generates only the configuration file
/boot/grub/grub.cfg. Other GRUB files are installed by grub-install.
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.