[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Do I need to act on this warning from apt when installing grub?
From: |
Pascal |
Subject: |
Re: Do I need to act on this warning from apt when installing grub? |
Date: |
Fri, 16 Dec 2022 15:32:51 +0100 |
does this new summary, which takes into account the previous feedback, seem
"better" to you ?
Is the second remark² correct ?
is the boot sector of the image directly/readily accessible (eg. editable
with hexedit) in the boot sector ?
regards, lacsaP.
GRUB :
INTEL/MBR GPT
PARTITIONING PARTITIONING
┌─────────────────────┬─────────────────────┐
│MBR 1/3 │MBR 1/3 │
│POST-MBR-GAP 2/3 │ │
│┌───────────────────┐│┌───────────────────┐│
││PART │││PART BIOS-BOOT 2/3 ││
││/boot/grub/ 3/3 ││└───────────────────┘│
BIOS ││... ││┌───────────────────┐│
BOOT ││ │││PART ││
││ │││/boot/grub/ 3/3 ││
││ │││... ││
│└───────────────────┘│└───────────────────┘│
├─────────────────────┼─────────────────────┤
│ │ │
│ │ │
│┌───────────────────┐│┌───────────────────┐│
││PART ESP (FAT) │││PART ESP (FAT) ││
││/boot/efi/ 1/2 │││/boot/efi/ 1/2 ││
UEFI ││/boot/grub/ 2/2 │││/boot/grub/ 2/2 ││
BOOT ││... │││... ││
││ │││ ││
││ │││ ││
│└───────────────────┘│└───────────────────┘│
└─────────────────────┴─────────────────────┘
3 steps for GRUB in BIOS mode and 2 steps in UEFI mode.
# in BIOS mode :
- 1/3 BIOS load and run GRUB boot loader located in the MBR
- 2/3 GRUB boot loader load and run GRUB core image stored in
POST-MBR-GAP (INTEL/MBR) or on BIOS-BOOT partition (GTP)¹
- 3/3 GRUB core image find and mount the GRUB folder², load configuration
etc..
# in UEFI mode :
- 1/2 UEFI³ load and run GRUB boot loader located on ESP⁴
- 2/2 GRUB boot loader find and mount the GRUB folder², load
configuration etc..
¹ in these two cases, start sector of GRUB core image is hard coded in GRUB
boot loader (during installation of GRUB)
² GRUB folder can be installed/located on any type of partition supported
by GRUB
³ or SHIM previously loaded and ran by UEFI if secured boot is activated
⁴ EFI System Partition formated with FAT file system (0xEF in INTEL/MBR and
C12A7328-F81F-11D2-BA4B-00A0C93EC93B in GPT)
Le ven. 16 déc. 2022 à 13:39, Pascal <patatetom@gmail.com> a écrit :
> thank you for this feedback.
>
> Le ven. 16 déc. 2022 à 12:47, Pascal Hambourg <pascal@plouf.fr.eu.org> a
> écrit :
>
>> On 16/12/2022 at 11:15, Pascal wrote:
>> >
>> > GRUB :
>> >
>> > INTEL/MBR GPT
>> > PARTITIONING PARTITIONING
>> > +---------------------+---------------------+
>> > |MBR 1/3 |MBR 1/3 |
>> > |POST-MBR-GAP 2/3 | |
>> > |+-------------------+|+-------------------+|
>> > ||PART |||PART BIOS-BOOT 2/3 ||
>> > ||/boot/grub/ 3/3 ||+-------------------+|
>> > BIOS ||... ||+-------------------+|
>> > BOOT || |||PART ESP (FAT) ||
>> > || |||/boot/grub/ 3/3 ||
>> > || |||... ||
>> > |+-------------------+|+-------------------+|
>> > +---------------------+---------------------+
>> > | | |
>> > | | |
>> > |+-------------------+|+-------------------+|
>> > ||PART ESP (FAT) |||PART ESP (FAT) ||
>> > ||/boot/efi/ 1/2 |||/boot/efi/ 1/2 ||
>> > UEFI ||/boot/grub/ 2/2 |||/boot/grub/ 2/2 ||
>> > BOOT ||... |||... ||
>> > || ||| ||
>> > || ||| ||
>> > |+-------------------+|+-------------------+|
>> > +---------------------+---------------------+
>>
>> 1) There is no need for an ESP for BIOS boot.
>> 2) /boot/grub does not have to be in the ESP.
>>
>> > 3 steps for GRUB in BIOS mode and 2 steps in UEFI mode.
>> >
>> > in BIOS mode :
>> > first, BIOS load MBC (Master Boot Code - step 1/3 of GRUB) from MBR to
>> > memory and run it
>> > - with INTEL/MBR partitioning, GRUB will be chained from MBR, then to
>> > POST-MBR-GAP (step 2/3) and then to /boot/grub/... (step 3/3)
>>
>> "GRUB will be chained from MBR" makes no sense and does not fit between
>> 1/3 and 2/3.
>>
>> > - with GPT partitioning, GRUB will be chained from MBR, then to a
>> special
>> > partition of type BIOS-BOOT (step 2/3 - can't use POST-MBR-GAP because
>> used
>> > by GPT) and then /boot/grub/... (step 3/3)
>>
>> From the GRUB boot loader point of view, both are exactly the same. The
>> GRUB boot image in the MBR does not read the partition table nor know
>> anything about the BIOS boot partition. The GRUB core image start sector
>> is embedded in the boot image in both cases. Only grub-install uses the
>> BIOS boot partition.
>>
>> > in UEFI mode :
>> > first, UEFI load an run a (GRUB) loader (step 1/2 of GRUB) located on
>> ESP
>> > (EFI system partition formated with FAT file system)
>> > then the loader chain to /boot/grub/... (step 2/2)
>>
>> With secure boot, the UEFI firmware first loads shim which then loads
>> GRUB.
>>
>>
- Re: Do I need to act on this warning from apt when installing grub?, (continued)
- Re: Do I need to act on this warning from apt when installing grub?, Chris Green, 2022/12/12
- Re: Do I need to act on this warning from apt when installing grub?, Randy Goldenberg, 2022/12/12
- Re: Do I need to act on this warning from apt when installing grub?, Chris Green, 2022/12/13
- Re: Do I need to act on this warning from apt when installing grub?, Goh Lip, 2022/12/13
- Re: Do I need to act on this warning from apt when installing grub?, Chris Green, 2022/12/14
- Re: Do I need to act on this warning from apt when installing grub?, Goh Lip, 2022/12/14
- Re: Do I need to act on this warning from apt when installing grub?, Pascal, 2022/12/15
- Re: Do I need to act on this warning from apt when installing grub?, Pascal, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?, Pascal Hambourg, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?, Pascal, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?,
Pascal <=
- Re: Do I need to act on this warning from apt when installing grub?, Pascal Hambourg, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?, Pascal, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?, Pascal Hambourg, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?, Goh Lip, 2022/12/16
- Re: Do I need to act on this warning from apt when installing grub?, Goh Lip, 2022/12/16