aimee-os/config-grub.sh

18 lines
448 B
Bash
Executable File

#!/bin/sh
# vim: set sw=4 ts=4 sts=4 et :
set -e
. ./config
mkdir -p /mnt/gentoo/boot/grub2
exec > /mnt/gentoo/boot/grub2/grub.cfg
echo 'probe --set fsuuid ($dev)'
kcmdline='ro root=image:rootfs.squashfs root.image.fsuuid=$fsuuid'
for kernel in /mnt/gentoo/boot/vmlinuz-*; do
kver=${kernel#/mnt/gentoo/boot/vmlinuz-}
printf 'menuentry "%s" {\n' "${kver}"
printf ' linux /%s %s\n' "${kernel##*/}" "${kcmdline}"
printf '}\n'
done