Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Fedora Support #41

Open
ghost opened this issue Jul 27, 2020 · 10 comments
Open

Improve Fedora Support #41

ghost opened this issue Jul 27, 2020 · 10 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Jul 27, 2020

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'

@mateosss
Copy link
Owner

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.

@mateosss mateosss changed the title Error: No such file or directory Matter not working on Fedora Jul 27, 2020
@ghost
Copy link
Author

ghost commented Jul 27, 2020

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.

@mateosss
Copy link
Owner

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.

@ghost
Copy link
Author

ghost commented Jul 27, 2020

Okay, here is what i did so far:

  1. 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...
  2. I saved the grub configuration sudo /etc/default/grub /etc/default/grub.bak
  3. I changed the configuration sudo gedit /etc/default/grub
  4. I wrote the line: GRUB_THEME="/boot/grub2/themes/Matter/theme.txt"
  5. I took the line out: #GRUB_TERMINAL_OUTPUT="console"
  6. I change the resolution to GRUB_GFXMODE=3840x2160
  7. i did a sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg -> That's grub-update for Fedora
  8. 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:

  1. Resolution
  2. Applying the Google Fonts
  3. Make Icons work

;)

@mateosss
Copy link
Owner

Great! It helps me as well.

  1. For the resolution, see this paragraph to see which ones your grub supports.
  2. For the font, you need to set its correct name in Matter/theme.txt properties boot_menu -> item_font and label -> font. To see the name of the font that is being loaded, follow this one
  3. For the icons, that is trickier and my previous answer applies.

@mateosss
Copy link
Owner

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)

  1. Change GRUB_ENABLE_BLSCFG option to false in /etc/default/grub
  2. Regenerate grub.cfg with sudo 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:

2020-08-11-135836_1920x1080_scrot

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?

@mateosss mateosss added good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed labels Sep 24, 2020
@mateosss
Copy link
Owner

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.

@mateosss mateosss changed the title Matter not working on Fedora Improve Fedora Support Sep 28, 2020
@brneor
Copy link

brneor commented Sep 30, 2020

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.

@brneor
Copy link

brneor commented Sep 30, 2020

Got it partially working (only Fedora icon showing up) by setting GRUB_THEME to /boot/grub2/themes/Matter/theme.txt

@mateosss
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants