On Wed, Dec 18, 2024 at 06:05:54PM +0100, Thomas Weißschuh wrote: > On 2024-12-18 15:44:45+0100, Karel Zak wrote: > > On Wed, Dec 18, 2024 at 11:12:59AM GMT, Zdenek Kabelac wrote: > > [..] > > > > And in the same way blkid should expose installed grub loader - currently > > > the partition with installed grub looks 'empty' with blkid.... > > > > The issue I see is that boot loaders can coexist with filesystems on > > the same device. This can lead to unexpected warnings when attempting > > to view the contents of the device using mkfs tools. > > Isn't this specifically about the grub second stage on GPT systems > inside a dedicated partition? Yes, GPT has no unallocated space similar to the MBR gap in the MSDOS partition table that can be repurposed for grub second stage, therefore a dedicated partition has to be defined and allocated. A similar scheme is also used in PowerPC, where a dedicated firmware PReP boot partition must be allocated for the boot code. See Also: https://www.gnu.org/software/grub/manual/grub/grub.html#BIOS-installation > There should be no valid coexistence with a filesystem. > > So having a probe in blkid looks reasonable to me. > > Not that it helps in the specific case mentioned above, where everybody > is using --force anyways. That's the reason I think adding such a check in grub-install doesn't help at all. After adding the check, I believe the tools managing the bootloader installation will start to use wipefs or enforce --force to grub-install to make sure no leftover can get in the way. In that sense, it seems like unnecessary breaking change to the toolings. Thanks, Michael > > > Thomas