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

How to install a custom grub theme? #199

Closed
ImGGAAVVIINN opened this issue Apr 23, 2023 · 1 comment
Closed

How to install a custom grub theme? #199

ImGGAAVVIINN opened this issue Apr 23, 2023 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@ImGGAAVVIINN
Copy link

Describe the question

I want to install a custom grub theme on my custom distro, but I don't know how to do it

What you have tried

I have tried to edit /etc/default/grub to change the grub theme but it didn't apply after I installed the distro

Expected behaviour

A clear and concise description of what you expected to happen.

The custom grub theme should be applied when booting up after I installed the distro onto a pc

@ImGGAAVVIINN ImGGAAVVIINN added the question Further information is requested label Apr 23, 2023
@PJ-Singh-001 PJ-Singh-001 self-assigned this May 6, 2023
@PJ-Singh-001
Copy link
Owner

PJ-Singh-001 commented May 6, 2023

The Ubiquity installer overwrites your changes to /etc/default/grub.
This is why your changes are not reflected in the installed OS.

Therefore, you need to tell Ubiquity to replace the Ubiquity-modified grub file with your custom grub file.

  1. Make your changes to the default grub file as you did before.

    /etc/default/grub
    
  2. Make the same changes to this "backup" grub file, as well.

    /usr/share/grub/default/grub
    
  3. Instruct Ubiquity to apply the custom grub file (from /usr/share/grub/default/grub).

    On the Options page, Preseed tab, select the ubuntu.seed file, and add the following lines at the end:

    This preseed command will be executed by Ubiquity once it has finished installing your OS.

    # (a) Generate /boot/grub/grub.cfg using the customized version of /etc/default/grub.
    # (b) Revert the customized version of /etc/default/grub after it has been overwritten.
    ubiquity ubiquity/success_command string \
        in-target bash -c 'update-grub'; \
        in-target bash -c 'cp /usr/share/grub/default/grub /etc/default/grub';
    

(I assume the new Subiquity installer in Ubuntu 23.04 does the same thing as Ubiquity, but the above may not work for Subiquity, because Ubuntu 23.04 no longer uses preseed files).

@PJ-Singh-001 PJ-Singh-001 changed the title How to install custom grub theme How to install a custom grub theme? May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants