Changeset 3535 in MondoRescue for branches/3.2/mindi/mindi


Ignore:
Timestamp:
Mar 21, 2016, 4:54:33 PM (8 years ago)
Author:
Bruno Cornec
Message:
  • Standardize output for keyboard detection with other INFO: msgs
  • Fix the creation of the bootable ISO for UEFI mode (needs kernel and initrd at the root with EFI and images for the boot and restore part) which can be created without making a FS for it BTW.
  • Fix the creation of the grub2 conf file for UEFI mode using linuxefi and initrdefi orders
  • Adds supoprt for kernel later than 3.x up to 9.x
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3534 r3535  
    271271            return
    272272        fi
    273     else
    274         echo -en "`basename $mappath | tr '.' '#' | sed 's/#kmap#gz//' | sed 's/#inc#gz//'` " | tr '#' '.'
    275273    fi
    276274
     
    286284            [ "$sss" = "" ] && sss=`grep -F "$included_item" $MINDI_TMP/keymaps.find`
    287285            for ii in $sss ; do
    288                 [ -e "$ii" ] && AddKeyboardMappingFile $ii
     286                    [ -e "$ii" ] && AddKeyboardMappingFile $ii
    289287            done
    290288        else
     
    500498        return
    501499    fi
    502     LogAll "INFO: Adding the following keyboard mapping tables: "
     500    echo -en "INFO: Adding keyboard mapping tables"
    503501    mkdir -p $bigdir/tmp
    504502    echo "keymap-lives-here $mappath" >> $bigdir/tmp/$MRCFG
     
    14741472MakeISO() {
    14751473
    1476 LogAll "INFO: Invoking $CMD"
     1474LogAll "INFO: Invoking $CMD ."
    14771475(cd "$MINDI_TMP/mpt" ; $CMD .) > /dev/null 2> $MINDI_TMP/mkisofs.log
    14781476if [ $? -ne 0 ] ; then
     
    17851783    cp $part $MINDI_CACHE
    17861784    if [ "$ARCH" = "ia64" ] || [ "$BOOT_TYPE" = "UEFI" ]; then
    1787         # Here we need to remount to put the boot image at the right place now it's available
    1788         mount -t vfat $mount_opt $part $MINDI_TMP/mpt 2>> $LOGFILE
    1789         # We don't need the previous content used to make it, free space
    1790         rm -rf $MINDI_TMP/mpt/{EFI,initrd.img,vmlinuz,images/all.tar.gz}
    1791         # We need the boot image now
    1792         cp $MINDI_CACHE/mindi-bootroot.img $MINDI_TMP/mpt/images
     1785        # We just need the EFI dir and the boot image for this case
     1786        mkdir -p $MINDI_TMP/mpt2 $MINDI_TMP/mpt/images
     1787        mount -o loop $MINDI_CACHE/mindi-bootroot.img $MINDI_TMP/mpt2 2>> $LOGFILE
     1788        # We need again the kernel+initrd at the root for UEFI boot at least
     1789        cp -a $MINDI_TMP/mpt2/EFI $MINDI_TMP/mpt2/vmlinuz $MINDI_TMP/mpt2/initrd.img $MINDI_TMP/mpt
     1790        # We need the boot image now and what mindi needs at restore time as well
     1791        cp -a $MINDI_TMP/mpt2/images/all.tar.gz $MINDI_CACHE/mindi-bootroot.img $MINDI_TMP/mpt/images
     1792        umount $MINDI_TMP/mpt2
     1793        LogFile "----------- target dir content -----------"
     1794        LogFile "------------------------------------------"
     1795        ls -lR $MINDI_TMP/mpt >> $LOGFILE
     1796        LogFile "------------------------------------------"
    17931797        MakeISO
    1794         umount $MINDI_TMP/mpt || Die "Unable to unmount $MINDI_TMP/mpt"
    17951798    fi
    17961799else
     
    19461949        echo -en "set "
    19471950    else
     1951        # syslinux family
    19481952        echo -en "prompt 1\ndisplay message.txt\nF1 message.txt\nF2 boot1.txt\nF3 boot2.txt\nF4 pxe.txt\n"
    19491953    fi
     
    20122016            outstr="title $i\n\tkernel /vmlinuz root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n\tinitrd=/initrd.img\n"
    20132017        elif [ "$type" = "grub2" ]; then
    2014             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"
     2018            if [ "$BOOT_TYPE" = "UEFI" ]; then
     2019                lorder="linuxefi"
     2020                iorder="initrdefi"
     2021            else
     2022                lorder="linux"
     2023                iorder="initrd"
     2024            fi
     2025            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\t$lorder /vmlinuz root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n\techo 'Loading ramdisk...'\n\t$iorder /initrd.img\n}\n"
    20152026        else
    20162027            ps="/"
     
    24262437    done
    24272438    if [ ! "$possible_kernels" ] && uname -a | grep Knoppix > /dev/null ; then
    2428         possible_kernels=`find /boot/vmlinuz-[23].* | tail -n1`
     2439        possible_kernels=`find /boot/vmlinuz-[2-9].* | tail -n1`
    24292440    fi
    24302441    if [ ! "$possible_kernels" ] ; then
Note: See TracChangeset for help on using the changeset viewer.