Michael wrote: > On Saturday, 27 April 2024 17:53:25 BST Dale wrote: >> Howdy, >> >> I'm installing Gentoo on another old box. To be consistent I like to >> use cgdisk, GPT I think it is called, to partition all my drives, >> regardless of size. > GPT is the partition table structure, which is more advanced than the old DOS > partition table structure. >
I just wasn't 100% sure what it was called. >> Thing is, Grub works differently with GPT than it >> does with the old DOS or whatever it is called, like fdisk does in the >> old days. > GRUB works the same, but the disk/partition table structure is different. > > >> I did some research but still find myself in some muddy >> waters. My take on some things I've read, I need a boot partition, not >> to be confused with the /boot for kernels, init thingys and such. Where >> I get lost, most use gdisk. I like cgdisk. Before that I liked >> cfdisk. Anyway, how do I set up that partition with cgdisk? Any >> minimum size requirements or tiny is enough? > 1MB OK. You know that "alignment" thing that is always on the beginning of a drive, could it use it? I think it is like 2MBs or something. >> Does it have to be a >> specific type? > Yes, it has to be set up as a "BIOS Boot Partition", with the "ef02", or GUID > 21686148-6449-6E6F-744E-656564454649. > Light bulb moment. I've seen 8300 and friends, 8200 etc but never seen EF02 before. Now I see what that type means. That cleared up some muddy water. That lead me to finding this, it has a nice table of common codes. https://wiki.archlinux.org/title/GPT_fdisk >> Does it need to be in a specific place? > Not necessarily, but since you're not booting this disk on a UEFI MoBo and > consequently won't be using an EFI System Partition (ESP), the very first > partition is fine and will be out of the way of the remaining disk. > > >> Formatted with a file system? > Do not format it. The raw 1MB partition will be used by GRUB to install its > core.img file. > > >> Also, when I do grub-install, do I still point to >> /dev/sda or to /dev/sda1, if sda1 is the special boot partition? > Sector 0 of your disk /dev/sda is where GRUB will drop its boot loader image > 'boot.img'. This is the Master Boot Record region. > > Normally, with a DOS partition table, GRUB's core.img would be dropped in the > empty space of sector 1, following sector 0. However, in the GPT structure > sector 1 is where the GPT partition array data is stored. You don't want > GRUB > making a mess by dropping it's core.img on top of it! > > So, from what I recall you'd install GRUB like so: > > grub-install --boot-directory=/mnt/gentoo/boot --force /dev/sda > > If this won't do it, I'll have to boot an old system of mine to check the > disk > layout in more detail. > > I may look on youtube and see if I can find someone setting up a disk. It may have a video, old one for sure. Maybe that will help me make sense of it even more. I think I got figured out how to use cgdisk now but installing grub may require some more details. What I find odd, most of the howtos I found don't show example outputs. Then again, it could just work. O_o Thanks to all. Dale :-) :-)