diff options
Diffstat (limited to 'disk/gummiboot/mkgummi')
-rwxr-xr-x | disk/gummiboot/mkgummi | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/disk/gummiboot/mkgummi b/disk/gummiboot/mkgummi new file mode 100755 index 0000000000..d32201e54c --- /dev/null +++ b/disk/gummiboot/mkgummi @@ -0,0 +1,33 @@ +#!/bin/bash +root_dev() +{ + ROOT_DEV=$( mount | grep ' / ' | awk ' $1 ~ /\/dev\/*/ {print $1}') + ROOT_PART=$(blkid |grep ${ROOT_DEV}: |cut -d\ -f6) +} +# find the root partition +root_dev +echo root = $ROOT_DEV +echo root partition = $ROOT_PART + +modprobe efivarfs && +mount -t efivarfs efivarfs /sys/firmware/efi/efivars && +gummiboot install && +cd /boot && +DEST=/boot/loader/entries && + +# delete existing smgl confif files +mkdir -p $DEST && +rm -f $DEST/smgl* && + +# create the smgl config files for gummiboot +for VX in `ls vmlinuz-* | cut -d- -f2`;do + echo creating efi config for $VX && + cat > $DEST/smgl-$VX.conf << EOF +title SourceMage GNU/Linux +version $VX +linux /vmlinuz-$VX +#options ro root=/dev/$ROOT_DEV +options ro root=$ROOT_PART +EOF +done && +umount /sys/firmware/efi/efivars |