New dual boot fix for EndeavourOS

Too new to this software I guess - where does one go to do that? Maybe we need a wiki for the forum?
Ok it is more that I need a wiki for the forum :grin:

Freebird54

In the upper right, click on your avatar. Under your avatar, click on the envelope.
Click on “New Message”, then add manuel where it says add a user.
Then type away.

Oh yeah, go Avalanche.

Pudge

1 Like

I wanted to ask about multi booting linux as i find it a real problem. I even tried endeavour OS with the Anarchy installed version of Arch and the dual boot fix didn’t work for me. When you install rEFind on a system that already has grub installed doesn’t it keep the original entry for grub? Isn’t that the penguin icon in rEFind and then it adds another entry? Then if you install another distro do you use grub or? I have never used rEFind only grub and i do have dual boot Windows 10 with EOS. I’m having difficulty dual booting linux on this new system and can’t seem to get it working with grub and i’m looking at alternatives. Maybe EFIstub? rEFind, Systemd not sure…

You could also check @freebird54 's wiki entry for help setting up rEFInd.

What first confused me personally was that rEFInd may add multiple boot entries for the same system out of the box, depending on what information it finds when scanning.

Take a typical standard (uefi) EndeavourOS install for example. This would leave you with grub installed to /boot/grub, an EFI executable normally residing in /boot/efi/EFI/EndeavourOS/grub64.efi and your kernel in /boot/initramfs-linux.img.

rEFInd will now most probably at least offer the following first two boot options out of the box:

  1. An /EFI/EndeavourOS/grubx64.efi entry that launches your standard EOS-GRUB, which in turn launches the Linux kernel (and may also offer its own menu for booting other things like other distros grub found, depending on how it’s configured).
  2. A /boot/initramfs-linux.img (vmlinuz-linux) entry that launches the kernel without using GRUB. (It boots via the EFI stub loader, which is built into the kernel itself.)
  3. If you have multiple kernels (LTS …) more boot entries might show up.
  4. A “Boot Legacy OS…” option might launch a BIOS-mode version of GRUB, if your system provides something like this.

For a system with an encrypted /boot rEFInd wouldn’t be able to see/find the kernel but you should be able to chainload with option 1. This is what I use in a dual boot situation with Windows. If you’d let GRUB handle this dual boot situation without rEFInd, you’d FIRST have to unlock your EOS partition to be able to choose booting Windows or EOS. With rEFInd I can directly boot into Windows without having to enter a passphrase first.

If you add further distributions or live systems (cd/usb) rEFInd should automatically add boot entries. If it doesn’t know which type of family a linux distro belongs to, the standard penguin logo is shown.

The rEFInd boot options can get really cluttered if you let refind just automatically add them.
If you want to remove entries, you have several options, most of which involve editing refind.conf (which is probably in /boot/efi/EFI/refind):

  • Stop automatic scanning of internal drives by removing internal from the scanfor option and set up manual boot entries (see my post above).
  • Add the filename(s) you want to avoid scanning to dont_scan_files . Note that hiding individual kernels in this way is inefficient, since you’ll need to update the list when new kernels are installed. This could be a good way to hide GRUB, though.
  • Add the directories where unwanted boot loaders reside to dont_scan_dirs . (For instance, boot to remove the Linux kernels or EFI/EndeavourOS to remove GRUB.)
  • Add the volume names associated with unwanted boot loaders to dont_scan_volumes .

Another option is hiding boot entries directly from inside rEFInd’s menu. Just see the wiki on how to do this.

All in all, I’m really happy with using rEFInd. There are tons of themes (not just the ones refinds website lists) which can give it a very minimal and elegant look.

1 Like

I went to the wiki entry, then ended up going to rodsbooksDOTcom and saw this:

I don’t know if I will ever use rEFInd, but since I live in the US I ended up making a donation to rodsbooks. Great to see the folks in FOSS making an effort to make things better. :smiling_face_with_three_hearts:

Pudge

6 Likes

Thank you very much for this new tool! I use multi-boot on several of my laptops, and grub corruption is a common issue among Arch and Debian/Ubuntu based distributions installed on the same machine. Add complications with systemd boot (gummiboot) and you get a regular pasta salad. Thanks again.

Great idea! I actually got around to setting up a Paypal account so I could send something too - you don’t have to live in the US to care about this.

Oh - and I don’t know if you guessed, but I DO use rEFInd :grinning:

Freebird54

1 Like

Well i have tried rEFind and i’m not totally onboard. I really hope Grub evolves some day because i would rather have grub set up to use a menu that automatically uses efistub and boots the menu item directly from the kernel via a path that leads to the correct drive.

What i have done is installed EndeavourOS Xfce on my first m.2 drive and because it uses grub have left it that way. I have uninstalled os-prober and installed Arch Cinnamon on my second m.2 drive using efistub for boot. Then i installed Arch KDE Plasma on my SSD using efistub for boot. So it always automatically will boot to EndeavourOS currently. If i want to go to the others i just hit the f11 key and select to boot from either or.

I probably wouldn’t even mind having EndeavourOS also boot this way. It would automatically boot which ever one you have set as the first boot device. No more grub to worry about. :relaxed:

That setup sounds as if works extremely well. If it handles getting the microcode loaded properly that way, then I see no reason to change. In my limited experience so far, however, it is much more difficult to get a debian based system to do likewise - if nothing else because they don’t thave Archwiki to help! I agree that for the moment, avoiding grub is the main good thing :grinning:

I’ll stick with rEFInd for the moment though - it handles all the different boot methods that alternate distros come up with - and even allows Windows to live ('though on my setups Windows lives only on Virtualbox - can’t be trusted on bare metal)

Freebird54

rEFind i know is good but i just don’t have enough experience with it to set it up to look and work the way i want it. This works for now as i couldn’t get grub to co-operate multi-ibooting Arch even with grub tools. So i installed two others each on separate drives and boot by selecting them in UEFI via function key. It’s working so i’ll use it for now until i figure out something better.

@ricklinux
What was the exact problem that even grub-tools couldn’t solve? Did you use LUKS?

Honestly i can’t remember exactly because i have done so many installs messing around. I can install two versions of EndeavourOS but don’t like the looks of the grub entries. But when i use Anarchy installer to install Arch it won’t boot EndeavourOS. It boots and does nothing but black screen. The grub tools don’t fix it and i get frustrated trying to deciper the problem. Not sure if it is the Microcode or graphics? This is running on AMDGPU kernel drivers. Anarchy gives the option to use grub as default or systemd or syslinux or efistub. I like the idea of booting directly from the kernel and if it could work with a menu and automatically load from whatever drive would be great. I don’t mind grub if it works.

Would you still have the latest file /boot/grub/grub.cfg that fails? If so, could you pastebin it and show the URL?

@manuel
No sorry i don’t but if i try it again i will save it and send you the link.
Also how does grub set a different image in the grub menu when i install EndeavourOS twice each with different desktop? It looks like a polar bear on the second entry and i would like to change the naming in the entries also because they are the same.

@ricklinux
There is this utility called customcfg that creates file /boot/grub/custom.cfg. It is here: https://raw.githubusercontent.com/manuel-192/m-m/master/PKGBUILDs/customcfg/customcfg

Although I haven’t tested that on many environments, you might want to try it and see what it generates for your system. It shouldn’t cause any other changes than creating that file. And if you still use grub, you’ll see new boot entries.
If you try it, please send a link to the contents of that file too. :smile:

1 Like

I don’t know if you noticed the wiki entry I put together, but I am running 3 different Arch-based systems, and all of them easily handle the microcode - and they are all running AMDGPU drivers too (had to be since XFCE 4.14 - to lose the tearing). IT really isn’t tough to tweak appearances and entries - even I can do it! :grin: Keep in mind that basically rEFInd is what you asked for - a way to boot from kernel, with a menu.

On the other hand, I am sure @manuel can make grub behave too. I just found that you need to make all kinds of 40-custom entries to avoid os-prober mistakes, and then track all the different version of it from each distro! (or settle for quick temp fixes with editing grub.cfg directly).

Freebird54

I didn’t find it easy i guess because i have never tried it. I did manage to get it working for two Arch booting but they had the same Icons and info. I want to change that so i have different icons and or wording. I guess i gave up too quick. :upside_down_face:

Perhaps you did. Changing the icons that show up is quite easy (there are several ways) - but the simplest is mentioned in the wiki. When your distro is installed, it will usually make a directory using it’s OSname in /boot/efi/EFI. For instance mine has “arch” , “ArcoLinux” , " EndeavourOS" , “MX19” , “ubuntu” - and you can see that they all have different display logos for selecting. I just copy the icon I want to see into /boot/efi/EFI/refind/icons, giving it a name of of “os_” + the directory name it created + .png

If you look at ALL the docs for refind, it seems intimidating (duh) but 90% of it you’ll never need!

Freebird54

@freebird54
Okay i tried again. :smile: I have rEFind installed and i copied the EndeavourOS logo and i set rEFind as boot and it automatically has the logo and nothing else and is booting on the linux image. This is what i want but now i want to try and install a clean Arch KDE Plasma with the Anarchy installer. This is where before i wasn’t able to boot EndeavourOS after the install. So i’m going to try again and see and this will be on a different drive. I will use grub on that install but boot on rEFind and see. Will it automatically find it? Also what about the fancy settings you did after? I don’t want any issues when it updates.

Edit: I’m not understanding #5 in the wiki? Do i need to do this in order for rEFind to use the microcode?

If you use rEFInd to boot the grub, then the microcode will be handled by grub as usual. The problem comes when another system is added - when it checks for other systems, it will make a bad entry for an Arch-based system system, it will try to:

initrd=/boot/amd-ucode.mg

instead of:

intrd=/boot/amd-ucode.img initrd=/boot/initramfs-linux.img

as it should. That is why I do it as shown in section 5 of the wiki - if each Arch-based system has its own refind-linux.conf file as shown, then regardless of other systems coming and going, it will always boot correctly off the vmlinuz-linux entry
As you add systems, entries on rEFInd will show up (usually 2 at a time, grub and EFIstub mode), and you choose which to keep and/or/use. If systems get removed, their entries will also disappear.

If you install with Anarchy with grub, you will get the 2 entries in rEFInd I mention, and more than likely the grub they build will choke on the microcode file as described above - but the EFIstub boot for EndeavourOS should be fine. So should the new system, as rEFInd will pick it up on its own.

I would still recommend you add the microcode in as per #5. If you install rEFInd in the new system, it should automatically build a refind-linux.conf for you (in /boot of the new system) and all you need to do is add in the correct intrd entries as shown.

Hope this helps (and that I was clear enough!)

Freebird54