ChrisTitusTech / ChrisTitusTech/bootloader-themes

Add functionality for Rocky Linux

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
224
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
I am using Rocky Linux 9. Your install script is only expecting Fedora for the DNF package manager. Rocky has grub in "/boot/grub2/grub.cfg" not "/boot/efi/EFI/fedora/grub.cfg". I tried making a new branch with a PR but I was blocked so I am posting here.

Describe the solution you'd like
Enable the ability to look not just for package manager but also Distribution name to know the path to install

Describe alternatives you've considered
Not using your script. But i would like to use it.

Additional context
Here is my code change:
From this:

function update_grub() {
    # Update grub config
    echo_primary 'Updating grub config...'
    if [[ -x "$(command -v update-grub)" ]]; then
        echo_info 'update-grub'
        update-grub

    elif [[ -x "$(command -v grub-mkconfig)" ]]; then
        echo_info 'grub-mkconfig -o /boot/grub/grub.cfg'
        grub-mkconfig -o /boot/grub/grub.cfg

    elif [[ -x "$(command -v grub2-mkconfig)" ]]; then
        if [[ -x "$(command -v zypper)" ]]; then
            echo_info 'grub2-mkconfig -o /boot/grub2/grub.cfg'
            grub2-mkconfig -o /boot/grub2/grub.cfg

        elif [[ -x "$(command -v dnf)" ]]; then
            echo_info 'grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg'
            grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
        fi
    fi
}

To this:

function update_grub() {
    # Update grub config
    echo_primary 'Updating grub config...'
    if [[ -x "$(command -v update-grub)" ]]; then
        echo_info 'update-grub'
        update-grub

    elif [[ -x "$(command -v grub-mkconfig)" ]]; then
        echo_info 'grub-mkconfig -o /boot/grub/grub.cfg'
        grub-mkconfig -o /boot/grub/grub.cfg

    elif [[ -x "$(command -v grub2-mkconfig)" ]]; then
        if [[ -x "$(command -v zypper)" ]]; then
            echo_info 'grub2-mkconfig -o /boot/grub2/grub.cfg'
            grub2-mkconfig -o /boot/grub2/grub.cfg

        elif [[ -x "$(command -v dnf)" ]]; then
	    # Check if the Distro is Rocky Linux
	    if grep -q 'Rocky Linux' /etc/os-release; then
		echo_info 'grub2-mkconfig -o /boot/grub2/grub.cfg'
                grub2-mkconfig -o /boot/grub2/grub.cfg
	    else
		echo_info 'grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg'
                grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
	    fi
        fi
    fi
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the update_grub function in the install script and inspect how it chooses grub2-mkconfig output paths. Use /etc/os-release to distinguish Rocky Linux from Fedora, preserve the existing paths for other distributions, and verify that Rocky Linux 9 uses /boot/grub2/grub.cfg.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
cli, operating-systems
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.