Changeset 3518


Ignore:
Timestamp:
Feb 22, 2016, 1:36:08 AM (19 months ago)
Author:
bruno
Message:
  • mindi now generates a grub2 compliant conf file (not tested yet)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3517 r3518  
    18191819    elif [ "$type" = "grub" ]; then
    18201820        echo -en "pause Press a key when ready to restore\n"
     1821    elif [ "$type" = "grub2" ]; then
     1822        echo -en "set "
    18211823    else
    18221824        echo -en "prompt 1\ndisplay message.txt\nF1 message.txt\nF2 boot1.txt\nF3 boot2.txt\nF4 pxe.txt\n"
     
    18561858
    18571859    # Handle timeout
     1860    if [ "$type" = "grub" ]; then
     1861        sep='='
     1862    fi
    18581863    if [ "$CDRECOVERY" != "yes" ] ; then
    18591864        echo -en "timeout${sep}${MINDI_BOOT_TIMEOUT}\n"
     
    18821887        elif [ "$type" = "grub" ]; then
    18831888            outstr="title $i\n\tkernel /vmlinuz root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n\tinitrd=/initrd.img\n"
     1889        elif [ "$type" = "grub2" ]; then
     1890            outstr="menuentry '$i' {\n\tinsmod all_video\n\tinsmod gzio\n\tinsmod part_msdos\n\tinsmod part_gpt\n\tinsmod ext2\n\tinsmod xfs\n\techo 'Loading kernel...'\n\tlinux /vmlinuz root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n\techo 'Loading ramdisk...'\n\tinitrd /initrd.img\n}\n"
    18841891        else
    18851892            ps="/"
     
    18981905        elif [ "$type" = "grub" ]; then
    18991906            echo -en "title memtest\n\tkernel /memtest.efi\n\tinitrd=/memtest.img\n"
     1907        elif [ "$type" = "grub2" ]; then
     1908            echo -en "menuentry 'memtest' {\n\tload_video\n\tinsmod gzio\n\tinsmod part_msdos\n\tinsmod xfs\n\tlinux /memtest\n\tinitrd /memtest.img\n}\n"
    19001909        else
    19011910            ps="/"
     
    21792188                bootbin=`find /boot/efi -iname "grub*.efi" | head -1`
    21802189                bootconf="$efidir/grub.conf"
     2190                boottype=grub2
     2191            elif [ $dname = "debian" ] && [ $dver = "8" ]; then
     2192                bootbin=`find /boot/efi -iname "grub*.efi" | head -1`
     2193                bootconf="$efidir/grub.cfg"
    21812194                boottype=grub2
    21822195            else
     
    32383251        mr-read-all-link $2
    32393252        MindiExit $?
     3253    elif [ "$1" = "--makebcf" ] ; then
     3254            [ ! "$2" ] && Die "Please specify the boot mode to check (BIOS,UEFI, EFI)"
     3255        MakeBootConfFile $2
    32403256    elif [ "$1" = "--makemessage" ] ; then
    32413257        MakeMessageFile | cut -c1-80
Note: See TracChangeset for help on using the changeset viewer.