grub-mkconfig silently generates no Linux menu entries due to missing pkgdatadir in /etc/grub.d/10_linux
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- linux, shell
- Domain
- operating-systems
Research direction
Start by tracing archinstall's GRUB setup that generates /etc/grub.d/10_linux, then compare its variables with the grub package version. Reproduce with grub-mkconfig -o /boot/grub/grub.cfg and verify that installed kernels produce menuentry blocks without the manual workaround.
Written by the indexing model from the issue text.
Description
Which ISO version are you using?
2026.07.01
The installation log
/var/log/archinstall/install.log does not exist — cleaned up after reboot from the live ISO. Full diagnostic output demonstrating the bug is included in the issue description above (bash -x trace, broken 10_linux excerpt, and workaround).
describe the problem
Description of the issue
I installed Arch Linux via archinstall on a desktop with:
- CPU: AMD Ryzen 7 7700 (Zen 4)
- GPU: AMD Radeon RX 9070 XT
- RAM: 32 GB DDR5
- Storage: 2x NVMe SSDs
- Boot mode: UEFI
Selected GRUB as bootloader during archinstall. Installation completed successfully. After booting into the system, I installed additional kernels (linux-cachyos and linux-zen), then ran sudo grub-mkconfig -o /boot/grub/grub.cfg. The resulting GRUB menu shows only "Arch Linux", "Windows Boot Manager" and "UEFI Firmware Settings" — zero Linux entries.
Kernels and initramfs images are present in /boot/:
/boot/vmlinuz-linux-cachyos /boot/vmlinuz-linux-zen /boot/initramfs-linux-cachyos.img /boot/initramfs-linux-zen.img /boot/amd-ucode.img
grub-probe works fine:
$ sudo grub-probe --target=device /boot && echo "OK" || echo "FAILED"
/dev/nvme1n1p1
OK
But running the kernel detection script manually reveals the bug:
$ sudo bash -x /etc/grub.d/10_linux 2>&1 | tail -5
- set -e
- prefix=/usr
- exec_prefix=/usr
- datarootdir=/usr/share
- . /grub-mkconfig_lib
/etc/grub.d/10_linux: line 24: /grub-mkconfig_lib: No such file or directory
The /etc/grub.d/10_linux generated by archinstall is missing the pkgdatadir variable:
```console
# archinstall's broken version:
prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
. "$pkgdatadir/grub-mkconfig_lib" # pkgdatadir is never set → expands to /grub-mkconfig_lib
The correct version (from the grub package) should be:
prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
pkgdatadir="/usr/share/grub"
. "$pkgdatadir/grub-mkconfig_lib"
Because set -e is active and pkgdatadir is empty, the script dies silently without generating any menuentry blocks. grub-mkconfig reports no errors whatsoever.
Reinstalling grub (sudo pacman -S grub) does not fix it because /etc/grub.d/10_linux is treated as a config file — pacman preserves the broken version and writes the correct one only as .pacnew.
Workaround:
$ sudo sed -i '/^datarootdir=/a pkgdatadir="/usr/share/grub"' /etc/grub.d/10_linux
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
$ grep -E "^menuentry " /boot/grub/grub.cfg
menuentry 'Arch Linux (CachyOS)' ...
menuentry 'Arch Linux (Zen)' ...
menuentry 'Windows Boot Manager' ...
Expected behavior: grub-mkconfig should detect all installed kernels and generate proper menuentry blocks after a fresh archinstall.
ok?
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 774
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 32
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from archlinux/archinstall
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
archlinux/archinstall#4807 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
archlinux/archinstall#4603 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
archlinux/archinstall#4385 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
archlinux/archinstall#4813 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
archlinux/archinstall#4808 ·
Maintainers usually reply within 2 days
All issues in archlinux/archinstall
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
conda-forge/conda-build-feedstock#289 · 1 comment · 1 reaction ·
-
`pulptest` no longer works in 4.0.0: `ImportError: Start directory is not importable: 'pulp/tests'`Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
remove reddit feedsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TomCasavant/ohio-sites#224 ·