Why are the two physical partitions starting from 40 reversed in terms of functionality?
Actually that is an unusual situation.
If the system is installed for uefi boot it normally would have the efi partition and would not have the BIOS BOOT partition. If it is installed for legacy boot it would have the BIOS BOOT partition and not have the efi partition.
This is my f41 vm output from fdisk
Device Start End Sectors Size Type
/dev/vda1 2048 1230847 1228800 600M EFI System
/dev/vda2 1230848 3327999 2097152 1G Linux extended boot
/dev/vda3 3328000 83884031 80556032 38.4G Linux filesystem
Note that I have an efi partition (vda1), an ext4 partiton for /boot (vda2) and a btrfs partition for the rest of the OS (vda3).
This system was installed as uefi on the VM.
Had I installed it as legacy boot it would not have the efi partition and instead would have the bios boot partition.
This is another I just installed as legacy (bios) boot to show the difference
Device Start End Sectors Size Type
/dev/vda1 2048 4095 2048 1M BIOS boot
/dev/vda2 4096 2101247 2097152 1G Linux extended boot
/dev/vda3 2101248 41940991 39839744 19G Linux filesystem
I suspect that the display you show with the bios boot partition as vda2 is a result of installing the os in legacy mode after having an os previously installed in uefi mode.
The other is probably the opposite – an os had been installed in legacy mode then another installed in uefi mode later.
With a clean install fedora does not create both a bios boot partition and an efi partition.
When gpt partitioning was new it was necessary for the bios boot partition to immediately follow the drive mbr and thus was always the first partition. Later that restriction was removed and now it can be located later on the drive.
Thank you for your reply. I used a kickstart script for installation. Is that the reason?And,This is a dual-boot image with UEFI preferred.
I cannot be certain since I do not use kickstart, and the results I show above were from a clean installation where I selected the boot type before actually booting the install image.
The install image is hybrid and capable of booting either legacy or uefi and whichever mode is used to boot becomes the mode in which installed.
If I understand your kickstart file it loads the bootloader into mbr which means it probably always boots in legacy mode even with an efi partition created. It also appears that regardless of the mode used to boot it should always create the bios boot partition as well as the efi partition.
Are you certain it is ever booting uefi?
That can be determined by using cat /sys/firmware/efi/efivars
. If that returns cat: /sys/firmware/efi/efivars/: Is a directory
then the system booted in uefi mode. If it returns anything else then it booted in MBR mode. That directory is only created under /sys when booting in uefi mode.
A expansion of my answer about the order of those 2 partitions.
Since the bios boot partition is not required to be first on the drive the order in which those partitions is placed is not important. It happens to occur in the order the system processes the commands, not necessarily in the order in which they appear in the kickstart file and may depend upon the bios itself. Your kickstart creates the (probably unnecessary) efi partition even though the bootloader is specified to be MBR.
Thanks,and if I want to change the order so that the BIOS is always first, what should I do? yeah, return this: Is a directory
you mean , I just need to modify the ks file to achieve my goal?