You are not logged in.

#1 2021-11-08 23:29:38

anthon
Member
Registered: 2013-05-13
Posts: 34

[Solved] rEFInd doesn't find some of my partitions

Hello,
I know it sounds like a classic issue, but I'm at loss for this one...
I have 2 physical drives on my system:

  • nvme0: factory Windows partition, with a factory ESP, and some other Windows partitions... You know the drill.

  • nvme1: it has bit of unallocated space (I'll get back to that later), an Archlinux partition (ext4), and a KDE Neon partition (ext4)

I installed Neon first, with rEFInd (from Neon at first) on the esp of nvme0. No problem, everything works.
Then I installed Archlinux on another partition in nvme1 as I planned. The installation goes well, I reboot.
Here comes the trouble: rEfind doesn't show an Archlinux entry, as it should have.
So I try with a manual boot stanza. The stanza shows up in rEFInd, but it doesn't work (shows me an error about the loader not found). After further investigation, I notice the stanza wants to boot from "SYSTEM" (the name of the esp on nvme0) instead of "archlinux", the label of the volume. I double checked, triple checked, tried with UUID, etc... same result.
I check if the driver for ext4 fs is installed. It is. Makes sense, since it auto-detects neon just fine.
I copy the content of /boot in a subdirectory of my esp... It works. I can boot into my arch installation from here.
But the factory esp is rather small, so I don't want to mount it as /boot/ for this installation, so I want to figure out what is wrong with rEFInd.
I reinstall rEFind  from arch, since this version, as opposed to neon's version, can output logs.

==========Scanning for volumes==========
19:23:39 - Found handles for 8 volumes
19:23:39 - Setting volume name to generic description of ' whole disk volume'
19:23:39 - Identified volume ' whole disk volume', of type whole disk
19:23:39 - Setting volume name to filesystem name of 'WinRE'
19:23:39 - Identified volume 'WinRE', of type NTFS
19:23:39 - Setting volume name to filesystem name of 'SYSTEM'
19:23:39 - Identified volume 'SYSTEM', of type FAT
19:23:39 - Setting volume name to partition name of 'Microsoft reserved partition'
19:23:39 - Identified volume 'Microsoft reserved partition', of type
19:23:39 - Setting volume name to filesystem name of 'Windows'
19:23:39 - Identified volume 'Windows', of type NTFS
19:23:39 - Setting volume name to filesystem description of '791 MiB NTFS volume'
19:23:39 - Identified volume '791 MiB NTFS volume', of type NTFS
19:23:39 - Setting volume name to generic description of ' whole disk volume'
19:23:39 - Identified volume ' whole disk volume', of type whole disk
19:23:39 - Setting volume name to partition name of 'root'
19:23:39 - Identified volume 'root', of type ext4
19:23:39 - Identified 8 volumes

This confirms that rEFInd misses the volume named "archlinux" entirely, although it does see neon (the volume 'root' here is the partlabel of neon's root partition).
I tried creating a new ext4 partition in the unallocated space in nvme1 and copied the content of /boot/ here, rEFInd doesn't see it.
I tried doing the same thing but with a FAT32 partition, rEFInd is still blind.

So long story short, rEFInd auto-detects everything that is on the esp, + neon on an ext4 partition on nvme1, but nothing else? I'm going crazy.
FYI I disabled SecureBoot in the bios.

lsblk -f
NAME        FSTYPE FSVER LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                                
├─nvme0n1p1 ntfs         WinRE     82F85167F8515A8D                                    
├─nvme0n1p2 vfat   FAT32 SYSTEM    2051-B9F6                                           
├─nvme0n1p3                                                                            
├─nvme0n1p4 ntfs         Windows   8AB4527AB45268A9                                    
└─nvme0n1p5 ntfs                   6C886BEB886BB26E                                    
nvme1n1                                                                                
├─nvme1n1p2 ext4   1.0   archlinux 406fe302-e7d0-499f-84ad-44b95a65fcb1  834,6G     1% /
└─nvme1n1p3 ext4   1.0             ab1f5286-cf6d-4a6f-8193-39130d60a35d 

My refind.conf is the same stock refind.conf that came with the package, I just uncommented log_level. So I don't think it's necessary to put it here, but let me know if you want to see it. Or anything else that might be useful.
If anyone can tell me what I'm missing I would be eternally grateful. Thanks.

Last edited by anthon (2021-11-09 13:24:20)

Offline

#2 2021-11-09 02:28:13

zpg443
Member
Registered: 2016-12-03
Posts: 271

Re: [Solved] rEFInd doesn't find some of my partitions

Assuming you are using UEFI to boot, what does your UEFI show? If the partition is missing from there also, did you try scripting from the UEFI shell?

Last edited by zpg443 (2021-11-09 02:28:24)

Offline

#3 2021-11-09 03:33:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [Solved] rEFInd doesn't find some of my partitions

Did you do the necessary config for refind to consider Arch kernels? https://wiki.archlinux.org/title/REFInd … _by_rEFInd

Offline

#4 2021-11-09 09:47:05

anthon
Member
Registered: 2013-05-13
Posts: 34

Re: [Solved] rEFInd doesn't find some of my partitions

V1del wrote:

Did you do the necessary config for refind to consider Arch kernels? https://wiki.archlinux.org/title/REFInd … _by_rEFInd

I tried that before, just tried again, unfortunately it didn't help. I think this just enables the '%v' variable in refind_linux.conf? It seems the issue on my installation happens before that...

zpg443 wrote:

Assuming you are using UEFI to boot, what does your UEFI show? If the partition is missing from there also, did you try scripting from the UEFI shell?

What do you mean by "what does your UEFI show"?
As you suggested, I just tried using the UEFI shell, here's a screenshot of the 'map' output: image
In the picture, BLK2 and BLK0 -in no particular order- seem to be the archlinux partition and the small ext4 partition (formerly unallocated space). They don't have a PARTUUID in there. Everything else matches with the rest of my partitions...
I feel like I messed something up... I'm not sure where to go from there.

Offline

#5 2021-11-09 10:26:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [Solved] rEFInd doesn't find some of my partitions

Did you add a refind_linux.conf to your /boot dir on the Arch partition? My understanding of refind is that it actively looks for that file on all partitions to generate a kernel entry. How did/does your manual stanza look like exactly?

Offline

#6 2021-11-09 11:35:05

anthon
Member
Registered: 2013-05-13
Posts: 34

Re: [Solved] rEFInd doesn't find some of my partitions

I did add a refind_linux.conf in the /boot dir of the Arch partition. The problem is refind doesn't even get there, since it doesn't see the arch partition. It can boot the arch partition if the kernel files and a different refind_linux.conf  (same content but duplicated) are present on the esp, then uses the "root=UUID=406fe302-e7d0-499f-84ad-44b95a65fcb1" from that refind_linux.conf to boot into the correct partition.
Here is the stanza from refind.conf:

menuentry "Arch Linux" {
    icon     /EFI/archrefind/icons/os_arch.png
    volume   "archlinux"
    loader   /boot/vmlinuz-linux
    initrd   /boot/initramfs-linux.img
    options  "root=PARTUUID=41BEBB58-8934-0148-932B-03416DAEC027 rw add_efi_memmap"
    submenuentry "Boot using fallback initramfs" {
        initrd /boot/initramfs-linux-fallback.img
    }
    submenuentry "Boot to terminal" {
        add_options "systemd.unit=multi-user.target"
    }
}

I tried volume with or without " ", I tried with an uuid (made sure I wasn't using a partuuid EDIT: it was actually the PARTUUID that I tried, as per the wiki), it still didn't work..
Look at what refind looks like with this stanza: https://i.imgur.com/F0NUoug.jpg
It says "Boot Arch Linux from SYSTEM", where SYSTEM is the label of the esp. It should say "Boot Arch Linux from archlinux".
For comparaison, the neon entry: https://i.imgur.com/rkley9Y.jpg
Here it boots from "root", which is the partlabel of the neon partition.
And lastly, the entry for the arch kernel that I copied on the esp: https://i.imgur.com/td3v3cR.jpg
It boots from "SYSTEM", the esp, so this is correct. Do you see what I mean?

Last edited by anthon (2021-11-09 11:47:59)

Offline

#7 2021-11-09 12:53:02

zpg443
Member
Registered: 2016-12-03
Posts: 271

Re: [Solved] rEFInd doesn't find some of my partitions

anthon wrote:

What do you mean by "what does your UEFI show"?
As you suggested, I just tried using the UEFI shell, here's a screenshot of the 'map' output: image
In the picture, BLK2 and BLK0 -in no particular order- seem to be the archlinux partition and the small ext4 partition (formerly unallocated space). They don't have a PARTUUID in there. Everything else matches with the rest of my partitions...
I feel like I messed something up... I'm not sure where to go from there.

Not all versions of UEFI play well. Did you attempt to launch the partition directly from the UEFI shell, as in:
https://wiki.archlinux.org/title/Unifie … l_commands

Offline

#8 2021-11-09 13:23:55

anthon
Member
Registered: 2013-05-13
Posts: 34

Re: [Solved] rEFInd doesn't find some of my partitions

Ok I solved my problem, I'm not sure why it works, but here's what I did:
I used parted and noticed that the small partition on nvme1 had the "hidden" flag, and the archlinux partition had the "legacy_boot" flag. Not sure why these flags were here in the first place, I certainly did not set them explicitly, but here they are. My first thought was "legacy_boot" doesn't sound like something I would want to have with UEFI, maybe that's the problem. But first I tried to remove the "hidden" flag on nvmen1p1. I reboot, and it works. Everything works, the auto-detection, the stanza, everything. WTF. I also removed the "legacy_boot" on nvme1n1p2 because after some googling, even if the name is misleading, it didn't sound necessary. Everything is ok.
So I don't understand how a "hidden" flag on nvmen1p1 caused such a problem, especially considering that when this partition was completely erased (unallocated space), the problem existed. I also don't understand why this affected the arch partition and not the neon partition. I guess we shall never know...
Thank you everyone for your time.

Last edited by anthon (2021-11-09 13:27:43)

Offline

Board footer

Powered by FluxBB