help-grub
[Top][All Lists]
Advanced

[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 11:15:28 +0100

hi,
the table has been slightly modified and some explanations have been added.
please let me know if there are any errors or gaps in this summary.
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 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 ||...                |||...                ||
      ||                   |||                   ||
      ||                   |||                   ||
      |+-------------------+|+-------------------+|
      +---------------------+---------------------+

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)
- 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)

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)

Le jeu. 15 déc. 2022 à 11:31, Pascal <patatetom@gmail.com> a écrit :

>           INTEL/MBR           GPT
>          PARTITIONING     PARTITIONING
>       +----------------+----------------+
>       |MBR             |MBR             |
>       |POST-MBR-GAP    |GPT             |
>       |+--------------+|+--------------+|
>       ||PART          |||PART BIOS-BOOT||
>       ||/boot/grub/   ||+--------------+|
>  BIOS ||...           ||+--------------+|
>  BOOT ||              |||PART ESP (FAT)||
>       ||              |||/boot/grub/   ||
>       ||              |||...           ||
>       |+--------------+|+--------------+|
>       +----------------+----------------+
>       |                |                |
>       |                |GPT             |
>       |+--------------+|+--------------+|
>       ||PART ESP (FAT)|||PART ESP (FAT)||
>       ||/boot/grub/   |||/boot/grub/   ||
>  UEFI ||...           |||...           ||
>  BOOT ||              |||              ||
>       ||              |||              ||
>       ||              |||              ||
>       |+--------------+|+--------------+|
>       +----------------+----------------+
>
> Le mer. 14 déc. 2022 à 12:36, Goh Lip <g.lip@gmx.com> a écrit :
>
>>
>>
>> On 12/14/22 17:15, Chris Green wrote:
>> > On Wed, Dec 14, 2022 at 10:31:40AM +0800, Goh Lip wrote:
>> >>
>> >>
>> >> On 13/12/2022 18:55, Chris Green wrote:
>>
>> >>
>> >> Is your partition table GPT, not msdos?
>> >>
>> > Yes, it's GPT:-
>> >
>> >      Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
>>
>> >      Disklabel type: gpt
>>
>> >
>> >      Device       Start        End    Sectors  Size Type
>> >      /dev/sda1     2048       4095       2048    1M BIOS boot
>> >      /dev/sda2     4096    1054719    1050624  513M EFI System
>> >      /dev/sda3  1054720 1953523711 1952468992  931G Linux filesystem
>> >
>> >
>> > (There's an 8Tb USB drive as well, this is my backup system which
>> > lives in the garage, quite a way away from the house)
>> >
>>
>>
>> See
>> https://www.gnu.org/software/grub/manual/grub/grub.html#BIOS-installation
>>
>> To set up bios-legacy boot on gpt partitioning properly, you will need a
>> small partition labelled "bios_grub".
>> And yes, without it, as you found out, it will still install and boot.
>> But it will not be reliable and will, in time, likely to fail again. And
>> you can still make it work again the way you have done (and will likely
>> fail again).
>>
>> Personally, I would suggest that for gpt partitioning, boot in uefi. And
>> in msdos partitioning, boot in bios-legacy (though that too can be
>> booted in uefi boot - with unreliable performance).
>>
>> Hope this explains. Regards.
>>
>> ps: best when issuing grub-install command, use "--target=i386-pc" in
>> that command for boot-legacy boots and "--target=x86_64-efi" for uefi
>> boots, especially when installing legacy in gpt or uefi in msdos (latter
>> always not recommended, but I've done it)
>>
>>
>>
>>


reply via email to

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