diff --git a/kerninst b/kerninst index a8a07290b9d3f1b123831c05207e9147871fcccc..6e0e692e3b2d182eb1ce1b1fa0c34dedb7740241 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 caddeb4d1ba585b814d8bd6137eb70ab17a22a4d..5fcd4def0c6e26d056f5d266d5b15649a6b19255 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"