grub, bootloader: Make the grub-* and /boot/grub names configurable.

Some distributions (e.g. Fedora) use grub2-* (resp. /boot/grub2/) names.

Fixes #123.
main
Kevin Kofler 10 years ago
parent d9187c25c7
commit 7e1ec78d35

@ -1,5 +1,5 @@
---
# Gummiboot configuration files settings, set preffered distribution name and amount of time before
# Gummiboot configuration files settings, set preferred distribution name and amount of time before
# default selection boots
distribution: KaOS-kf5
kernel: /vmlinuz-linux
@ -7,5 +7,9 @@ img: /initramfs-linux.img
fallback: /initramfs-linux-fallback.img
timeout: 10
# GRUB 2 binary names and boot directory
# Some distributions (e.g. Fedora) use grub2-* (resp. /boot/grub2/) names.
grubInstall: "grub-install"
grubMkconfig: "grub-mkconfig"
grubCfg: "/boot/grub/grub.cfg"

@ -143,8 +143,8 @@ def install_bootloader(boot_loader, fw_type):
create_loader(loader_path)
else:
install_path = boot_loader["installPath"]
check_chroot_call(["grub-install", install_path])
check_chroot_call(["grub-mkconfig", "-o", "/boot/grub/grub.cfg"])
check_chroot_call([libcalamares.job.configuration["grubInstall"], install_path])
check_chroot_call([libcalamares.job.configuration["grubMkconfig"], "-o", libcalamares.job.configuration["grubCfg"]])
def run():

@ -0,0 +1,6 @@
---
# GRUB 2 binary names and boot directory
# Some distributions (e.g. Fedora) use grub2-* (resp. /boot/grub2/) names.
grubInstall: "grub-install"
grubMkconfig: "grub-mkconfig"
grubCfg: "/boot/grub/grub.cfg"

@ -23,8 +23,8 @@ from libcalamares.utils import check_chroot_call
def install_grub(boot_loader):
install_path = boot_loader["installPath"]
check_chroot_call(["grub-install", install_path])
check_chroot_call(["grub-mkconfig", "-o", "/boot/grub/grub.cfg"])
check_chroot_call([libcalamares.job.configuration["grubInstall"], install_path])
check_chroot_call([libcalamares.job.configuration["grubMkconfig"], "-o", libcalamares.job.configuration["grubCfg"]])
def run():

Loading…
Cancel
Save