public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Date: Sun, 28 Apr 2024 16:08:29 -0500	[thread overview]
Message-ID: <bd296344-3e7d-a3a7-555a-a1e45e4ce50c@gmail.com> (raw)
In-Reply-To: <2606819.Lt9SDvczpP@rogueboard>

Michael wrote:
> On Sunday, 28 April 2024 19:39:16 BST Dale wrote:
>> Grant Edwards wrote:
>>> On 2024-04-28, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>>>> With DOS disk lables, Grub uses empty space between the boot sector
>>>> and the first partition as a location to store it's core image file.
>>>> That empty space does not exist when using GPT disk label. When using
>>>> a GPT disk label, Grub requires that you need to create a "BIOS Boot"
>>>> or "Grub Boot" partition so that Grub has somwhere to store it's core
>>>> image[1].
>>> And it bears repeating that the bios/grub boot partition only needs to
>>> be 1 or 2MB in size, is _not_ formatted with a filesystem, and is
>>> _not_ the same as either
>>>
>>>  1) The "boot" directory where the kernel images and grubs other files
>>>  
>>>     are installed within a Linux filesystem. [Which you still need
>>>     when booting in Legacy/BIOS mode.]
>>>   
>>>   or
>>>  
>>>  2) The UEFI partition that's formated with a FAT filesystem and used
>>>  
>>>     in UEFI boot mode [which you don't need when booting in
>>>     Legacy/BIOS mode.]
>> I think I got a grasp on this now.  Basically, partitions should be like
>> this. 
>>
>>
>> First spot is the alignment thing.  Usually a few MBs or so and unused.
> This is created automatically by the partitioning tool, in your case cgdisk, 
> when you create the first partition on the disk and accept the default 
> starting sector.
>
>
>> Grub boot partition with ef02 setting, not to be formatted.
>>
>> /boot partition for kernel and init thingy.  Usually 1GB or so, enough
>> for memtest, bootable rescue image etc. 
>>
>> / or root partition that is around 150GBs or so.  Enough to expand a bit
>> and includes /usr and /var.
>>
>> /home  rest of disk unless some needed for something else.
>>
>>
>> Do you recall when running grub-install what that command looks like? 
>> Lets say the Grub partition with ef02 setting is sda1, would it be
>> grub-install /dev/sda1 or just sda and it finds the empty partition on
>> its own?
> The unformatted and empty /dev/sda1 'BIOS Boot Partition' will be found by 
> GRUB when you run grub-install and it will store its core.img in there.
>
> You install GRUB's boot.img in the MBR and therefore you have to specify the 
> disk, NOT a partition, e.g.:
>
> grub-install /dev/sda
>
> This command should:
>
> 1. Install GRUB's boot.img in the MBR of /dev/sda.
> 2. Install GRUB's core.img in /dev/sda1 which you created as a 'BIOS boot 
> partition', type EF02.
> 3. Create directory /boot/grub to install all the grub fs drivers and files.
>
> If you have mounted /boot, all is well.  If you are repairing an installation 
> from a liveUSB you can mount the /boot partition, e.g. /mnt/gentoo/boot and 
> specify this in the CLI:
>
> grub-install --boot-directory=/mnt/gentoo/boot /dev/sda
>
> NOTE:  As per the link Grant helpfully posted you can create the 'BIOS boot 
> partition' with cgdisk "... by setting the partition type to 0xEF02 and giving 
> it a label of gptbios".
>
> https://wiki.gentoo.org/wiki/GRUB#BIOS_with_GPT
>

That's what I was thinking.  I think I got it.  I need to make notes of
this tho.  Before I forget.  :/ 

Thanks to all.

Dale

:-)  :-) 


  reply	other threads:[~2024-04-28 21:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27 16:53 [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing Dale
2024-04-27 16:59 ` Wojciech Kuzyszyn
2024-04-27 17:48 ` Mark Knecht
2024-04-27 18:33 ` Michael
2024-04-28  5:24   ` Dale
2024-04-28  9:14     ` Michael
2024-04-28 17:13   ` [gentoo-user] " Grant Edwards
2024-04-28 17:40     ` Grant Edwards
2024-04-28 18:39       ` Dale
2024-04-28 20:31         ` Michael
2024-04-28 21:08           ` Dale [this message]
2024-04-28 21:32             ` Dale
2024-05-01 19:36               ` Dale
2024-05-01 20:03                 ` Grant Edwards
2024-05-01 20:20                   ` Dale
2024-05-01 20:25                     ` Grant Edwards
2024-05-01 23:45                       ` Dale
2024-05-02  9:35                         ` Michael
2024-05-02 10:43                           ` Dale
2024-05-15  7:39                           ` Wols Lists
2024-05-02 10:46                         ` Peter Humphrey
2024-05-15  7:42                           ` Wols Lists
2024-05-15 10:40                             ` Peter Humphrey
2024-05-15 17:38                               ` Wols Lists
2024-05-15 17:57                                 ` Grant Edwards
2024-05-15 23:54                                   ` Peter Humphrey
2024-05-16  0:10                                 ` karl
2024-05-16  8:26                                   ` Michael
2024-05-16  9:22                                     ` Nuno Silva
2024-05-16 16:41                                     ` Dr Rainer Woitok
2024-05-16 16:46                                       ` Michael
2024-05-18  9:16                                         ` Dr Rainer Woitok
2024-04-28 22:42       ` Wol
2024-04-27 19:21 ` [gentoo-user] " Wols Lists
2024-04-28  8:43 ` Mickaël Bucas
2024-04-28 12:57   ` Dale
2024-04-28 13:10     ` Michael
2024-04-28 13:17       ` Dale
2024-05-05  6:31         ` Dale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd296344-3e7d-a3a7-555a-a1e45e4ce50c@gmail.com \
    --to=rdalek1967@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox