Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Michael, On Thursday, 2024-05-16 17:46:04 +0100, you wrote: > ... > > The homepage returned by > > > >$ eix --verbose sys-boot/elilo > >* sys-boot/elilo > > Available versions: ~3.16-r5 > > ... > >$ > > > > hints that this package is no longer maintained ... :-( > > ... > > Oh! I haven't ever used it, but recalled its name and found it on the tree. > I suppose if it's stable and it works, it works whether maintained or not. Well, the "~" ahead of the version number says it's non-stable. And considering that booting is rather hardware, firmware and kernel related and dependent, I personally would stay off of such a package :-/ Sincerely, Rainer
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On Thursday, 16 May 2024 17:41:20 BST Dr Rainer Woitok wrote: > Michael, > > On Thursday, 2024-05-16 09:26:39 +0100, you wrote: > > ... > > > > > > I liked lilo. And then it disappeared :-( > > > > > > ... > > > > > > Still available and still working on non-uefi setups: > > > https://packages.gentoo.org/packages/sys-boot/lilo > > > > > > ... > > > > There's also 'sys-boot/elilo' for EFI systems. > > The homepage returned by > >$ eix --verbose sys-boot/elilo >* sys-boot/elilo > Available versions: ~3.16-r5 > Homepage:https://sourceforge.net/projects/elilo/ > Description: Linux boot loader for EFI-based systems such as > IA-64 License: GPL-2 >$ > > hints that this package is no longer maintained ... :-( > > Sincerely, > Rainer Oh! I haven't ever used it, but recalled its name and found it on the tree. I suppose if it's stable and it works, it works whether maintained or not. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Michael, On Thursday, 2024-05-16 09:26:39 +0100, you wrote: > ... > > > I liked lilo. And then it disappeared :-( > > ... > > Still available and still working on non-uefi setups: > > https://packages.gentoo.org/packages/sys-boot/lilo > > > > ... > > There's also 'sys-boot/elilo' for EFI systems. The homepage returned by $ eix --verbose sys-boot/elilo * sys-boot/elilo Available versions: ~3.16-r5 Homepage:https://sourceforge.net/projects/elilo/ Description: Linux boot loader for EFI-based systems such as IA-64 License: GPL-2 $ hints that this package is no longer maintained ... :-( Sincerely, Rainer
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On Thursday, 16 May 2024 01:10:32 BST k...@aspodata.se wrote: > Wol: > > On 15/05/2024 11:40, Peter Humphrey wrote: > > > I think whoever named grub had delusions of grandeur. ð Anyway, I > > > never let it near my systems. > > > > I liked lilo. And then it disappeared :-( > > ... > > Still available and still working on non-uefi setups: > https://packages.gentoo.org/packages/sys-boot/lilo > > Regards, > /Karl Hammar There's also 'sys-boot/elilo' for EFI systems. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Wol: > On 15/05/2024 11:40, Peter Humphrey wrote: > > I think whoever named grub had delusions of grandeur. ð Anyway, I > > never let > > it near my systems. > > I liked lilo. And then it disappeared :-( ... Still available and still working on non-uefi setups: https://packages.gentoo.org/packages/sys-boot/lilo Regards, /Karl Hammar
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On 15/05/2024 11:40, Peter Humphrey wrote: I think whoever named grub had delusions of grandeur. Anyway, I never let it near my systems. I liked lilo. And then it disappeared :-( Grub isn't that bad - it's just that insists on trying to do everything itself - and if you've got at all a strange setup it makes a complete hash of it. LIKE GENTOO! I've moaned about this before, but last time SUSE updated itself, it trashed grub.conf and left me with an unbootable system. And then gentoo sees that I've got an unmounted /boot and throws a complete and utter hissy fit because I told it not to touch it ... Cheers, Wol
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On Wednesday, 15 May 2024 08:42:14 BST Wols Lists wrote: > On 02/05/2024 11:46, Peter Humphrey wrote: > > When I started using Linux, the received wisdom was to keep a separate > > /boot, and leave it unmounted during normal operation. The idea was that > > a successful hacker would not, supposedly, be able to corrupt the kernel > > ready for a reboot into their system. > > And you can't have /boot on your system partition if, like me, you have > one instance of grub booting into several different OSs or distros ... > Less so now, but having multiple distros on one system was a popular > hobbyist pastime! I think whoever named grub had delusions of grandeur. :) Anyway, I never let it near my systems. -- Regards, Peter. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On 02/05/2024 11:46, Peter Humphrey wrote: When I started using Linux, the received wisdom was to keep a separate /boot, and leave it unmounted during normal operation. The idea was that a successful hacker would not, supposedly, be able to corrupt the kernel ready for a reboot into their system. And you can't have /boot on your system partition if, like me, you have one instance of grub booting into several different OSs or distros ... Less so now, but having multiple distros on one system was a popular hobbyist pastime! (One distro's system partition is another distro's data partion :-) Cheers, Wol
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On 02/05/2024 10:35, Michael wrote: Besides the automation this feature affords, I find it useful to know what a partition contains without having to mount it. On GPT labelled disks I make use both of the Partition Type UUID and the Partition Name. A quick glance at the gdisk output and if need be its 'i' option has saved my day from formatting the wrong partition more than once! Iirc from the days of kernel 1.3 and 2.x, the partition type is not used - at all - by linux itself. Dunno about other OSs. As you pointed out, though, it is used by other tools, which use it to identify what the partition is *supposed* to be used for. For example, auto-assemble with raid. I'm not sure, but for example I think swap will quite happily let you "mount" a non-swap partiton with swap-on. You can format an allegedly DOS or NTFS partition with ext, and linux won't care ... Cheers, Wol
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On Thursday, 2 May 2024 00:45:29 BST Dale wrote: > Grant Edwards wrote: > > OK, so 'boot' is for the Linux /boot directory. I was just curious > > since I had never used one. When I started using Linux, the received wisdom was to keep a separate /boot, and leave it unmounted during normal operation. The idea was that a successful hacker would not, supposedly, be able to corrupt the kernel ready for a reboot into their system. Old habits die hard, though, and besides, a separate /boot has been handy in the copious reinstallations I've been through. > I've used one ever since I started using Linux and it's as much habit as > anything. Given the size of drives nowadays, I have started putting > /usr and /var on the root partition. When I build my new rig tho, odds > are /var will be on its own partition. That way if a log file goes > wonky, it can fill it up and not really do any harm. I do that too. It also helps with backups and new installations. -- Regards, Peter. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Michael wrote: > On Thursday, 2 May 2024 00:45:29 BST Dale wrote: >> Grant Edwards wrote: >>> On 2024-05-01, Dale wrote: Grant Edwards wrote: > The partition type code for 'swap' is wrong -- it should be > 8200. According to the gdisk help info Linux /home is supposed to be > 8302, but I've always used the same generic "Linux filesystem" type > for both /home and root. > > Is the 'boot' partition for future possible UEFI use, for Linux /boot, > or both? [I've never used a separate partition for Linux /boot, I > just use a /boot directory on the root FS.] I noticed the other day that some new ones was added. I always leave it as 8300 and it works. It even works for swap. I dunno. > In the legacy DOS partition tables the space available was limited to 32 > bits, > while the GPT table specification provides 128 bytes for each block entry. > The extra space can be used to store information related to the intended OS > usage of each partition, by adding the corresponding Partition Type UUID. > > This has a number of benefits, described here: > > https://uapi-group.org/specifications/specs/ > discoverable_partitions_specification/ > > Besides the automation this feature affords, I find it useful to know what a > partition contains without having to mount it. On GPT labelled disks I make > use both of the Partition Type UUID and the Partition Name. A quick glance > at > the gdisk output and if need be its 'i' option has saved my day from > formatting the wrong partition more than once! ;-) I always use labels which show up with cgdisk. If I'm unsure how I partitioned a drive for some reason, I just check it with cgdisk to see what is what. I use labels even tho a lot of the time I put UUIDs in fstab. I do similar when using LVM as well. There is more than one way to organize things tho. ;-) Dale :-) :-)
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On Thursday, 2 May 2024 00:45:29 BST Dale wrote: > Grant Edwards wrote: > > On 2024-05-01, Dale wrote: > >> Grant Edwards wrote: > >>> The partition type code for 'swap' is wrong -- it should be > >>> 8200. According to the gdisk help info Linux /home is supposed to be > >>> 8302, but I've always used the same generic "Linux filesystem" type > >>> for both /home and root. > >>> > >>> Is the 'boot' partition for future possible UEFI use, for Linux /boot, > >>> or both? [I've never used a separate partition for Linux /boot, I > >>> just use a /boot directory on the root FS.] > >> > >> I noticed the other day that some new ones was added. I always leave it > >> as 8300 and it works. It even works for swap. I dunno. In the legacy DOS partition tables the space available was limited to 32 bits, while the GPT table specification provides 128 bytes for each block entry. The extra space can be used to store information related to the intended OS usage of each partition, by adding the corresponding Partition Type UUID. This has a number of benefits, described here: https://uapi-group.org/specifications/specs/ discoverable_partitions_specification/ Besides the automation this feature affords, I find it useful to know what a partition contains without having to mount it. On GPT labelled disks I make use both of the Partition Type UUID and the Partition Name. A quick glance at the gdisk output and if need be its 'i' option has saved my day from formatting the wrong partition more than once! ;-) signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Grant Edwards wrote: > On 2024-05-01, Dale wrote: >> Grant Edwards wrote: >> >>> The partition type code for 'swap' is wrong -- it should be >>> 8200. According to the gdisk help info Linux /home is supposed to be >>> 8302, but I've always used the same generic "Linux filesystem" type >>> for both /home and root. >>> >>> Is the 'boot' partition for future possible UEFI use, for Linux /boot, >>> or both? [I've never used a separate partition for Linux /boot, I >>> just use a /boot directory on the root FS.] >> I noticed the other day that some new ones was added. I always leave it >> as 8300 and it works. It even works for swap. I dunno. > If you have an entry in /etc/fstab for swap, it might not matter if > the partition type is set to 'Linux swap' or not. I always set the > swap parition type to 'Linux swap', and then it doesn't seem to matter > if there's a swap entry in the fstab or not. I tend to put everything in fstab. It's the way it was when I started and I just keep doing it that way. It could be that it isn't needed anymore tho. >> The /boot is where kernels and init thingys go. Keep in mind, this is >> on a old rig that has no idea what UEFI is. When I build my new rig >> later, I'll do a install from scratch anyway. Also, it will go on a SSD. > OK, so 'boot' is for the Linux /boot directory. I was just curious > since I had never used one. > I've used one ever since I started using Linux and it's as much habit as anything. Given the size of drives nowadays, I have started putting /usr and /var on the root partition. When I build my new rig tho, odds are /var will be on its own partition. That way if a log file goes wonky, it can fill it up and not really do any harm. >> I mostly want to post so that a person can see the layout. Really, the >> first one is what a person wanting to use GPT on a old BIOS system needs >> to see. After that, they can do partitions anyway they want. > Right. I'm to the good part of the install now. With the partition layout shown earlier, I get this. (chroot) livecd / # grub-install /dev/sda Installing for i386-pc platform. Installation finished. No error reported. (chroot) livecd / # When I did that before, it puked on my keyboard. This time with that little unformatted partition, it just installed it. So, muddy waters pretty clear now. :-D Dale :-) :-)
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Grant Edwards wrote: > On 2024-05-01, Dale wrote: > >> OK. One last update in case someone googles and runs up on this >> thread. I'm using gdisk to display this, because I think it will do >> better in email. If I use cgdisk, it is wider and will wrap more. >> This is what the partition table looks like for GPT, old BIOS and no >> uefi thingy. Just a straight forward and simple old school setup. >> Once the first one is done, the rest can be anything. >> >> >> Number Start (sector) End (sector) Size Code Name >> 1 2048 10239 4.0 MiB EF02 BIOS-boot >> 2 10240 4204543 2.0 GiB 8300 boot >> 3 4204544 12593151 4.0 GiB 8300 swap >> 4 12593152 327165951 150.0 GiB 8300 root >> 5 327165952 625141759 142.1 GiB 8300 home > The partition type code for 'swap' is wrong -- it should be > 8200. According to the gdisk help info Linux /home is supposed to be > 8302, but I've always used the same generic "Linux filesystem" type > for both /home and root. > > Is the 'boot' partition for future possible UEFI use, for Linux /boot, > or both? [I've never used a separate partition for Linux /boot, I > just use a /boot directory on the root FS.] > > -- > Grant I noticed the other day that some new ones was added. I always leave it as 8300 and it works. It even works for swap. I dunno. The /boot is where kernels and init thingys go. Keep in mind, this is on a old rig that has no idea what UEFI is. When I build my new rig later, I'll do a install from scratch anyway. Also, it will go on a SSD. I mostly want to post so that a person can see the layout. Really, the first one is what a person wanting to use GPT on a old BIOS system needs to see. After that, they can do partitions anyway they want. I just hope I got it right. Right now, I'm to the stage where I do a emerge -auDN world. On that old rig, may take a little bit. It's not bad tho. Old rig has 6 cores now. Dale :-) :-)
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Dale wrote: > One last update. I found a video. They were using gdisk but the > crucial part, he got it to display the partition layout. It was like I > described as for as the alignment thing, tiny partition with ef02 and > then carry on as usual from there. > > I need to do this on a disk complete with notes, so I don't forget. My > brain is going fast. One day, I'll forget how to turn the puter on. > :'( I already forget what I went to the kitchen for, it's only 20 feet > away. :/ > > Thanks again. > > Dale > > :-) :-) > OK. One last update in case someone googles and runs up on this thread. I'm using gdisk to display this, because I think it will do better in email. If I use cgdisk, it is wider and will wrap more. This is what the partition table looks like for GPT, old BIOS and no uefi thingy. Just a straight forward and simple old school setup. Once the first one is done, the rest can be anything. Number Start (sector) End (sector) Size Code Name 1 2048 10239 4.0 MiB EF02 BIOS-boot 2 10240 4204543 2.0 GiB 8300 boot 3 4204544 12593151 4.0 GiB 8300 swap 4 12593152 327165951 150.0 GiB 8300 root 5 327165952 625141759 142.1 GiB 8300 home I'm about to start a fresh install on this so if it isn't right, let me know soon. I did make it a little larger than everyone says it needs to be since grub does seem to grow. That should be bigger than I'll ever need in the lifetime of this old rig anyway. Dale :-) :-)
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On 28/04/2024 17:40, Grant Edwards wrote: On 2024-04-28, Grant Edwards 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.] Note that, for new installs, I generally say always create a decent sized partition for UEFI, so if you want to change you can, although it sounds like in your case it probably doesn't matter :-) Cheers, Wol
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Dale wrote: > Michael wrote: >> On Sunday, 28 April 2024 19:39:16 BST Dale wrote: >>> Grant Edwards wrote: On 2024-04-28, Grant Edwards 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 > > :-) :-) > One last update. I found a video. They were using gdisk but the crucial part, he got it to display the partition layout. It was like I described as for as the alignment thing, tiny partition with ef02 and then carry on as usual from there. I need to do this on a disk complete with notes, so I don't forget. My brain is going fast. One day, I'll forget how to turn the puter on. :'( I already forget what I went to the kitchen for, it's only 20 feet away. :/ Thanks again. Dale :-) :-)
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Michael wrote: > On Sunday, 28 April 2024 19:39:16 BST Dale wrote: >> Grant Edwards wrote: >>> On 2024-04-28, Grant Edwards 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 :-) :-)
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
On Sunday, 28 April 2024 19:39:16 BST Dale wrote: > Grant Edwards wrote: > > On 2024-04-28, Grant Edwards 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 signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: Grub, gpt partitions and BIOS, not uefi thing.
Grant Edwards wrote: > On 2024-04-28, Grant Edwards 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. 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? That's the only thing I'm not real sure of at this point. I think it is sda. Maybe. ;-) Or is all that above just plain wrong? O-o Dale :-) :-) P. S. Been on tractor with a box blade. Did three very long driveways and a couple short ones. My neighbors have smooth driveways again. :-D