Improve Fedora Support
congomonster opened this issue · 10 comments
Hi,
i downloaded matter and try to run the script. I'm on Fedora. I have this error:
I] [MATTER GRUB THEME]
[I] Argument -i required. Which icons go to which grub entries?.
[I] Your grub entries are:
Traceback (most recent call last):
File "./matter.py", line 715, in
do_preinstall_hint()
File "./matter.py", line 470, in do_preinstall_hint
do_list_grub_cfg_entries()
File "./matter.py", line 517, in do_list_grub_cfg_entries
with open(GRUB_CFG_PATH, "r", newline="") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/boot/grub/grub.cfg'
Unfortunately I did not test the theme on distros that were not ubuntu derivatives hoping that issues like this one will appear to know which distros people are using Matter with. Fedora is one of the distros I did not try Matter on 😅.
I will be trying to adapt matter to it as soon as I can. Thanks for your report.
I found out that there is no folder grub. There is only a folder called grub2. Can i use this folder to put the Matter inside? The Grub 2 Folder has a folder called themes.
While you could drop the ./Matter
folder that is generated by matter.py (if it is being generated properly even with the error you get), you will only get the font and colors and not the icons.
In https://github.com/mateosss/matter/#what-does-matter-do-to-my-system-files it is explained what files matter needs to touch, in theory, if every file has the same structure as an ubuntu derivative, it should be a matter (pun intended as always) of replacing some paths. If you feel comfortable with grub config files you could try it out, if not I will eventually install fedora in a vm and try to make it work.
Okay, here is what i did so far:
- I put the Matter folder that's inside the zip file under /boot/grub2/themes That's the folder with the theme.txt not with the example.theme file! I think that this is the generated one...
- I saved the grub configuration sudo /etc/default/grub /etc/default/grub.bak
- I changed the configuration sudo gedit /etc/default/grub
- I wrote the line: GRUB_THEME="/boot/grub2/themes/Matter/theme.txt"
- I took the line out: #GRUB_TERMINAL_OUTPUT="console"
- I change the resolution to GRUB_GFXMODE=3840x2160
- i did a sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg -> That's grub-update for Fedora
- The theme was found.
I only have the colors now. The font is not applying and the resolution isn't too. The folder structure is different.
So i have to fix:
- Resolution
- Applying the Google Fonts
- Make Icons work
;)
Great! It helps me as well.
- For the resolution, see this paragraph to see which ones your grub supports.
- For the font, you need to set its correct name in
Matter/theme.txt
propertiesboot_menu -> item_font
andlabel -> font
. To see the name of the font that is being loaded, follow this one - For the icons, that is trickier and my previous answer applies.
Finally I got some time to work on this.
So Fedora conforms to what is called The Boot Loader Specification. Unfortunately Matter does not, and expects regular grub files (as it was made to work primarily on Ubuntu). However from Fedora you can easily disable this and revert to regular grub configurations. Also some changes were made on Matter for grub2-*
like commands which Fedora uses and Ubuntu don't.
For it to work, you should: (tested on a Fedora 32 virtualbox machine)
- Change
GRUB_ENABLE_BLSCFG
option tofalse
in/etc/default/grub
- Regenerate
grub.cfg
withsudo grub2-mkconfig -o /boot/grub2/grub.cfg
And now, you should be able to install Matter as usual. Also grub-customizer
should now work if you are interested in renaming/moving your grub entries. So after that I got this:
My main concerns are if this version works on EFI environments as the virtual machine was not.
In any case, I uploaded this Fedora support release, could you try it out @congomonster?
I merged the fedora-support
branch with a notice for fedora users on the quick start section.
It would be nice for it to work without that extra step from users.
Also I'm still not sure if it will work for EFI bootloaders.
I will rename this issue to be the main one related to supporting Fedora.
My main concerns are if this version works on EFI environments as the virtual machine was not.
Can't get it to work on an EFI system following the instructions. I'll dig deeper to see what I can do.
Got it partially working (only Fedora icon showing up) by setting GRUB_THEME
to /boot/grub2/themes/Matter/theme.txt
Great! what did you do for it to work on EFI?
If everything else went right, the icons should placed by updating your grub.cfg file with sudo grub2-mkconfig -o /boot/grub2/grub.cfg
.