While executing leapp preupgrade command in centos 7.9, I see this inhibitor in /var/log/leapp/leapp-preupgrade.log
Can anyone help to fix this?
Risk Factor: high (inhibitor)
Title: Found GRUB devices with too little space reserved before the first partition
Summary: On the system booting by using BIOS, the in-place upgrade fails when upgrading the GRUB2 bootloader if the boot disk’s embedding area does not contain enough space for the core image installation. This results in a broken system, and can occur when the disk has been partitioned manually, for example using the RHEL 6 fdisk utility.
The list of devices with small embedding area:
- /dev/vda.
Remediation: [hint] We recommend to perform a fresh installation of the RHEL 8 system instead of performing the in-place upgrade.
Another possibility is to reformat the devices so that there is at least 1024 kiB space before the first partition. Note that this operation is not supported and does not have to be always possible.
hello
This inhibitor is working as intended.
On BIOS systems, GRUB2 needs enough embedding area before the first
partition to place its core image. Your disk layout does not provide
that space, and upgrading GRUB2 in this condition may render the system
unbootable. For this reason ELevate blocks the in-place upgrade.
The recommended and supported solution is to provision a fresh
AlmaLinux 8/9 system and migrate your data and services to it.
Reference (primary source):
• GNU GRUB Manual – BIOS installation:
GNU GRUB Manual 2.12: BIOS installation
Here is an example of fdisk output:
# fdisk -l /dev/sda
Disk /dev/sda: 136.22 GiB, 146263769088 bytes, 285671424 sectors
Disk model: RAID SAS 6G 0/1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000c1c40
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 ...
You could run fdisk -l /dev/vda
I bet the first partition starts from sector 63, rather than 2048.
In the “old days” most tools did create the first partition to start from 63 (to not “waste” space). Then drives did evolve physically and it became important to align logical blocks with physical blocks. Since “all” drives have first 1024kiB unallocated, partition tables and bootloaders have started to use more space.
It might be technically possible to change the first partition, but it is also quite likely that the operation fails miserably. Therefore, you do need backup of your data and config and might end up with fresh install no matter what you do. (The config will not be a simple copy-paste to restore, because each major version does have new shiny things. You have to invent equivalent config.)