Two entries in the system boot menu after installing Fedora 41 Workstation

Hi,
Not so long time ago got a new laptop (Legion 5 Pro if its of any relevance). It has a single SSD (1 TB) and on that there was Windows 11 preinstalled. Initially I installed alongside to that Linux Mint to check some stuff. After some time i decided to move on to Fedora (without dual boot), so downloaded Fedora 41 Workstation. While installing, picked the option to manually adjust partitioning (the ‘advanced GUI one’). There, removed all the partitions so that i got only ‘free space’. Next i created partitions for installation:

  1. Partition → EFI System → 500 MiB → mount point: /boot/efi
  2. Partition → ext4 → 1 GiB → mount point: /boot
  3. BTRFS Volume → 200 GiB → mount point: /
  4. BTRFS Volume → 300 GiB → mount point: /home (please note that in another, 2nd attempt to reinstall, also tried to use: Partition → 300 GiB → mount point: /home);
    At the point 3) (mount point: /) i selected ‘encrypt’, with default settings, just entered the password (my understanding is, that it is enough for encrypting the whole drive in this case ? if it’s not so, please advise how to use full disk encryption in this case);
  5. The remaining disk volume (500 GiB or so) was left as ‘free space’ to use it as a data storage when needed later.

After install, i did a reboot and when I go into system boot menu (that BIOS/UEFI settings) and there i see two entries which look totally the same.
Question(s): Is it expected that way (because of encrypted / partition ?) or i did something wrong ?
P.S. Not very experienced with linux yet, so please provide any details where necessary.
Thank you in advance.

Welcome to Fedora @over9k

It is understandable if you try to format the disk as you made. In early times, with ext3/4 it was normal to make different partitions on a single drive.

However with Btrfs you do not need to make it this way. Because you can make Subvolumes and this way you will share the space from a drive with the sub-volumes. There is no need to extend the partition if you run out of space. Just put a new drive in an make a new sub-volume.

In your case it would have made sense to make an automatic installation and just do encrypt the /home drive. Fedora makes then the Btrfs part so that you can extend it easily if you need in future.

If you work with sub-volumes you also can easily extend your system as more as you know about btrfs.

This way as you made it, you are restricted with the partition sizes you created.

This is true, it is a bit a issue when using more than one Fedora installation, or even if you boot/install into fedora with external SDD it will add a entry saying “Fedora”.

You also can check it when you booted, with the command efibootmgr . With this tool you can also delete unneccesary entries. I just do not know exactly how you have to confirm which is the valid entry.

# here my entries from efibootmgr:
|Boot0014* Fedora|HD(1,GPT,28398274-a015-47a3-ae3f-a4609a6ddbd4,0x800,0x12c000)/\EFI\fedora\shimx64.efi|
|Boot0015* Fedora|HD(1,MBR,0x6615bdd6,0x800,0x12c000)/\EFI\fedora\shimx64.efi|

This not depends on the Fedora version you use, it is always the same. So from time to time you have to clean up.

1 Like

Hi @ilikelinux . Thanks for the response.
Just to double check that i understood correctly. It would be better to do an automatic install - installer makes the whole SSD into ‘one btrfs’ (which then allows to create more sub-volumes) ? I did see in some other posts/resources mentioning of sub-volumes, but didn’t see (maybe looked in the wrong place?) that option when doing manually. I did manually because was not sure if auto will wipe everything clean before installing or just install Fedora alongside (resulting in 3 OSes totally, which is not what i wanted :smiley: ).
Regarding the encryption of /home folder. Currently, the way i did it manually, it asks me to enter the password as a first thing after seeing the manufacturer logo (so i suppose it means that the whole ssd drive is encrypted ?). So I enter password there and only then get to enter the username password to get logged in into account. I would like to have the same effect when doing auto-install, so when doing that and selecting there to encrypt /home folder leads to the same result ? Is there no option during auto-install to encrypt the full disk (similarly as manually setting encrypt for / ) ? Maybe i am missing something here ?
Regarding the two entries in the boot menu. So that is expected and usually happens for everyone, right ? This is what i see when running efibootmgr:

1) Boot0000* Fedora   HD(1, GPT , ......... , /\EFI\fedora\shimx64.efi
2) Boot0002* Fedora   HD(1, GPT , ......... , /\EFI\fedora\shim.efiRC
(note: both '.........' parts are identical)
In the boot order output i see: 0002, 0000, ...

So not sure which one should be deleted :slight_smile: Is there way to find out which one needs to be deleted ?
Thanks again.

The / (root) and /home is btrfs. the rest is as you made … If you make auto install it will make the EFI a bit bigger and for the /boot it will make around 1GB. Tis is enough to have 3 different kernel what is default by fedora auto install.

This is mine, I had some free space left and did increase my /boot partition:

$ sudo btrfs subvolume list /

ID 256 gen 33892 top level 5 path home00
ID 257 gen 33892 top level 5 path root00
ID 258 gen 33116 top level 257 path var/lib/machines

I do have sub-volumes with 00 added, because when I installed there was an other Fedora installation in the computer.

The auto installer integrates things available automatically.

I do not think so. There is the EFI (fat32) and /boot partition (ext4) on it. This I guess you not should encrypt.

See Wiki F41: Creating Encrypted Block Devices in Anaconda

Regarding disk encryption. From the link you provided:

To enable block device encryption, check the “Encrypt System” checkbox when selecting automatic partitioning

It seems that it handles the full ssd disk then :slight_smile:
Regarding the auto-partitioning. So I just did the auto-partitioning install. Still will have to deal with that duplicate entry in boot menu, but will search for info or maybe someone else will give some hints here later. So it now created the following partitions:

  1. EFI System Partition → fat32 → /boot/efi → 600 MiB,
  2. ext4 → /boot → 1 GiB,
  3. [Encrypted] btrfs → /, /home → 952 GiB.

Two questions currently:

  1. How could you change the /boot size ? Not sure i will need more than that 1 GiB, but just out of curiosity. I tried to select that partition (in GParted) then ‘Partition → Resize/Move’ but when i change the value in the ‘New size (MiB)’ field, it still sets it back to 1024 MiB.
  2. Those 952 GiB, that is now combined / (root) and /home in a single partition ? My understanding is that it is better to keep / (root) and /home as separate partitions ? If so, how do I do that ?

I hope my questions are not too stupid :smile: Thanks for your time and patience.

I think the easiest way would be put the the pen-drive back into the usb and test both entries, verifying what gets booted. If one is the usb, I would set that as primary boot option. This way you can rescue boot your installation while just plug the usb-stick in and start your system. Second I would put the HD. As I mentioned before, unfortunately they always look the same except the file/extension name.

You need the free space enclosed beside your partition you want to resize. If you do not have free space beside the partition you can not resize. You would have to take space from a partition where you think you could take from. And then move the free space so, that it gets enclosed to your partition you need the space. After that you can add before or after the partition this free space.

That is separated in subvolumes; / is exept /home

sudo btrfs subvolume list /

# important is, to read about the differences of a ext4 and btrfs layout.
# This might be against your actual understanding.
# It is new and I also had to go into it :-)

Please confirm and read also the help of btrfs --help

You can also install the tool “Btrfs Assistant” from the software app. It is a gui where helps you to visualize better. And also very important, read about btrfs. It is a big and complex topic.

Give you time to understand. In the meantime you are secure to use it as Fedora formats it for you.

1 Like

Thanks again, i’ll look into that.

1 Like

Not sure i fully understood the part about ‘verify what gets booted’, sorry. From what i saw, when the live usb is plugged in, there is a 3rd entry (so a separate one for the live usb which differs a bit from those two). Tried the following:

  1. temporarily disable secure boot in uefi;
  2. login to account and delete (using: sudo efibootmgr -b 0001 -B) that shim.efiRC entry;

But after rebooting the system, it gets added back (its in the boot menu and also when logged in into account its in the efibootmgr output). After deleting, tried also to regenerate the grub2 by: sudo grub2-mkconfig -o /boot/grub2/grub.cfg , but result was the same - after restart it get’s added back. Well, either something else is returning it back or i am missing some step when deleting it (like some other config update/reinit or something). Anyway, will try to poke around a bit more and if no success, will just live with it being there :smiley: Feel free to add some ideas if have any. Thanks again.

I could imagine that the rescue (RC ?) boot option could be displayed this way? Check for

shim.efiRC

In the search engine or in Discourse.

1 Like

Look at the entry BootCurrent: and remove the other one. For example if it says BootCurrent: 0000 remove Boot0002. And if it says BootCurrent: 0002 remove Boot0000

1 Like

Hi. Thanks for the input.
That’s exactly what i did. I looked at bootcurrent and by that thought that i should remove the other one (not shown in the bootcurrent). That’s how i got to try to remove that shim.efiRC. It seems to me, that there might be some UEFI settings which return back that shim.efiRC back from the deleted. Will do some more digging anyway, thanks.

Or just leave it as is. Most UEFI implementation don’t document such things, so it would be hard to find any explanation on this issue. Either entry should work exactly the same way.

By the way. The “RC” string doesn’t mean anything. It is just the efibootmgr which has a little problem displaying it correctly.

2 Likes

I believe that efi will just put it back if you were to delete one of those entries.

My system has 2 fedora boot entries and when I deleted one of them it came back the next time I booted. There seem to be 2 different shim entries in the efi file system that the bios considers as bootable.

They are identical, except for the name.

[root@newbox fedora]# diff -s shim.efi shimx64.efi 
Files shim.efi and shimx64.efi are identical
[root@newbox fedora]# 

In the

efi/EFI/

i see there is a folder Lenovo with folder BIOS and in that some SelfHealing.fd file. Maybe that has to do with something. But for now i think i will not experiment anymore, i mean, leaving that other boot menu around should not impact anything than just an inconvenience of having it around, right ?

Correct, and having it that way is only an inconvenience if you tend to be OCD about such minute details. It seems that since it is titled lenovo it may be beneficial at some point if repairs are necessary.

The entries in the efibootmgr details are not seemingly an issue unless you wind up with enough to fill the storage space in the bios for such items. Although very rare, we have seen times where a user might accumulate 15 or more entries in the bios boot menu and then need to delete some. This seemed to have been after installing then removing several different OSes on the system.

My system has 2 for fedora, one for the boot SSD, one for the DVD drive, and one for USB boot. Those seem pretty standard and if I delete one it returns with the next boot.

$ efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0009,000A,000B
Boot0000* Fedora	HD(1,GPT,3e9fc420-a651-4d1e-b8e7-f1fac4970613,0x800,0xa7800)/\EFI\FEDORA\SHIMX64.EFI
Boot0009* Fedora	HD(1,GPT,3e9fc420-a651-4d1e-b8e7-f1fac4970613,0x800,0xa7800)/\EFI\FEDORA\SHIM.EFI0000424f
Boot000A* Hard Drive	BBS(HD,,0x0)0000474f00004e4fad00000001000000750053005400340030003000300056004e003000300038002d0032004400520031003600360000000501090002000000007fff040002010c00d041030a0000000001010600020101010600010003120a000200ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce620002000200020002000200020002000200020002000200044005a0042004800460031004600370000007fff04000000424f00004e4fad00000001000000750053005400380030003000300056004e003000300034002d0032004d00320031003000310000000501090002000000007fff040002010c00d041030a0000000001010600020101010600010003120a000300ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce620002000200020002000200020002000200020002000200053005700360044005a004c004a004e0000007fff04000000424f00004e4fad00000001000000750053005400340030003000300056004e003000300038002d0032004400520031003600360000000501090002000000007fff040002010c00d041030a0000000001010600020101010600010003120a000400ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce620002000200020002000200020002000200020002000200044005a0042004800350031004400520000007fff04000000424f00004e4fad00000001000000750053005400340030003000300056004e003000300038002d0032004400520031003600360000000501090002000000007fff040002010c00d041030a0000000001010600020101010600010003120a000500ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce620002000200020002000200020002000200020002000200044005a00410048003800580058004b0000007fff04000000424f00004e4f99000000010000006b00430054003200300030003000500035005000530053004400380000000501090002000000007fff040002010c00d041030a00000000010106000101010106000000031710000100000000a075013d64dd837fff040001042e00ef47642dc93ba041ac194d51d01b4ce632003200350031003300440036003400440044003800330000007fff04000000424f
Boot000B* CD/DVD Drive	BBS(CDROM,,0x0)0000474f00004e4fb900000001000000750048004c002d00440054002d00530054002000420044002d00520045002000200057004800310034004e0053003400300000000501090003000000007fff040002010c00d041030a0000000001010600020101010600010003120a000100ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce639004b0046004700350032003200390030003100200037002000200020002000200020002000200000007fff04000000424f
Boot000E* USB	BBS(USB,,0x0)0000474f00004e4fb90000000100000071004c0065007800610072002000550053004200200046006c00610073006800200044007200690076006500200038002e003000370000000501090005000000007fff040002010c00d041030a000000000101060001080101060003000305060003007fff040001043e00ef47642dc93ba041ac194d51d01b4ce64400300035004500420041003900440041003200460046003800460034004400350030003800360000007fff04000000424f
1 Like

Ok, then i guess this can be closed, thanks everyone for ideas and suggestions :slightly_smiling_face: