From 909361ab2f19bc1392ae9e7100e1e0945cd3c298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= Date: Sat, 26 Oct 2013 12:20:19 -0500 Subject: [PATCH] boot-manager: Now that GRUB2 is stable in Gentoo, it makes no sense to keep supporting GRUB. --- kerninst | 40 ++-------------------------------------- kerninst.conf | 24 +----------------------- 2 files changed, 3 insertions(+), 61 deletions(-) diff --git a/kerninst b/kerninst index a8a0729..6e0e692 100644 --- a/kerninst +++ b/kerninst @@ -93,45 +93,9 @@ function update_grub2() { /usr/sbin/grub2-mkconfig -o "${GRUB2_CONFIG_FILE}" &>> "${LOGFILE}" || die } -function update_grub() { - einfo "Generating /boot/grub/grub.conf..." - KERNELS=$(find /boot -name "vmlinuz*" | sort -r -V) - - echo "${GRUB_HEADER}" > /boot/grub/grub.conf || die - - for KERNEL in ${KERNELS}; do - KV=$(echo ${KERNEL} | sed "s@/boot/vmlinuz-@@g") - - cat << EOF >> /boot/grub/grub.conf || die - -title ${GRUB_KERNEL_TITLE} (kernel ${KV}) -root ${GRUB_ROOT_PARTITION} -kernel ${KERNEL} root=${ROOT_PARTITION} init=${INIT} ${INIT_OPTIONS} -EOF - - einfo "Added ${KERNEL} kernel." - - if [ -f "/boot/initrd-${KV}" ]; then - echo "initrd /boot/initrd-${KV}" >> /boot/grub/grub.conf || die - einfo "Added /boot/initrd-${KV} initramfs." - fi - done - - /bin/chmod 600 /boot/grub/grub.conf -} - function update_bootmanager() { - einfo "Updating ${BOOTMANAGER}..." - case "${BOOTMANAGER}" in - GRUB) - update_grub - ;; - GRUB2) - update_grub2 - ;; - *) - ewarn "Invalid bootmanager ${BOOTMANAGER}." - esac + einfo "Updating GRUB2..." + update_grub2 } EXEC_NAME=$(/usr/bin/basename "$0") diff --git a/kerninst.conf b/kerninst.conf index caddeb4..5fcd4de 100644 --- a/kerninst.conf +++ b/kerninst.conf @@ -1,30 +1,8 @@ # The file with the kernel configuration. This file should be in /etc. KERNEL_CONFIG="/etc/kerninst/kernel-config" -# Init to use -INIT="/usr/lib/systemd/systemd" - -# Init options -INIT_OPTIONS="quiet" - -# Bootmanager (one of GRUB or GRUB2) -BOOTMANAGER="GRUB2" - -# The root of GRUB -GRUB_ROOT_PARTITION="(hd0,0)" - -# The root partition in the GRUB kernel command line -ROOT_PARTITION="/dev/sda1" - -# The header of the GRUB configuration file -GRUB_HEADER="default 0 -timeout 5" - -# Title for the kernels in GRUB -GRUB_KERNEL_TITLE="Gentoo Linux" - # GRUB2 configuration file -GRUB2_CONFIG_FILE="/boot/grub2/grub.cfg" +GRUB2_CONFIG_FILE="/boot/grub/grub.cfg" # Wether to include firmware files INCLUDE_FIRMWARE="no" -- GitLab