Booting from vmlinuz-linux image file with btrfs in rEFInd

Okay. I set my triple boot back up differently with all new installs of EndeavourOS. Yes, you heard that right triple boot all EOS! I’m using rEFInd as i was before this grub issue.

So i was using rEFInd to boot individually from each desktop using grub with os-prober disabled on each. Now i wanted to switch and use the vmlinuz-linux image file to boot from which is easy except i don’t know how to configure it when you have btrfs files system. It doesn’t come up in rEFInd to show the image file like it does on the others using ext4.

So normally i just rename my .png icon file that matches the desktop to vmlinuz-linux.png and add it to the boot folder. But how does one do it for btrfs? @dalto is pretty busy so if anyone knows that uses rEFInd please let me know.

IMG_20220827_141304

Could this be what you are looking for:

https://wiki.archlinux.org/title/Refind#Btrfs_subvolume_support

?

I don’t know rEFInd’s ins and outs so I just post the link if you haven’t looked at it already.

1 Like

I just tried it again in a vm and if rEFInd is installed on the desktop that has btrfs it works. I have mine installed on another desktop currently. So maybe i move refind to my KDE btrfs and would be easy solution? Because rEFInd is intalled on another then it doesn’t show it. Befor the grub issue i was always using grub to boot from each. I wanted to switch is to boot from the image instead. At least for now anyway.

I have been pissing around with this all bloody day. I get 3 icons, one for grub and two for linux-zen. If I press tab on linux-zen I get a menu with the other kernels. BUT NOT AN ICON PER KERNEL Grrrrrrrrrrrr.

2 Likes

I had a nap :smiley:

Actually it’s pretty easy. I’ve been using rEFInd for a while triple booting which has been my test machine. I normally always used grub to boot from and rEFInd is just a boot manager. But since the grub issue i wanted to boot from the vmlinuz-linux image instead. I had rEFInd installed on xfce before but mostly used kde with btrfs. It worked fine booting from grub but it doesn’t see the btrfs and show the image file or icon. So now i switched rEFInd to be installed on KDE btrfs and i’m good. Just not sure how to set it up if it’s installed on one of the others so it will work the way i want it to.

So i just download a .png icon of the desktops to match and rename it to vmlinuz-linux and copy them to the boot folder on each desktop. Then you just hide the other icons that come up by using the delete key. It’s pretty easy as i want to boot from the vmlinuz-linux image instead of the grubx64.efi.

Edit: This can be a solution for now but i would like to understand how to make it work to boot a btrfs system if i have rEFInd installed on a non btrfs install.

1 Like

This is a BTRFS system (sorry for shouting :rofl:), I officially give up.

@xircon
Keep in mind you need to name the .png icon for the kernel image you are booting. So if it zen or other then what ever the image file name is you use.

drwxr-xr-x 1 root root  690 Aug 27 20:38  .
drwxr-xr-x 1 root root  236 Apr 18 22:24  ..
drwxr-xr-x 4 root root 4.0K Jan  1  1970  efi
drwxr-xr-x 1 root root   12 May  6 19:27  EFI
drwxr-xr-x 1 root root   84 Aug 25 22:50  grub
-rw-r--r-- 1 root root  50K Jul 15 11:16  amd-ucode.img
-rw------- 1 root root  83M Aug 25 22:50  initramfs-linux-amd-fallback.img
-rw------- 1 root root  66M Aug 25 22:50  initramfs-linux-amd.img
-rw------- 1 root root  91M Aug 27 00:05  initramfs-linux-fallback.img
-rw------- 1 root root  67M Aug 27 00:05  initramfs-linux.img
-rw------- 1 root root  92M Aug 27 00:05  initramfs-linux-zen-fallback.img
-rw------- 1 root root  67M Aug 27 00:05  initramfs-linux-zen.img
-rw-r--r-- 1 root root 1.2K Aug 27 12:47  refind_linux.conf
-rw-r--r-- 1 root root 1.2K Aug 27 12:31  refind_linux.conf-old
-rw-r--r-- 1 root root 4.4M Aug 25 12:07  System.map-5.19.4-AMD
-rw-r--r-- 1 root root  11M Aug 27 00:05  vmlinuz-linux
-rw-r--r-- 1 root root  10M Aug 25 14:18  vmlinuz-linux-amd
-rwxr-xr-x 1 root root  14K Aug 27 20:38  vmlinuz-linux-amd.png
-rwxr-xr-x 1 root root  14K Aug 27 20:08  vmlinuz-linux.png
-rw-r--r-- 1 root root  12M Aug 27 00:05  vmlinuz-linux-zen
-rwxr-xr-x 1 root root  14K Aug 27 20:08  vmlinuz-linux-zen.png

Give up, it is the only way to retain the last dregs of my sanity.

If you install rEFInd package then irefind-install. Reboot and go ito UEFI and set to boot from rEFInd. Then download a .png icon image you want and reanme it to whatever the vmlinuz-linux image file is called with .png on the end and then copy it into the boot folder. This is if you want to boot from the kernel image. Otherwise to boot from grub you have to put the image in the rEFInd icon folder and it has to be named os_endeavouros-xxxx.png Then you can boot from grubx64.efi.

Edit: Grub is getting too grubby! :rofl:

NO! Stop. Now. Wibble. You will start me reading again. I am too stupid to own a computer. I still have the packaging, am going to send it back.

I have a hard time RTFM also. I just want it done! :laughing:

Edit: I’m only trying it this way so i have options. I was very happy using it before booting from grubx64.efi. But now if i have it set up this way i can switch to either and just un-hide the icons. You can have both ways set up. Even have different icons to represent booting from grub or the image file if you so desired. But if you have multiple desktops installed that’s a lot of icons. I had over 10 desktops installed before using rEFInd. Got a little annoying updating them all.

I’m pretty noobish myself but I’m just getting around to getting refind working and customizing it. I’ve had issues running the vmlinuz-linux image from refind on both endeavour and nobara, they both give a faile switch root error. Not sure what that’s about.

I have found a pretty cool trick though. You can grab the icon for a distro you want, name it to “.VolumeIcon.png” and sudo mv .VolumeIcon.png / to move it to the root directory of your current install. Refind will use this image for the repo. I think this can help root out the extra boot options you don’t want cluttering your refind

Actually what you are supposed to do is name the icon vmlinuz-linux.png and put it in the same folder as the file.

I wouldn’t say you are “supposed” to do it this way–it is just one of many possible options that are mentioned in the documentation.

I prefer setting up manual boot stanzas instead of using refind-install because the submenu entries are more easily customizable, your root subvolume can be named whatever you want without setting also_scan_dirs in refind.conf, you can even hand off to another bootloader like Grub from a submenu if you want to (for booting off of Btrfs snapshots with grub-btrfs for example). Also your png files can be named whatever you want, and can be stored wherever you want. :wink:

It’s a little tricky figuring out how to write the manual boot stanza, but once you get the hang of it I think it’s the best option. I wrote up a how-to as part of a guide for something else a while back if anyone is interested in giving it a shot:

Sorry, I didn’t really mean it that way. I guess it just made more sense to me to do it this way. I don’t really have much experience setting up manual stanzas but i did use refind for a while multibooting.