jlobue10 / SteamDeck_rEFInd

Simple rEFInd install script for the Steam Deck (with GUI customization)
MIT License
521 stars 51 forks source link

unable to add multi boot (Windows, SteamOS, Kali) #26

Closed libertyordeath76 closed 1 year ago

libertyordeath76 commented 1 year ago

I'm unable to add a 3 system multi boot. It was probably easier to just add the Black Arch repos but I prefer to have a full Kali install on the steam deck. Installed Kali and it only boots from the decks bootloader, not rEFInd. I added a PNG image of the kali logo to the icons folder, renamed it to os_kali.png, and edited the config file with the following:

menuentry "Kali" { icon /EFI/refind/icons/os_kali.png loader /EFI/kali/grubx64.efi graphics on }

Kali does not appear in the bootloader, only windows and SteamOS appear, unsure of what I'm doing wrong here. Thanks in advance for the help.

jlobue10 commented 1 year ago

I'll look into this more when I get home tonight with a Kubuntu installation on my Steam Deck that I keep around for testing purposes. My first guess looking at this raises a couple of questions. Does the Kali grubx64.efi loader exist on the /esp partition as this loader implies? If not, and it's actually on the Kali Linux /boot/efi partition, then a different configuration will be required. As this will likely be a desired feature going forward, I will work out what needs to be placed in the manual Stanzas for really any Linux distro that people may want to boot. My guess is that you will need to do some combination of these examples from the full refind.conf file, but tailor it to your particular Kali installation.

/ A sample entry for a Linux 3.13 kernel with EFI boot stub support on a partition with a GUID of 904404F8-B481-440C-A1E3-11A5A954E601. This entry includes Linux-specific boot options and specification of an initial RAM disk. Note uses of Linux-style forward slashes. Also note that a leading slash is optional in file specifications. /

menuentry Linux { icon EFI/refind/icons/os_linux.png volume 904404F8-B481-440C-A1E3-11A5A954E601 loader bzImage-3.3.0-rc7 initrd initrd-3.3.0.img options "root=UUID=5f96cafa-e0a7-4057-b18f-fa709db5b837" disabled }

/ Below is a more complex Linux example, specifically for Arch Linux. This example MUST be modified for your specific installation; if nothing else, the PARTUUID code must be changed for your disk. Because Arch Linux does not include version numbers in its kernel and initrd filenames, you may need to use manual boot stanzas when using fallback initrds or multiple kernels with Arch. This example is modified from one in the Arch wiki page on rEFInd (https://wiki.archlinux.org/index.php/rEFInd). /

menuentry "Arch Linux" { icon /EFI/refind/icons/os_arch.png volume "Arch Linux" loader /boot/vmlinuz-linux initrd /boot/initramfs-linux.img options "root=PARTUUID=5028fa50-0079-4c40-b240-abfaf28693ea 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" } disabled }

If this is not enough info to help you figure it out, I can help more when I am home from work tonight. I'll try to work out what I need to do to get Kubuntu up and running properly. Once I am able to get it working from the bootloader screen, I will probably add it as a (disabled) manual boot stanza at the bottom of the config file. This was on my todo list, but you just moved it up the list of priorities, which is fine.

jlobue10 commented 1 year ago

I just got Kubuntu to work fairly easily, and even installed and booted into Kernel 6.0.9 (with mainline ppa). :)

Try replacing the loader /EFI/kali/grubx64.efi line with loader /EFI/kali/shimx64.efi and let me know how it goes.

Also, I think I may have initially misread your problem. Maybe your loader line is correct. I would double check with an efibootmgr command from SteamOS whether Kali is expecting shimx64.efi or grubx64.efi .

Did you re-run the script after making these changes? I'm assuming you made these changes in your cloned SteamDeck_rEFInd directory. To install them, you must re-run the script again (after you're happy with your edits to the icons and config file).

libertyordeath76 commented 1 year ago

Thank you for taking the time to help me and for your amazing contributions to the community.

Just got home and tested the above mentioned fixes:

efibootmgr showed kali expecting grubx64.efi

menuentry "Kali" { icon /EFI/refind/icons/os_kali.png loader /EFI/kali/grubx64.efi graphics on }

I reran the SteamDeck_rEFInd_install shell script after saving refind.conf

rEFInd boots fine but still shows only windows and SteamOS. Do you think this could be an icon issue? The kali icon I pulled online is 513 x 513. I placed it in the /home/deck/SteamDeck_rEFInd/icons folder.

jlobue10 commented 1 year ago

Yes, that's very likely what could be happening. Try resizing that icon to 128 x 128 and then re-running the script to install it to the proper location (or manually copying it there works fine too, but needs sudo permissions). Also, I'd make sure it's actually a proper png (rEFInd is hit and miss with other image types), not just a misnamed filetype. You can ensure this by exporting it to a PNG file with something like GIMP.

libertyordeath76 commented 1 year ago

image

Boom, fixed it. Thanks, you're a rockstar.