F36 boot entries after new Fedora 37 installation

,

If your bios is set to legacy boot, then sda2 is definitely what is getting booted. So even if it were originally a win partition, it now contains a key part of the linux boot sequence, that should be understood.

If your bios is set to efi boot then something important is missing from all the glances at the setup from various points of view, that you have provided, and that missing part might be in sda2

Your partitioning is definitely mbr. Legacy booting is based on mbr and normally used with mbr, while efi booting is based on gpt partitioning and normally used with that. But the boot type can be coerced into the other partitioning type in either direction.

I’m quite confident that sda2 is not what is getting booted and it is an old win bootloader. I suspect it could be deleted without affecting anything.
Maybe I’m wrong. Which is the correct and fastest way to resolve this doubt?

I would mount it and look at its contents and see if there are linux looking contents: grub etc. (in addition to the windows contents that are likely there).

Assuming you have other bootable media, it would be safe to use whatever partitioning tool you like to clear the boot flag on that partition. If I’m right about sda2 and your bios is set to boot in mbr mode, that would stop a cold boot from using any of sda so you would need to run partitioning from a usb boot in order to put the flag back.

I have mounted it for you. I still think it is an old win bootloader.

[giulio@MyHome-PC ~]$ ls /mnt/sda2
 Boot      BOOTNXT        Recovery
 bootmgr   BOOTSECT.BAK  'System Volume Information'

Yeah, but I don’t think it is going to resolve my question here, isn’t it?

you were correct. I don’t know how your bios is booting that drive, but sda2 doesn’t seem to be part of it.

1 Like

Me too. I don’t understand why sda2 appears as boot. And where is the mbr record exactly or the bios rule. But my feeling is that somehow it is booting into /sda3…

Can you check the bios settings to verify my current best guess that it is not set to legacy.
Then the contents of sda5 would be the best bet for explaining the boot behavior.

but sda5 is the /boot mount partition of Fedora 36… and very probably it is also not involved, otherwise I would have seen the correct f36 entries… Ok, I’ll go into the bios. I wanted to avoid it at all costs. What exactly do you want me to check?

It is an old bios. Not uefi

Each bios is different, but usually there is some section controlling boot settings. Usually that has some choice of “legacy” vs. some alternatives. It might be legacy vs. efi and within efi might let you choose “secure” or not.

There is also likely some “boot priority” or “sequence” section in bios settings. For efi, often the contents of that are unreadable codes. But if readable, that would be helpful information.

As i wrote. It is old and it is not even possible to activate efi with that bios.

It is a MBR boot.

[giulio@MyHome-PC ~]$ sudo dd if=/dev/sda of=MBRhda.bin bs=512 count=1
[sudo] password for giulio: 
1+0 records in
1+0 records out
512 bytes copied, 0.000174676 s, 2.9 MB/s
[giulio@MyHome-PC ~]$ cat MBRhda.bin |grep "GRUB" 
grep: (standard input): binary file matches

GRUB is written into the MBR and boots whatever partition you choose. And it ignores the boot flag.

I think it is a sort of bug however…
The fact is that the os_prober part of grub2-mkconfig knows the linux and initrd kernel, so it could form the title better, by keeping track of the kernel too.

By looking at the script, I think it is ${LKERNEL}, I’m tempted to try a “in-house” fix…

He actually is not booting with UEFI. The /boot is correct but he is using MBR booting.

1 Like

sda1 & sda2 seem to be relics from windows and probably could be removed with no problems. Using MBR boot the mbr (first 512 bytes on the drive) actually launches the grub boot loader which for fedora 37 seems to be on /dev/sda3 as you said.

1 Like

Yes, I’m very close to write a “fix” to the os_prober, just for the sake of it, lol. At least to simplify the manual management of the entries, in case I want to keep those two Fedora versions and those two partitions

FYI, my fix:

mykernel="${LKERNEL/"/vmlinuz-"/}"
title="${LLABEL} ${mykernel} $onstr"

instead of

title="${LLABEL} $onstr"

and I can refresh the entries with sudo grub2-mkconfig -o /boot/grub2/grub.cfg