From eb65aaf43b927d8bbb10ea1477b0cf660e949a5f Mon Sep 17 00:00:00 2001 From: stheno Date: Fri, 9 Jun 2017 11:56:35 -0700 Subject: [PATCH 01/38] Added build directory Added ability to have differentiation between different desktop arch and versions allowing multiples on one iso. --- .gitignore | 1 + multicd.sh | 17 +++-- plugins/ubuntu.sh | 178 ++++++++++++++++++++++++++++++---------------- 3 files changed, 126 insertions(+), 70 deletions(-) diff --git a/.gitignore b/.gitignore index ac8df97..2fab448 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.iso *.tar.gz **/backup/** +**/build/** memtest memtestver diff --git a/multicd.sh b/multicd.sh index 2bc23d8..5f52892 100755 --- a/multicd.sh +++ b/multicd.sh @@ -9,7 +9,7 @@ export MCDDIR=$(cd "$(dirname "$0")" && pwd) PATH=$PATH:$MCDDIR:$MCDDIR/plugins . functions.sh -MCDVERSION="20170427" +MCDVERSION="20170609" #multicd.sh April 27, 2017 #Copyright (c) 2017 Isaac Schemm # @@ -661,7 +661,10 @@ if [ ! -f "${TAGS}"/win9x ];then EXTRAARGS="$EXTRAARGS -iso-level 4" #To ensure that Windows 9x installation CDs boot properly fi echo "Building CD image..." -$GENERATOR -o ""${OUTPUT}"" \ +if [ ! -d "build" ];then + mkdir build +fi +$GENERATOR -o "./build/"${OUTPUT}"" \ -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -r -J $EXTRAARGS \ @@ -687,12 +690,12 @@ ISOHYBRID="${TAGS}/isohybrid" } if [ -f "${TAGS}/isohybrid" ];then echo "Running isohybrid..." - "${TAGS}/isohybrid" ""${OUTPUT}"" 2> /dev/null || echo "isohybrid gave an error status of $?. The ISO might not work on a flash drive." + "${TAGS}/isohybrid" "./build/"${OUTPUT}"" 2> /dev/null || echo "isohybrid gave an error status of $?. The ISO might not work on a flash drive." rm "${TAGS}"/isohybrid fi if [ $(whoami) == "root" ];then - chmod 666 ""${OUTPUT}"" + chmod -R 666 "./build" fi rm -r "${TAGS}" "${MNT}" @@ -709,11 +712,11 @@ if $TESTISO;then RAM_TO_USE=128 fi if which qemu-system-x86_64 &> /dev/null;then - qemu-system-x86_64 -m $RAM_TO_USE -cdrom ""${OUTPUT}""& + qemu-system-x86_64 -m $RAM_TO_USE -cdrom "./build/"${OUTPUT}""& elif which qemu &> /dev/null;then - qemu -m $RAM_TO_USE -cdrom ""${OUTPUT}""& + qemu -m $RAM_TO_USE -cdrom "./build/"${OUTPUT}""& else - echo "Cannot test "${OUTPUT}" in a VM. Please install qemu or qemu-system-x86_64." + echo "Cannot test ./build/"${OUTPUT}" in a VM. Please install qemu or qemu-system-x86_64." fi fi diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index e15d5d6..8c677fc 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -2,7 +2,7 @@ set -e . "${MCDDIR}"/functions.sh #Ubuntu plugin for multicd.sh -#version 20121113 +#version 20170609 #Copyright (c) 2012 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -54,16 +54,39 @@ getUbuntuName () { #END FUNCTIONS# if [ $1 = links ];then - echo "ubuntu-*-desktop-i386.iso i386.ubuntu.iso Ubuntu_(32-bit)_*" - echo "ubuntu-*-desktop-amd64.iso amd64.ubuntu.iso Ubuntu_(64-bit)_*" - echo "kubuntu-*-desktop-i386.iso i386.k.ubuntu.iso Kubuntu_(32-bit)_*" - echo "kubuntu-*-desktop-amd64.iso amd64.k.ubuntu.iso Kubuntu_(64-bit)_*" - echo "xubuntu-*-desktop-i386.iso i386.x.ubuntu.iso Xubuntu_(32-bit)_*" - echo "xubuntu-*-desktop-amd64.iso amd64.x.ubuntu.iso Xubuntu_(64-bit)_*" - echo "edubuntu-*-dvd-i386.iso i386.x.ubuntu.iso Edubuntu_(32-bit)_*" - echo "edubuntu-*-dvd-amd64.iso amd64.x.ubuntu.iso Edubuntu_(64-bit)_*" - echo "lubuntu-*-desktop-i386.iso i386.l.ubuntu.iso Lubuntu_(32-bit)_*" - echo "lubuntu-*-desktop-amd64.iso amd64.l.ubuntu.iso Lubuntu_(64-bit)_*" + for i in *ubuntu*.iso; do + # stheno - This processes the iso name into usable chunks for other purposes. + # This is key in the start for allowing multiple Ubuntu desktop flavors. + BASENAME=$(echo $i|sed -e 's/\.iso//g') + TYPETEMP=`echo $BASENAME | sed 's/ubuntu.*//g'` + VERSIONPRE=`echo $BASENAME | sed 's/.*ubuntu-//g'` + VERSIONPOST=`echo $VERSIONPRE | sed 's/-.*//g'` + ARCHPRE=`echo $BASENAME | sed "s/.*ubuntu-"${VERSIONPOST}"-//g"` + ARCHPOST=`echo $ARCHPRE | sed 's/.*-//g'` + PLATPRE=`echo $BASENAME | sed "s/.*ubuntu-"${VERSIONPOST}"-//g"` + PLATPOST=`echo $PLATPRE | sed 's/-.*//g'` + if [ "${TYPETEMP}" ];then + TYPE="${TYPETEMP}." + TYPELABEL=$(echo $TYPETEMP | sed 's/./\U&/')u + else + TYPE="" + TYPELABEL="U" + fi + if [ "${ARCHPOST}" = "i386" ];then + ARCHLABEL="(32-bit)" + elif [ "${ARCHPOST}" = "amd64" ];then + ARCHLABEL="(64-bit)" + else + ARCHLABEL="" + fi + # stheno - writes temp file to parse new menu title. + echo "${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}".ubuntu.title + # stheno - This covers ALL links available on discovered files. + # No need to write entries that do not exist and be bound to only them. + # This facilitates multiple iso files of similar flavor but different versions or arch. + echo "${TYPETEMP}ubuntu-${VERSIONPOST}-${PLATPOST}-${ARCHPOST}.iso ${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.iso ${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" + done + elif [ $1 = scan ];then if $(ubuntuExists);then for i in *.ubuntu.iso; do @@ -77,62 +100,91 @@ elif [ $1 = copy ];then echo "Copying $(getUbuntuName)..." BASENAME=$(echo $i|sed -e 's/\.iso//g') if [ ! -z "$BASENAME" ] && [ -f $BASENAME.iso ];then - mcdmount $BASENAME - mkdir -p "${WORK}"/boot/$BASENAME - if [ -d "${MNT}"/$BASENAME/casper ];then - mcdcp -R "${MNT}"/$BASENAME/casper/* "${WORK}"/boot/$BASENAME/ #Live system - #elif [ -d "${MNT}/$BASENAME/live" ];then - # mcdcp -R "${MNT}"/$BASENAME/live/* "${WORK}"/boot/$BASENAME/ #Debian live (for Linux Mint Debian) - else - echo "Could not find a \"casper\" folder in "${MNT}"/$BASENAME." - return 1 - fi - if [ -d "${MNT}"/$BASENAME/preseed ];then - cp -R "${MNT}"/$BASENAME/preseed "${WORK}"/boot/$BASENAME - fi - # Fix the isolinux.cfg - if [ -f "${MNT}"/$BASENAME/isolinux/text.cfg ];then - UBUCFG=text.cfg - elif [ -f "${MNT}"/$BASENAME/isolinux/txt.cfg ];then - UBUCFG=txt.cfg - else - UBUCFG=isolinux.cfg #For custom-made live CDs like Weaknet and Zorin - fi - cp "${MNT}"/$BASENAME/isolinux/splash.* \ - "${MNT}"/$BASENAME/isolinux/bg_redo.png \ - "${WORK}"/boot/$BASENAME/ 2> /dev/null || true #Splash screen - only if the filename is splash.something or bg_redo.png - cp "${MNT}"/$BASENAME/isolinux/$UBUCFG "${WORK}"/boot/$BASENAME/$BASENAME.cfg - echo "label back - menu label Back to main menu - com32 menu.c32 - append /boot/isolinux/isolinux.cfg - " >> "${WORK}"/boot/$BASENAME/$BASENAME.cfg - sed -i "s@menu background @menu background /boot/$BASENAME/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #If it uses a splash screen, update the .cfg to show the new location - sed -i "s@MENU BACKGROUND @MENU BACKGROUND /boot/$BASENAME/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #uppercase - sed -i "s@default live@default menu.c32@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Show menu instead of boot: prompt - sed -i "s@file=/cdrom/preseed/@file=/cdrom/boot/$BASENAME/preseed/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Preseed folder moved - not sure if ubiquity uses this + # stheno - Look for what types of Ubuntu installer iso we have. + # Then build accordingly, final stage in allowing multiple flavors. + case "$BASENAME" in + *desktop*) + mcdmount $BASENAME + mkdir -p "${WORK}"/boot/$BASENAME + if [ -d "${MNT}"/$BASENAME/casper ];then + mcdcp -R "${MNT}"/$BASENAME/casper/* "${WORK}"/boot/$BASENAME/ #Live system + #elif [ -d "${MNT}/$BASENAME/live" ];then + # mcdcp -R "${MNT}"/$BASENAME/live/* "${WORK}"/boot/$BASENAME/ #Debian live (for Linux Mint Debian) + else + echo "Could not find a \"casper\" folder in "${MNT}"/$BASENAME." + return 1 + fi + if [ -d "${MNT}"/$BASENAME/preseed ];then + cp -R "${MNT}"/$BASENAME/preseed "${WORK}"/boot/$BASENAME + fi + # Fix the isolinux.cfg + if [ -f "${MNT}"/$BASENAME/isolinux/text.cfg ];then + UBUCFG=text.cfg + elif [ -f "${MNT}"/$BASENAME/isolinux/txt.cfg ];then + UBUCFG=txt.cfg + else + UBUCFG=isolinux.cfg #For custom-made live CDs like Weaknet and Zorin + fi + cp "${MNT}"/$BASENAME/isolinux/splash.* \ + "${MNT}"/$BASENAME/isolinux/bg_redo.png \ + "${WORK}"/boot/$BASENAME/ 2> /dev/null || true #Splash screen - only if the filename is splash.something or bg_redo.png + cp "${MNT}"/$BASENAME/isolinux/$UBUCFG "${WORK}"/boot/$BASENAME/$BASENAME.cfg + + MENUTITLETEMP=`cat $BASENAME.title` + rm $BASENAME.title + MENUTITLE=$(echo "$MENUTITLETEMP" | sed 's/_/ /g') + + CFGFILE=`cat "${WORK}""/boot/$BASENAME/$BASENAME".cfg` - #Remove reference to previous live media path - sed -i "s^live-media-path=[^ ]*^^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg + EDITS=$(echo "$CFGFILE" | \ + sed '/default live/a menu title '"$MENUTITLE" | \ + sed 's/default live/default menu.c32/g' | \ + sed 's/\/casper\//\/boot\/'"$BASENAME"'\//g' | \ + sed 's/\/cdrom\//\/boot\/'"$BASENAME"'\//g' | \ + sed 's/casper initrd/casper live-media-path=\/boot\/'"$BASENAME"' ignore_uuid initrd/g' | \ + sed 's/ubiquity initrd/ubiquity live-media-path=\/boot\/'"$BASENAME"' ignore_uuid initrd/g' | \ + sed 's/check initrd/check live-media-path=\/boot\/'"$BASENAME"' ignore_uuid initrd/g' | \ + sed 's/\/install\//\/boot\/'"$BASENAME"'\//g' | \ + sed '$ a label back' | \ + sed '$ a menu label Back to main menu' | \ + sed '$ a \\tcom32 menu.c32' | \ + sed 's/menu title/\\tmenu title/g' | \ + sed 's/menu label/\\tmenu label/g' | \ + sed 's/kernel /\\tkernel /g' | \ + sed 's/KERNEL /\\tKERNEL /g' | \ + sed 's/localboot/\\tlocalboot/g' | \ + sed 's/append /\\tappend /g' | \ + sed '$ a \\tappend /boot/isolinux/isolinux.cfg' + ) + echo "$EDITS" > "${WORK}"/boot/$BASENAME/$BASENAME.cfg + + # stheno - I left the in but commented, not sure if there are use cases still? + #sed -i "s@menu background @menu background /boot/$BASENAME/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #If it uses a splash screen, update the .cfg to show the new location + #sed -i "s@MENU BACKGROUND @MENU BACKGROUND /boot/$BASENAME/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #uppercase + + ##Remove reference to previous live media path + #sed -i "s^live-media-path=[^ ]*^^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - sed -i "s^initrd=/casper/^live-media-path=/boot/$BASENAME ignore_uuid initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Initrd moved, ignore_uuid added - sed -i "s^kernel /casper/^kernel /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Kernel moved - sed -i "s^KERNEL /casper/^KERNEL /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #For uppercase KERNEL + ##Equivalents for Mint Debian + ##sed -i "s^initrd=/live/^live-media-path=/boot/$BASENAME ignore_uuid initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg + ##sed -i "s^kernel /live/^kernel /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg + ##sed -i "s^KERNEL /live/^KERNEL /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - #Equivalents for Mint Debian - #sed -i "s^initrd=/live/^live-media-path=/boot/$BASENAME ignore_uuid initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - #sed -i "s^kernel /live/^kernel /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - #sed -i "s^KERNEL /live/^KERNEL /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg + if [ -f "${TAGS}"/lang ];then + echo added lang + sed -i "s^initrd=/boot/$BASENAME/^debian-installer/language=$(cat "${TAGS}"/lang) initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Add language codes to cmdline + fi + if [ -f "${TAGS}"/country ];then + echo added country + sed -i "s^initrd=/boot/$BASENAME/^console-setup/layoutcode?=$(cat "${TAGS}"/country) initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Add language codes to cmdline + fi + + umcdmount $BASENAME + ;; - if [ -f "${TAGS}"/lang ];then - echo added lang - sed -i "s^initrd=/boot/$BASENAME/^debian-installer/language=$(cat "${TAGS}"/lang) initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Add language codes to cmdline - fi - if [ -f "${TAGS}"/country ];then - echo added country - sed -i "s^initrd=/boot/$BASENAME/^console-setup/layoutcode?=$(cat "${TAGS}"/country) initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #Add language codes to cmdline - fi - umcdmount $BASENAME + *server*) + ;; + esac else echo "$0: \"$BASENAME\" is empty or not an ISO" exit 1 From acef37b0150aaedb845d71890f4b12d5c1511bcc Mon Sep 17 00:00:00 2001 From: stheno Date: Fri, 9 Jun 2017 15:14:09 -0700 Subject: [PATCH 02/38] Fix to last PR Fixes server showing up twice in main menu. --- plugins/ubuntu.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index 8c677fc..703ac26 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -80,11 +80,20 @@ if [ $1 = links ];then ARCHLABEL="" fi # stheno - writes temp file to parse new menu title. - echo "${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}".ubuntu.title - # stheno - This covers ALL links available on discovered files. - # No need to write entries that do not exist and be bound to only them. - # This facilitates multiple iso files of similar flavor but different versions or arch. - echo "${TYPETEMP}ubuntu-${VERSIONPOST}-${PLATPOST}-${ARCHPOST}.iso ${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.iso ${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" + case "$BASENAME" in + *desktop*) + if [ ! "${PLATPOST}" = "server" ];then + echo "${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}".ubuntu.title + # stheno - This covers ALL links available on discovered files. + # No need to write entries that do not exist and be bound to only them. + # This facilitates multiple iso files of similar flavor but different versions or arch. + echo "${TYPETEMP}ubuntu-${VERSIONPOST}-${PLATPOST}-${ARCHPOST}.iso ${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.iso ${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" + fi + ;; + + *server*) + ;; + esac done elif [ $1 = scan ];then @@ -131,7 +140,6 @@ elif [ $1 = copy ];then cp "${MNT}"/$BASENAME/isolinux/$UBUCFG "${WORK}"/boot/$BASENAME/$BASENAME.cfg MENUTITLETEMP=`cat $BASENAME.title` - rm $BASENAME.title MENUTITLE=$(echo "$MENUTITLETEMP" | sed 's/_/ /g') CFGFILE=`cat "${WORK}""/boot/$BASENAME/$BASENAME".cfg` @@ -189,6 +197,7 @@ elif [ $1 = copy ];then echo "$0: \"$BASENAME\" is empty or not an ISO" exit 1 fi + rm *.title done fi elif [ $1 = writecfg ];then From feee1506683641c66ebe0427f6e1ebc2483d063f Mon Sep 17 00:00:00 2001 From: stheno Date: Sat, 10 Jun 2017 12:27:08 -0700 Subject: [PATCH 03/38] Changed tabs to spaces for cygwin compat and adjusted text file accordingly to fit the change. --- plugins/ubuntu.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index 703ac26..ddf976f 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -155,14 +155,17 @@ elif [ $1 = copy ];then sed 's/\/install\//\/boot\/'"$BASENAME"'\//g' | \ sed '$ a label back' | \ sed '$ a menu label Back to main menu' | \ - sed '$ a \\tcom32 menu.c32' | \ - sed 's/menu title/\\tmenu title/g' | \ - sed 's/menu label/\\tmenu label/g' | \ - sed 's/kernel /\\tkernel /g' | \ - sed 's/KERNEL /\\tKERNEL /g' | \ - sed 's/localboot/\\tlocalboot/g' | \ - sed 's/append /\\tappend /g' | \ - sed '$ a \\tappend /boot/isolinux/isolinux.cfg' + sed '$ a com32 menu.c32' | \ + sed 's/menu title/ menu title/g' | \ + sed 's/menu label/ menu label/g' | \ + sed 's/kernel / kernel /g' | \ + sed 's/KERNEL / KERNEL /g' | \ + sed 's/localboot/ localboot/g' | \ + sed 's/append / append /g' | \ + sed '$ a append /boot/isolinux/isolinux.cfg' | \ + sed 's/append \/boot/ append \/boot/g' | \ + sed 's/menu label Back/ menu label Back/g' | \ + sed 's/com32 menu.c32/ com32 menu.c32/g' ) echo "$EDITS" > "${WORK}"/boot/$BASENAME/$BASENAME.cfg From e4e6fa2cf16d495e2171812da93ffef30e538911 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 10 Jun 2017 19:52:24 -0500 Subject: [PATCH 04/38] Mark casper.sh plugin as executable --- plugins/casper.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 plugins/casper.sh diff --git a/plugins/casper.sh b/plugins/casper.sh old mode 100644 new mode 100755 From 970c239ea7a203035b8dc59636419121cc887af4 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 10 Jun 2017 20:33:00 -0500 Subject: [PATCH 05/38] Ubuntu title detection fixes --- plugins/ubuntu.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index ddf976f..d717957 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -3,7 +3,7 @@ set -e . "${MCDDIR}"/functions.sh #Ubuntu plugin for multicd.sh #version 20170609 -#Copyright (c) 2012 Isaac Schemm +#Copyright (c) 2012-2017 Isaac Schemm et al # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -83,7 +83,7 @@ if [ $1 = links ];then case "$BASENAME" in *desktop*) if [ ! "${PLATPOST}" = "server" ];then - echo "${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}".ubuntu.title + echo "${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.title" # stheno - This covers ALL links available on discovered files. # No need to write entries that do not exist and be bound to only them. # This facilitates multiple iso files of similar flavor but different versions or arch. @@ -168,18 +168,6 @@ elif [ $1 = copy ];then sed 's/com32 menu.c32/ com32 menu.c32/g' ) echo "$EDITS" > "${WORK}"/boot/$BASENAME/$BASENAME.cfg - - # stheno - I left the in but commented, not sure if there are use cases still? - #sed -i "s@menu background @menu background /boot/$BASENAME/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #If it uses a splash screen, update the .cfg to show the new location - #sed -i "s@MENU BACKGROUND @MENU BACKGROUND /boot/$BASENAME/@g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg #uppercase - - ##Remove reference to previous live media path - #sed -i "s^live-media-path=[^ ]*^^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - - ##Equivalents for Mint Debian - ##sed -i "s^initrd=/live/^live-media-path=/boot/$BASENAME ignore_uuid initrd=/boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - ##sed -i "s^kernel /live/^kernel /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg - ##sed -i "s^KERNEL /live/^KERNEL /boot/$BASENAME/^g" "${WORK}"/boot/$BASENAME/$BASENAME.cfg if [ -f "${TAGS}"/lang ];then echo added lang @@ -200,7 +188,7 @@ elif [ $1 = copy ];then echo "$0: \"$BASENAME\" is empty or not an ISO" exit 1 fi - rm *.title + rm $BASENAME.title done fi elif [ $1 = writecfg ];then From b14c9e06b6c3ee991440ddc5d676b1de032fe297 Mon Sep 17 00:00:00 2001 From: stheno Date: Sat, 10 Jun 2017 23:28:50 -0700 Subject: [PATCH 06/38] Implemented ISO downloader Only the Ubuntu is populated but the template and comments are there for any others to be added. --- downloader.sh | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++ multicd.sh | 5 + 2 files changed, 271 insertions(+) create mode 100644 downloader.sh diff --git a/downloader.sh b/downloader.sh new file mode 100644 index 0000000..febff4b --- /dev/null +++ b/downloader.sh @@ -0,0 +1,266 @@ +#!/bin/bash +getISO() { + #echo $1 #Distro name + #echo $2 #Choice Label + #echo $3 #File + #echo $4 #URL + clear + echo "Downloading $2..." + if ! wget -t 1 -O "${3}" "${4}";then + echo "Error: could not download $4. Please update the URL in downloader.sh." + exit 1 + downloadisos + fi + + case $1 in + "Ubuntu") select_ubuntu $1 "$2" ;; + *) downloadisos ;; + esac +} +failed() { + error="No $1 entries yet."; +} +### Important: +### This is the blank entry template for distros +### we support but don't have or can't provide links for. +# select_distronamehere() { +# failed "$1" +# return=$error +# downloadisos "$return" +# } +select_debian() { + failed "$1" + return=$error + downloadisos "$return" +} +select_fedora() { + failed "$1" + return=$error + downloadisos "$return" +} +select_ubuntu() { + failed "$1" + return=$error + + HEIGHT=50 + WIDTH=70 + TITLE="ISO Selections" + MENU="Choose an ISO: " + if [ ! "$2" = "" ];then + MENU="Last Downloaded ISO: $2" + fi + + ISOS=('12.04.5 Alternate 32bit' \ + '12.04.5 Alternate 64bit' \ + '12.04.5 Desktop 32bit' \ + '12.04.5 Desktop 64bit' \ + '12.04.5 Server 32bit' \ + '12.04.5 Server 64bit' \ + '14.04.5 Desktop 32bit' \ + '14.04.5 Desktop 64bit' \ + '14.04.5 Server 32bit' \ + '14.04.5 Server 64bit' \ + '16.04.2 Desktop 32bit' \ + '16.04.2 Desktop 64bit' \ + '16.04.2 Server 32bit' \ + '16.04.2 Server 64bit' \ + '16.10 Desktop 32bit' \ + '16.10 Desktop 64bit' \ + '16.10 Server 32bit' \ + '16.10 Server 64bit' \ + '17.04 Desktop 32bit' \ + '17.04 Desktop 64bit' \ + '17.04 Server 32bit' \ + '17.04 Server 64bit' + ); + + COUNT=0 + OPTIONS=() + for i in "${ISOS[@]}"; do + OPTIONS+=($COUNT "$i") + COUNT=$[COUNT+1] + done + OPTIONS+=($COUNT "Distro Menu") + COUNT=$[COUNT+1] + OPTIONS+=($COUNT "Exit") + CHOICE_HEIGHT=$[COUNT+3] + + CHOICE=$(dialog \ + --no-lines \ + --title "$TITLE" \ + --menu "$MENU" \ + $HEIGHT $WIDTH $CHOICE_HEIGHT \ + "${OPTIONS[@]}" \ + 2>&1 >/dev/tty + ) + + if [ $CHOICE = $[COUNT-1] ];then + downloadisos "Returned from $1" + fi + if [ $CHOICE = $COUNT ];then + echo "Leaving Distro Downloader from $1 menu." + exit 1 + fi + + COMMON="http://releases.ubuntu.com/" + FILE="" + URL="" + + case $CHOICE in + 0) + FILE="ubuntu-12.04.5-alternate-i386.iso" + URL="${COMMON}12.04/${FILE}" + ;; + 1) + FILE="ubuntu-12.04.5-alternate-amd64.iso" + URL="${COMMON}12.04/${FILE}" + ;; + 2) + FILE="ubuntu-12.04.5-desktop-i386.iso" + URL="${COMMON}12.04/${FILE}" + ;; + 3) + FILE="ubuntu-12.04.5-desktop-amd64.iso" + URL="${COMMON}12.04/${FILE}" + ;; + 4) + FILE="ubuntu-12.04.5-server-i386.iso" + URL="${COMMON}12.04/${FILE}" + ;; + 5) + FILE="ubuntu-12.04.5-server-amd64.iso" + URL="${COMMON}12.04/${FILE}" + ;; + + 6) + FILE="ubuntu-14.04.5-desktop-i386.iso" + URL="${COMMON}14.04/${FILE}" + ;; + 7) + FILE="ubuntu-14.04.5-desktop-amd64.iso" + URL="${COMMON}14.04/${FILE}" + ;; + 8) + FILE="ubuntu-14.04.5-server-i386.iso" + URL="${COMMON}14.04/${FILE}" + ;; + 9) + FILE="ubuntu-14.04.5-server-amd64.iso" + URL="${COMMON}14.04/${FILE}" + ;; + + 10) + FILE="ubuntu-16.04.2-desktop-i386.iso" + URL="${COMMON}16.04/${FILE}" + ;; + 11) + FILE="ubuntu-16.04.2-desktop-amd64.iso" + URL="${COMMON}16.04/${FILE}" + ;; + 12) + FILE="ubuntu-16.04.2-server-i386.iso" + URL="${COMMON}16.04/${FILE}" + ;; + 13) + FILE="ubuntu-16.04.2-server-amd64.iso" + URL="${COMMON}16.04/${FILE}" + ;; + + 14) + FILE="ubuntu-16.10-desktop-i386.iso" + URL="${COMMON}16.10/${FILE}" + ;; + 15) + FILE="ubuntu-16.10-desktop-amd64.iso" + URL="${COMMON}16.10/${FILE}" + ;; + 16) + FILE="ubuntu-16.10-server-i386.iso" + URL="${COMMON}16.10/${FILE}" + ;; + 17) + FILE="ubuntu-16.10-server-amd64.iso" + URL="${COMMON}16.10/${FILE}" + ;; + + 18) + FILE="ubuntu-17.04-desktop-i386.iso" + URL="${COMMON}17.04/${FILE}" + ;; + 19) + FILE="ubuntu-17.04-desktop-amd64.iso" + URL="${COMMON}17.04/${FILE}" + ;; + 20) + FILE="ubuntu-17.04-server-i386.iso" + URL="${COMMON}17.04/${FILE}" + ;; + 21) + FILE="ubuntu-17.04-server-amd64.iso" + URL="${COMMON}17.04/${FILE}" + ;; + esac + + getISO $1 "${ISOS[$CHOICE]}" "$FILE" "$URL" + + ### If menu fails, drop to main menu. + downloadisos "$return" +} +distrochoice() { + ### return is the default for any entry not populated with a function. + ### Please use similar templates to existing. + ### (select_ then distro name only in lower case.) + ### Then add Just the name in downloadisos() in the DISTROS array. + ### Keep the array name a singular word for simplicity. + ### Can split revisions out further down. + + return="No $1 entries yet or invalid selection." + case $1 in + "Debian") select_debian $1 ;; + "Fedora") select_fedora $1 ;; + "Ubuntu") select_ubuntu $1 ;; + esac + downloadisos "$return" +} +### Main function. Entry point for this file. +downloadisos() { + if ! which dialog &> /dev/null;then + echo "You must install dialog to use the interactive options." + exit 1 + fi + + HEIGHT=50 + WIDTH=70 + TITLE="Distro Selections" + MENU="Choose a Distro: "$1 + + ### Add distro name here. Singular word for simplicity. + DISTROS=('Debian' 'Fedora' 'Ubuntu'); + + COUNT=0 + OPTIONS=() + for i in "${DISTROS[@]}"; do + OPTIONS+=($COUNT "$i") + COUNT=$[COUNT+1] + done + OPTIONS+=($COUNT "Exit") + CHOICE_HEIGHT=$[COUNT+3] + + CHOICE=$(dialog \ + --no-lines \ + --title "$TITLE" \ + --menu "$MENU" \ + $HEIGHT $WIDTH $CHOICE_HEIGHT \ + "${OPTIONS[@]}" \ + 2>&1 >/dev/tty + ) + + if [ $CHOICE = $COUNT ];then + echo "Leaving Distro Downloader from main menu." + exit 1 + fi + distrochoice ${DISTROS[$CHOICE]} + + ## Clean exit on menu fail. + exit 1 +} diff --git a/multicd.sh b/multicd.sh index 6d6726f..2de475a 100755 --- a/multicd.sh +++ b/multicd.sh @@ -8,6 +8,7 @@ trap exit ERR export MCDDIR=$(cd "$(dirname "$0")" && pwd) PATH=$PATH:$MCDDIR:$MCDDIR/plugins . functions.sh +. downloader.sh MCDVERSION="20170609" #multicd.sh June 9, 2017 @@ -101,6 +102,10 @@ if [ "$1" = "give-error" ];then exit 1 fi +if [ "$1" = "download" ];then + downloadisos +fi + #if getopt -T > /dev/null;then # echo "You have a non-GNU getopt. Don't use an output path with spaces in it." ARGS=$(getopt cdmviVo:tw $*) From 575ee34fb490bbc20e9fe5c8650921b65a30398e Mon Sep 17 00:00:00 2001 From: stheno Date: Sat, 10 Jun 2017 23:40:14 -0700 Subject: [PATCH 07/38] commented the loopback on error with an explanation of choice to leave it in but commented. --- downloader.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/downloader.sh b/downloader.sh index febff4b..3a94f99 100644 --- a/downloader.sh +++ b/downloader.sh @@ -8,8 +8,9 @@ getISO() { echo "Downloading $2..." if ! wget -t 1 -O "${3}" "${4}";then echo "Error: could not download $4. Please update the URL in downloader.sh." + ### Left in the loop to main menu commented incase one wants to just loop back on error. exit 1 - downloadisos + #downloadisos fi case $1 in From bb9a92c1126e54d612d9135d6d0bb2b08fe85e52 Mon Sep 17 00:00:00 2001 From: stheno Date: Sun, 11 Jun 2017 17:44:59 -0700 Subject: [PATCH 08/38] Fixed reported bug. As well as fixed others that were similar. Added a "cancel" handler function for both menu types. --- downloader.sh | 76 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/downloader.sh b/downloader.sh index 3a94f99..60ca889 100644 --- a/downloader.sh +++ b/downloader.sh @@ -21,6 +21,9 @@ getISO() { failed() { error="No $1 entries yet."; } +cancelled() { + cancel="Selection from $1 cancelled."; +} ### Important: ### This is the blank entry template for distros ### we support but don't have or can't provide links for. @@ -31,17 +34,23 @@ failed() { # } select_debian() { failed "$1" + cancelled "$1" return=$error + exit=$cancel downloadisos "$return" } select_fedora() { failed "$1" + cancelled "$1" return=$error + exit=$cancel downloadisos "$return" } select_ubuntu() { failed "$1" + cancelled "$1" return=$error + exit=$cancel HEIGHT=50 WIDTH=70 @@ -75,7 +84,7 @@ select_ubuntu() { '17.04 Server 64bit' ); - COUNT=0 + COUNT=1 OPTIONS=() for i in "${ISOS[@]}"; do OPTIONS+=($COUNT "$i") @@ -95,10 +104,10 @@ select_ubuntu() { 2>&1 >/dev/tty ) - if [ $CHOICE = $[COUNT-1] ];then + if [[ $CHOICE = $[COUNT-1] ]];then downloadisos "Returned from $1" fi - if [ $CHOICE = $COUNT ];then + if [[ $CHOICE = $COUNT ]];then echo "Leaving Distro Downloader from $1 menu." exit 1 fi @@ -108,101 +117,106 @@ select_ubuntu() { URL="" case $CHOICE in - 0) + 1) FILE="ubuntu-12.04.5-alternate-i386.iso" URL="${COMMON}12.04/${FILE}" ;; - 1) + 2) FILE="ubuntu-12.04.5-alternate-amd64.iso" URL="${COMMON}12.04/${FILE}" ;; - 2) + 3) FILE="ubuntu-12.04.5-desktop-i386.iso" URL="${COMMON}12.04/${FILE}" ;; - 3) + 4) FILE="ubuntu-12.04.5-desktop-amd64.iso" URL="${COMMON}12.04/${FILE}" ;; - 4) + 5) FILE="ubuntu-12.04.5-server-i386.iso" URL="${COMMON}12.04/${FILE}" ;; - 5) + 6) FILE="ubuntu-12.04.5-server-amd64.iso" URL="${COMMON}12.04/${FILE}" ;; - 6) + 7) FILE="ubuntu-14.04.5-desktop-i386.iso" URL="${COMMON}14.04/${FILE}" ;; - 7) + 8) FILE="ubuntu-14.04.5-desktop-amd64.iso" URL="${COMMON}14.04/${FILE}" ;; - 8) + 9) FILE="ubuntu-14.04.5-server-i386.iso" URL="${COMMON}14.04/${FILE}" ;; - 9) + 10) FILE="ubuntu-14.04.5-server-amd64.iso" URL="${COMMON}14.04/${FILE}" ;; - 10) + 11) FILE="ubuntu-16.04.2-desktop-i386.iso" URL="${COMMON}16.04/${FILE}" ;; - 11) + 12) FILE="ubuntu-16.04.2-desktop-amd64.iso" URL="${COMMON}16.04/${FILE}" ;; - 12) + 13) FILE="ubuntu-16.04.2-server-i386.iso" URL="${COMMON}16.04/${FILE}" ;; - 13) + 14) FILE="ubuntu-16.04.2-server-amd64.iso" URL="${COMMON}16.04/${FILE}" ;; - 14) + 15) FILE="ubuntu-16.10-desktop-i386.iso" URL="${COMMON}16.10/${FILE}" ;; - 15) + 16) FILE="ubuntu-16.10-desktop-amd64.iso" URL="${COMMON}16.10/${FILE}" ;; - 16) + 17) FILE="ubuntu-16.10-server-i386.iso" URL="${COMMON}16.10/${FILE}" ;; - 17) + 18) FILE="ubuntu-16.10-server-amd64.iso" URL="${COMMON}16.10/${FILE}" ;; - 18) + 19) FILE="ubuntu-17.04-desktop-i386.iso" URL="${COMMON}17.04/${FILE}" ;; - 19) + 20) FILE="ubuntu-17.04-desktop-amd64.iso" URL="${COMMON}17.04/${FILE}" ;; - 20) + 21) FILE="ubuntu-17.04-server-i386.iso" URL="${COMMON}17.04/${FILE}" ;; - 21) + 22) FILE="ubuntu-17.04-server-amd64.iso" URL="${COMMON}17.04/${FILE}" ;; esac - getISO $1 "${ISOS[$CHOICE]}" "$FILE" "$URL" + if [[ -z $CHOICE ]];then + downloadisos "$exit" + else + GETNAME=$CHOICE-1 + getISO $1 "${ISOS[$GETNAME]}" "$FILE" "$URL" + fi ### If menu fails, drop to main menu. downloadisos "$return" @@ -256,11 +270,17 @@ downloadisos() { 2>&1 >/dev/tty ) - if [ $CHOICE = $COUNT ];then + if [[ $CHOICE = $COUNT ]];then echo "Leaving Distro Downloader from main menu." exit 1 + fi + + if [[ -z $CHOICE ]];then + echo "Cancelled Distro Downloader from main menu." + exit 1 + else + distrochoice ${DISTROS[$CHOICE]} fi - distrochoice ${DISTROS[$CHOICE]} ## Clean exit on menu fail. exit 1 From 4ec1c74aaa37caf90fe0d720b0f40dc248d0642e Mon Sep 17 00:00:00 2001 From: stheno Date: Tue, 13 Jun 2017 00:41:49 -0700 Subject: [PATCH 09/38] Windows 7 install disk plugin added. Must name the iso to extract as win7.iso --- plugins/win7.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 plugins/win7.sh diff --git a/plugins/win7.sh b/plugins/win7.sh new file mode 100644 index 0000000..ea64a09 --- /dev/null +++ b/plugins/win7.sh @@ -0,0 +1,58 @@ +#!/bin/sh +set -e +. "${MCDDIR}"/functions.sh +#Windows 7 Disc plugin for multicd.sh +#version 6.9 +#Copyright for this script (c) 2011 Isaac Schemm +# +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: +# +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. +if [ $1 = scan ];then + if [ -f win7.iso ];then + echo "Windows 7 Disc (Not open source)" + fi +elif [ $1 = copy ];then + if [ -f win7.iso ];then + echo "Copying Windows 7 Disc..." + mcdmount win7 + cp -r "${MNT}"/win7/boot/* "${WORK}"/boot/ + cp -r "${MNT}"/win7/sources "${WORK}"/ + cp "${MNT}"/win7/bootmgr "${WORK}"/ + umcdmount win7 + fi +elif [ $1 = writecfg ];then +if [ -f win7.iso ];then + if which isoinfo &> /dev/null;then + if isoinfo -d -i win7.iso;then + TYPE=" 64-bit" + else + TYPE=" 32-bit" + fi + else + TYPE="" + fi + echo "label win7 + menu label Windows ^7$TYPE Disc (direct from CD) + kernel chain.c32 + append boot ntldr=/bootmgr">>"${WORK}"/boot/isolinux/isolinux.cfg +fi +else + echo "Usage: $0 {scan|copy|writecfg}" + echo "Use only from within multicd.sh or a compatible script!" + echo "Don't use this plugin script on its own!" +fi From 90041b2a2a1752dd65f4cabae680b3c8f67f3103 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Tue, 20 Jun 2017 18:31:43 -0500 Subject: [PATCH 10/38] 7z and fuseiso don't extract win7 properly - not sure why, but we can show an error message. --- plugins/win7.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 plugins/win7.sh diff --git a/plugins/win7.sh b/plugins/win7.sh old mode 100644 new mode 100755 index ea64a09..170eaf2 --- a/plugins/win7.sh +++ b/plugins/win7.sh @@ -2,8 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Windows 7 Disc plugin for multicd.sh -#version 6.9 -#Copyright for this script (c) 2011 Isaac Schemm +#version 20170620 +#Copyright for this script (c) 2011-2017 Isaac Schemm et al # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -30,6 +30,11 @@ elif [ $1 = copy ];then if [ -f win7.iso ];then echo "Copying Windows 7 Disc..." mcdmount win7 + if [ ! -d "${MNT}"/win7/boot ];then + echo "Could not find \"boot\" folder - maybe it wasn't extracted properly." >&2 + echo "On Linux, running this script again as root should fix it." >&2 + exit 1 + fi cp -r "${MNT}"/win7/boot/* "${WORK}"/boot/ cp -r "${MNT}"/win7/sources "${WORK}"/ cp "${MNT}"/win7/bootmgr "${WORK}"/ From e279cc3879b3be2bd12c86ab0806f7fb3ef3f2fe Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Tue, 20 Jun 2017 18:40:07 -0500 Subject: [PATCH 11/38] -o cannot accept spaces in path name --- multicd.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multicd.sh b/multicd.sh index 2de475a..f1cf81e 100755 --- a/multicd.sh +++ b/multicd.sh @@ -141,6 +141,10 @@ if echo "${OUTPUT}" | grep -q "/";then echo "The -o option must be either a filename without an extension (.iso will be appended) or an absolute path." exit 1 fi + if ! (echo "${OUTPUT}" | tail -c 4 | grep -q iso);then + echo "The -o option does not accept paths with spaces. If an absolute path is used, the .iso extension is required." + exit 1 + fi OUTPUTPATH="${OUTPUT}" else # Filename From 5241eef9b5e61e055da1780c09fb201ae69068e8 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Wed, 19 Jul 2017 10:27:02 -0500 Subject: [PATCH 12/38] (issue #60) Allow ISO patterns such as ubuntu-mate-*.iso --- plugins/ubuntu.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index d717957..148f2a0 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -58,19 +58,24 @@ if [ $1 = links ];then # stheno - This processes the iso name into usable chunks for other purposes. # This is key in the start for allowing multiple Ubuntu desktop flavors. BASENAME=$(echo $i|sed -e 's/\.iso//g') - TYPETEMP=`echo $BASENAME | sed 's/ubuntu.*//g'` - VERSIONPRE=`echo $BASENAME | sed 's/.*ubuntu-//g'` + TYPETEMP1=`echo $BASENAME | sed 's/ubuntu.*//g'` + TYPETEMP2=`echo $BASENAME | sed 's/.*ubuntu-//g' | sed 's/[0-9].*//g' | sed 's/\-//g'` + VERSIONPRE=`echo $BASENAME | sed 's/.*ubuntu-[^0-9]*//g'` VERSIONPOST=`echo $VERSIONPRE | sed 's/-.*//g'` - ARCHPRE=`echo $BASENAME | sed "s/.*ubuntu-"${VERSIONPOST}"-//g"` + ARCHPRE=`echo $BASENAME | sed "s/.*ubuntu-[^0-9]*"${VERSIONPOST}"-//g"` ARCHPOST=`echo $ARCHPRE | sed 's/.*-//g'` - PLATPRE=`echo $BASENAME | sed "s/.*ubuntu-"${VERSIONPOST}"-//g"` + PLATPRE=`echo $BASENAME | sed "s/.*ubuntu-[^0-9]*"${VERSIONPOST}"-//g"` PLATPOST=`echo $PLATPRE | sed 's/-.*//g'` - if [ "${TYPETEMP}" ];then - TYPE="${TYPETEMP}." - TYPELABEL=$(echo $TYPETEMP | sed 's/./\U&/')u + if [ "${TYPETEMP1}" ];then + TYPE="${TYPETEMP1}." + TYPELABEL=$(echo $TYPETEMP1 | sed 's/./\U&/')ubuntu + elif [ "${TYPETEMP2}" ];then + TYPE="${TYPETEMP2}." + TYPELABEL="Ubuntu-$(echo $TYPETEMP2 | sed 's/\-//g')" + TYPETEMP2="-${TYPETEMP2}" else TYPE="" - TYPELABEL="U" + TYPELABEL="Ubuntu" fi if [ "${ARCHPOST}" = "i386" ];then ARCHLABEL="(32-bit)" @@ -83,11 +88,11 @@ if [ $1 = links ];then case "$BASENAME" in *desktop*) if [ ! "${PLATPOST}" = "server" ];then - echo "${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.title" + echo "${TYPELABEL}_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" > "${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.title" # stheno - This covers ALL links available on discovered files. # No need to write entries that do not exist and be bound to only them. # This facilitates multiple iso files of similar flavor but different versions or arch. - echo "${TYPETEMP}ubuntu-${VERSIONPOST}-${PLATPOST}-${ARCHPOST}.iso ${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.iso ${TYPELABEL}buntu_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" + echo "${TYPETEMP1}ubuntu${TYPETEMP2}-${VERSIONPOST}-${PLATPOST}-${ARCHPOST}.iso ${VERSIONPOST}.${ARCHPOST}.${PLATPOST}.${TYPE}ubuntu.iso ${TYPELABEL}_${VERSIONPOST}_${PLATPOST}_${ARCHLABEL}" fi ;; From 33562ebbbf3934024a2b530846bbebe77b399e7b Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Thu, 27 Jul 2017 10:00:03 -0500 Subject: [PATCH 13/38] Fix isohybrid argument path --- multicd.sh | 2 +- plugins/ubuntu.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/multicd.sh b/multicd.sh index f1cf81e..7511561 100755 --- a/multicd.sh +++ b/multicd.sh @@ -713,7 +713,7 @@ ISOHYBRID="${TAGS}/isohybrid" } if [ -f "${TAGS}/isohybrid" ];then echo "Running isohybrid..." - "${TAGS}/isohybrid" "./build/"${OUTPUT}"" 2> /dev/null || echo "isohybrid gave an error status of $?. The ISO might not work on a flash drive." + "${TAGS}/isohybrid" "${OUTPUTPATH}" 2> /dev/null || echo "isohybrid gave an error status of $?. The ISO might not work on a flash drive." rm "${TAGS}"/isohybrid fi diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index 148f2a0..61dbcd7 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -55,6 +55,9 @@ getUbuntuName () { if [ $1 = links ];then for i in *ubuntu*.iso; do + if [ "$i" = '*ubuntu*.iso' ];then + continue + fi # stheno - This processes the iso name into usable chunks for other purposes. # This is key in the start for allowing multiple Ubuntu desktop flavors. BASENAME=$(echo $i|sed -e 's/\.iso//g') From f5874cb3738ccef7040285520502031c743f7f17 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Tue, 30 Jan 2018 10:39:49 -0600 Subject: [PATCH 14/38] Fix Debian 9 live DVD issue (#62) --- plugins/debian-live.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/debian-live.sh b/plugins/debian-live.sh index 9dc0b52..94c012a 100755 --- a/plugins/debian-live.sh +++ b/plugins/debian-live.sh @@ -2,8 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Debian Live plugin for multicd.sh -#version 20140410 -#Copyright (c) 2014 Isaac Schemm +#version 20180130 +#Copyright (c) 2018 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -72,6 +72,7 @@ elif [ $1 = copy ];then mcdmount $BASENAME cp "${MNT}"/$BASENAME/isolinux/live.cfg "${WORK}"/boot/isolinux/$BASENAME.cfg || cp "${MNT}"/$BASENAME/boot/live.cfg "${WORK}"/boot/isolinux/$BASENAME.cfg || + cp "${MNT}"/$BASENAME/isolinux/menu.cfg "${WORK}"/boot/isolinux/$BASENAME.cfg || cp "${MNT}"/$BASENAME/isolinux/isolinux.cfg "${WORK}"/boot/isolinux/$BASENAME.cfg sed -i -e 's/default vesamenu.c32/default menu.c32/g' "${WORK}"/boot/isolinux/$BASENAME.cfg LIVEFOLDER=$BASENAME @@ -87,7 +88,7 @@ elif [ $1 = copy ];then fi fi mkdir "${WORK}"/$LIVEFOLDER - mcdcp -rv "${MNT}"/$BASENAME/live/* "${WORK}"/$LIVEFOLDER + mcdcp -r "${MNT}"/$BASENAME/live/* "${WORK}"/$LIVEFOLDER umcdmount $BASENAME done if [ -f "${WORK}"/live/memtest ];then From 2ba2b6e3aa9ec473dc84630ad997b751b1593f81 Mon Sep 17 00:00:00 2001 From: padv Date: Sat, 16 Jun 2018 20:03:37 +0200 Subject: [PATCH 15/38] plugins/clonezilla.sh: replace deprecated ocs_live_keymap and ocs_lang --- plugins/clonezilla.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/clonezilla.sh b/plugins/clonezilla.sh index 932009c..dd849d0 100755 --- a/plugins/clonezilla.sh +++ b/plugins/clonezilla.sh @@ -54,7 +54,8 @@ elif [ $1 = copy ];then mcdmount $BASENAME cp "${MNT}"/$BASENAME/*linux/ocswp.png "${WORK}"/boot/isolinux/ocswp.png #Boot menu logo cp -r "${MNT}"/$BASENAME/live "${WORK}"/boot/$BASENAME #Another Debian Live-based ISO - cp "${MNT}"/$BASENAME/C* "${WORK}"/boot/$BASENAME #PDV Clonezilla-Live-Version and COPYING files + cp "${MNT}"/$BASENAME/Clonezilla-Live-Version "${WORK}"/boot/$BASENAME #PDV Clonezilla-Live-Version file + cp "${MNT}"/$BASENAME/GPL "${WORK}"/boot/$BASENAME #PDV GPL file cp "${MNT}"/$BASENAME/*linux/isolinux.cfg "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #PDV umcdmount $BASENAME fi @@ -68,15 +69,12 @@ elif [ $1 = writecfg ];then sed -i -e 's/\/live\//\/boot\/'$BASENAME'\//g' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #Change directory to /boot/clonezilla sed -i -e 's/append initrd=/append live-media-path=\/boot\/'$BASENAME' initrd=/g' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #Tell the kernel we moved it if [ -f "${TAGS}"/country ]; then #PDV - if [ $(cat "${TAGS}"/country) = "be" ];then - sed -i -e 's/ocs_live_keymap=""/ocs_live_keymap="\/usr\/share\/keymaps\/i386\/azerty\/be2-latin1.kmap.gz"/' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #set keymap - fi + sed -i -e 's/keyboard-layouts=/keyboard-layouts="'$(cat "${TAGS}"/country)'"/' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #set keymap fi if [ -f "${TAGS}"/lang-full ]; then #PDV - sed -i -e 's/ocs_lang=""/ocs_lang="'$(cat "${TAGS}"/lang-full)'.UTF-8"/' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #menu language + sed -i -e 's/locales=/locales="'$(cat "${TAGS}"/lang-full)'.UTF-8"/' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg #menu language fi ls "${WORK}"/boot/isolinux/cz-$BASENAME.cfg - ##sed -i -e 's/[[:blank:]]ip=frommedia[[:blank:]]/ /' "${WORK}"/boot/isolinux/clonezil$BASENAME.cfg #PDV get ip via dhcp if $MEMTEST; then #PDV remove memtest if already in main menu sed -i -e '/MENU BEGIN Memtest/,/MENU END/ s/MENU END//' -e '/MENU BEGIN Memtest/,/ENDTEXT/d' -e '/./,/^$/!d' "${WORK}"/boot/isolinux/cz-$BASENAME.cfg rm "${WORK}"/boot/$BASENAME/memtest From e746464aa042879ad918cb0bad9c1605d1f90bb8 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Thu, 21 Jun 2018 10:49:09 -0500 Subject: [PATCH 16/38] Add plugin for newer Kaspersky Rescue Disc version --- plugins/krd.sh | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100755 plugins/krd.sh diff --git a/plugins/krd.sh b/plugins/krd.sh new file mode 100755 index 0000000..d6f5877 --- /dev/null +++ b/plugins/krd.sh @@ -0,0 +1,98 @@ +#!/bin/sh +set -e +. "${MCDDIR}"/functions.sh +#Kapersky Rescue Disk 18 plugin for multicd.sh +#version 20180621 +#Copyright (c) 2018 Isaac Schemm +# +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: +# +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. +if [ $1 = scan ];then + if [ -f krd.iso ];then + echo "Kapersky Rescue Disk" + fi +elif [ $1 = copy ];then + if [ -f krd.iso ];then + echo "Copying Kapersky Rescue Disk..." + mcdmount krd + mkdir "${WORK}"/boot/krd + # Kernel, initrd + mcdcp "${MNT}"/krd/boot/grub/k-x86 "${WORK}"/boot/krd + mcdcp "${MNT}"/krd/boot/grub/k-x86_64 "${WORK}"/boot/krd + mcdcp "${MNT}"/krd/boot/grub/initrd.xz "${WORK}"/boot/krd + # Filesystem + mcdcp -r "${MNT}"/krd/data "${WORK}" + umcdmount krd + fi +elif [ $1 = writecfg ];then + if [ -f krd.iso ];then + if [ -f "${TAGS}"/lang ];then + LANGCODE=$(cat "${TAGS}"/lang) + else + LANGCODE=en + fi + echo "menu begin --> ^Kapersky Rescue Disk + + label kav64 + menu label (x86_64) Kaspersky Rescue Disk. Graphic mode + kernel /boot/krd/k-x86_64 + initrd /boot/krd/initrd.xz + append net.ifnames=0 lang=$LANGCODE dostartx + + label kav64nomodeset + menu label (x86_64) Kaspersky Rescue Disk. Limited graphic mode + kernel /boot/krd/k-x86_64 + initrd /boot/krd/initrd.xz + append net.ifnames=0 nomodeset lang=$LANGCODE dostartx + + label kav64hardwareinfo + menu label (x86_64) Hardware Info + kernel /boot/krd/k-x86_64 + initrd /boot/krd/initrd.xz + append net.ifnames=0 lang=$LANGCODE docache loadsrm=000-core.srm,003-kl.srm nox hwinfo docheck + + label kav32 + menu label (x86) Kaspersky Rescue Disk. Graphic mode + kernel /boot/krd/k-x86 + initrd /boot/krd/initrd.xz + append net.ifnames=0 lang=$LANGCODE dostartx + + label kav32nomodeset + menu label (x86) Kaspersky Rescue Disk. Limited graphic mode + kernel /boot/krd/k-x86 + initrd /boot/krd/initrd.xz + append net.ifnames=0 nomodeset lang=$LANGCODE dostartx + + label kav32hardwareinfo + menu label (x86) Hardware Info + kernel /boot/krd/k-x86 + initrd /boot/krd/initrd.xz + append net.ifnames=0 lang=$LANGCODE docache loadsrm=000-core.srm,003-kl.srm nox hwinfo docheck + + label back + menu label ^Back to main menu + com32 menu.c32 + append isolinux.cfg + + menu end" >> "${WORK}"/boot/isolinux/isolinux.cfg + fi +else + echo "Usage: $0 {links|scan|copy|writecfg}" + echo "Use only from within multicd.sh or a compatible script!" + echo "Don't use this plugin script on its own!" +fi From 75b1cb83aae7bc67be3f55af22cd332c016c178e Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Thu, 21 Jun 2018 13:18:18 -0500 Subject: [PATCH 17/38] Make win7 plugin work with Hiren's BootCD PE --- plugins/win7.sh | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/plugins/win7.sh b/plugins/win7.sh index 170eaf2..8a50887 100755 --- a/plugins/win7.sh +++ b/plugins/win7.sh @@ -22,37 +22,41 @@ set -e #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN #THE SOFTWARE. -if [ $1 = scan ];then +if [ $1 = links ];then + echo "HBCD_PE_*.iso win7.iso Hiren's_BootCD_PE" +elif [ $1 = scan ];then if [ -f win7.iso ];then - echo "Windows 7 Disc (Not open source)" + echo "Windows 7+" + touch "${TAGS}/win7.needsname" fi elif [ $1 = copy ];then if [ -f win7.iso ];then - echo "Copying Windows 7 Disc..." + echo "Copying Windows 7+..." mcdmount win7 - if [ ! -d "${MNT}"/win7/boot ];then - echo "Could not find \"boot\" folder - maybe it wasn't extracted properly." >&2 - echo "On Linux, running this script again as root should fix it." >&2 - exit 1 + if [ -d "${MNT}"/win7/HBCD_PE.ini ];then + cp "${MNT}"/win7/HBCD_PE.ini "${WORK}"/ + cp "${MNT}"/win7/Version.txt "${WORK}"/hirens.txt || true fi - cp -r "${MNT}"/win7/boot/* "${WORK}"/boot/ + cp -r "${MNT}"/win7/[Bb]oot/* "${WORK}"/boot/ cp -r "${MNT}"/win7/sources "${WORK}"/ cp "${MNT}"/win7/bootmgr "${WORK}"/ umcdmount win7 fi elif [ $1 = writecfg ];then if [ -f win7.iso ];then - if which isoinfo &> /dev/null;then - if isoinfo -d -i win7.iso;then - TYPE=" 64-bit" - else - TYPE=" 32-bit" + DISPLAYNAME="$(cat "${TAGS}"/win7.name)" + if [ -z "$DISPLAYNAME" ];then + DISPLAYNAME="Windows 7+" + if which isoinfo &> /dev/null;then + if isoinfo -d -i win7.iso;then + DISPLAYNAME="Windows 7+ (64-bit)" + else + DISPLAYNAME="Windows 7+ (32-bit)" + fi fi - else - TYPE="" fi echo "label win7 - menu label Windows ^7$TYPE Disc (direct from CD) + menu label $DISPLAYNAME kernel chain.c32 append boot ntldr=/bootmgr">>"${WORK}"/boot/isolinux/isolinux.cfg fi From 3549dbcc838b704ec452e6c235558997d361b17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C8=98erb=C4=83nescu?= Date: Mon, 12 Nov 2018 20:22:22 +0100 Subject: [PATCH 18/38] Fixed debian-mini.sh anddebian-mini64.sh to be able to have them both on the same CD. --- plugins/debian-mini.sh | 2 +- plugins/debian-mini64.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/debian-mini.sh b/plugins/debian-mini.sh index 8d10d29..9dd3bce 100755 --- a/plugins/debian-mini.sh +++ b/plugins/debian-mini.sh @@ -38,7 +38,7 @@ elif [ $1 = copy ];then elif [ $1 = writecfg ];then if [ -f debian-mini.iso ];then DEBNAME="Debian GNU/Linux mini netinst (i386)" -echo "menu begin -->^DEBNAME +echo "menu begin -->^$DEBNAME label ^Install Debian kernel /boot/debian/linux diff --git a/plugins/debian-mini64.sh b/plugins/debian-mini64.sh index 0cc18eb..23280e6 100755 --- a/plugins/debian-mini64.sh +++ b/plugins/debian-mini64.sh @@ -30,9 +30,9 @@ elif [ $1 = copy ];then if [ -f debian-mini64.iso ];then echo "Copying Debian netboot installer (amd64)..." mcdmount debian-mini64 - mkdir "${WORK}"/boot/debian - cp "${MNT}"/debian-mini64/linux "${WORK}"/boot/debian/linux - cp "${MNT}"/debian-mini64/initrd.gz "${WORK}"/boot/debian/initrd.gz + mkdir -p "${WORK}"/boot/debian64 + cp "${MNT}"/debian-mini64/linux "${WORK}"/boot/debian64/linux + cp "${MNT}"/debian-mini64/initrd.gz "${WORK}"/boot/debian64/initrd.gz umcdmount debian-mini64 fi elif [ $1 = writecfg ];then @@ -41,11 +41,11 @@ DEBNAME="Debian GNU/Linux mini netinst (amd64)" echo "menu begin -->^$DEBNAME label ^Install Debian - kernel /boot/debian/linux - append vga=normal initrd=/boot/debian/initrd.gz -- quiet + kernel /boot/debian64/linux + append vga=normal initrd=/boot/debian64/initrd.gz -- quiet label ^Install Debian - expert mode - kernel /boot/debian/linux - append priority=low vga=normal initrd=/boot/debian/initrd.gz -- + kernel /boot/debian64/linux + append priority=low vga=normal initrd=/boot/debian64/initrd.gz -- menu end" >> "${WORK}"/boot/isolinux/isolinux.cfg fi From 537c3673075696bdc138be2c024a58de34f7babe Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Wed, 26 Dec 2018 15:44:24 -0600 Subject: [PATCH 19/38] (#70) Don't try to use ubuntu-alternate plugin for ubuntu server live images (new installer) --- plugins/ubuntu-alternate.sh | 15 ++++++++++++--- plugins/ubuntu.sh | 6 +++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/plugins/ubuntu-alternate.sh b/plugins/ubuntu-alternate.sh index d4e1636..9525bb8 100755 --- a/plugins/ubuntu-alternate.sh +++ b/plugins/ubuntu-alternate.sh @@ -2,8 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Ubuntu alternate install CD plugin for multicd.sh -#version 20121113 -#Copyright (c) 2012 Isaac Schemm +#version 20181226 +#Copyright (c) 2012-2018 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -33,7 +33,16 @@ if [ $1 = links ];then echo "lubuntu-*-alternate-i386.iso ubuntu-alternate.iso Lubuntu_alternate_installer_(32-bit)" echo "lubuntu-*-alternate-amd64.iso ubuntu-alternate.iso Lubuntu_alternate_installer_(64-bit)" echo "ubuntu-*-server-i386.iso ubuntu-alternate.iso Ubuntu_server_(32-bit)" - echo "ubuntu-*-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*0-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*1-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*2-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*3-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*4-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*5-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*6-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*7-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*8-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*9-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" elif [ $1 = scan ];then if [ -f ubuntu-alternate.iso ];then echo "Ubuntu alternate installer" diff --git a/plugins/ubuntu.sh b/plugins/ubuntu.sh index 61dbcd7..a2d370c 100755 --- a/plugins/ubuntu.sh +++ b/plugins/ubuntu.sh @@ -2,8 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Ubuntu plugin for multicd.sh -#version 20170609 -#Copyright (c) 2012-2017 Isaac Schemm et al +#version 20181226 +#Copyright (c) 2012-2018 Isaac Schemm et al # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -68,7 +68,7 @@ if [ $1 = links ];then ARCHPRE=`echo $BASENAME | sed "s/.*ubuntu-[^0-9]*"${VERSIONPOST}"-//g"` ARCHPOST=`echo $ARCHPRE | sed 's/.*-//g'` PLATPRE=`echo $BASENAME | sed "s/.*ubuntu-[^0-9]*"${VERSIONPOST}"-//g"` - PLATPOST=`echo $PLATPRE | sed 's/-.*//g'` + PLATPOST=`echo $PLATPRE | sed "s/-$ARCHPOST*//g"` if [ "${TYPETEMP1}" ];then TYPE="${TYPETEMP1}." TYPELABEL=$(echo $TYPETEMP1 | sed 's/./\U&/')ubuntu From 200eed596f386cc52ae7fcd81af6c1e8fc9633b7 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Thu, 27 Dec 2018 13:33:23 -0600 Subject: [PATCH 20/38] (#70) Add support for ubuntu server live installer --- plugins/ubuntu-alternate.sh | 41 ++++++++++--------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/plugins/ubuntu-alternate.sh b/plugins/ubuntu-alternate.sh index 9525bb8..50f08b3 100755 --- a/plugins/ubuntu-alternate.sh +++ b/plugins/ubuntu-alternate.sh @@ -1,8 +1,8 @@ #!/bin/sh set -e . "${MCDDIR}"/functions.sh -#Ubuntu alternate install CD plugin for multicd.sh -#version 20181226 +#Ubuntu alternate/server install CD plugin for multicd.sh +#version 20181227 #Copyright (c) 2012-2018 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33,16 +33,7 @@ if [ $1 = links ];then echo "lubuntu-*-alternate-i386.iso ubuntu-alternate.iso Lubuntu_alternate_installer_(32-bit)" echo "lubuntu-*-alternate-amd64.iso ubuntu-alternate.iso Lubuntu_alternate_installer_(64-bit)" echo "ubuntu-*-server-i386.iso ubuntu-alternate.iso Ubuntu_server_(32-bit)" - echo "ubuntu-*0-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*1-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*2-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*3-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*4-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*5-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*6-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*7-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*8-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" - echo "ubuntu-*9-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" + echo "ubuntu-*-server-amd64.iso ubuntu-alternate.iso Ubuntu_server_(64-bit)" elif [ $1 = scan ];then if [ -f ubuntu-alternate.iso ];then echo "Ubuntu alternate installer" @@ -55,8 +46,11 @@ elif [ $1 = copy ];then else echo "Copying Ubuntu alternate installer..." mcdmount ubuntu-alternate - cp "${MNT}"/ubuntu-alternate/cdromupgrade "${WORK}" 2>&1 || true #Not essential + cp "${MNT}"/ubuntu-alternate/cdromupgrade "${WORK}" 2>/dev/null || true #Not essential cp -r "${MNT}"/ubuntu-alternate/.disk "${WORK}" + if [ -d "${MNT}"/ubuntu-alternate/casper ];then + cp -r "${MNT}"/ubuntu-alternate/casper "${WORK}" + fi cp -r "${MNT}"/ubuntu-alternate/dists "${WORK}" cp -r "${MNT}"/ubuntu-alternate/doc "${WORK}" || true cp -r "${MNT}"/ubuntu-alternate/install "${WORK}" @@ -67,6 +61,7 @@ elif [ $1 = copy ];then if [ ! -e "${MNT}"/ubuntu-alternate/ubuntu ];then ln -s . "${MNT}"/ubuntu-alternate/ubuntu fi + cp "${MNT}"/ubuntu-alternate/isolinux/txt.cfg "${WORK}"/boot/isolinux/ubuntu-alternate.cfg umcdmount ubuntu-alternate fi fi @@ -80,23 +75,9 @@ if [ -f "${WORK}"/README.diskdefines ];then else CDNAME="Ubuntu alternate installer" fi -echo "menu begin --> ^$CDNAME - -label install - menu label ^Install Ubuntu - kernel /install/vmlinuz - append file=/cdrom/$PRESEED vga=788 initrd=/install/initrd.gz quiet -- - -label expert - menu label ^Expert install - kernel /install/vmlinuz - append file=/cdrom/$PRESEED priority=low vga=788 initrd=/install/initrd.gz -- -label rescue - menu label ^Rescue a broken system - kernel /install/vmlinuz - append rescue/enable=true vga=788 initrd=/install/initrd.gz -- - -menu end" >> "${WORK}"/boot/isolinux/isolinux.cfg +echo "menu begin --> ^$CDNAME" >> "${WORK}"/boot/isolinux/isolinux.cfg +cat "${WORK}"/boot/isolinux/ubuntu-alternate.cfg | sed -e 's/^default .*//g' >> "${WORK}"/boot/isolinux/isolinux.cfg +echo "menu end" >> "${WORK}"/boot/isolinux/isolinux.cfg fi else echo "Usage: $0 {links|scan|copy|writecfg}" From 5c9db86bf60f3db23a5ab6df95b773bc82020a4e Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sun, 30 Dec 2018 16:31:57 -0600 Subject: [PATCH 21/38] (#70) Force /casper folder for Ubuntu server installer; change /.disk/info --- plugins/ubuntu-alternate.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/ubuntu-alternate.sh b/plugins/ubuntu-alternate.sh index 50f08b3..588b774 100755 --- a/plugins/ubuntu-alternate.sh +++ b/plugins/ubuntu-alternate.sh @@ -41,15 +41,21 @@ elif [ $1 = scan ];then elif [ $1 = copy ];then if [ -f ubuntu-alternate.iso ];then if [ -d "${WORK}"/pool ];then - echo "NOT copying Ubuntu alternate installer - some sort of Ubuntu/Debian installer is already present." - touch "${TAGS}"/ubuntu-not-copied + echo "Not copying Ubuntu alternate/server installer - some sort of Ubuntu/Debian installer is already present." + exit 1 else echo "Copying Ubuntu alternate installer..." mcdmount ubuntu-alternate cp "${MNT}"/ubuntu-alternate/cdromupgrade "${WORK}" 2>/dev/null || true #Not essential cp -r "${MNT}"/ubuntu-alternate/.disk "${WORK}" + echo "Ubuntu (MultiCD)" > "${WORK}"/.disk/info if [ -d "${MNT}"/ubuntu-alternate/casper ];then - cp -r "${MNT}"/ubuntu-alternate/casper "${WORK}" + if [ -d "${WORK}"/casper ];then + echo "There is a conflict on the live CD. The Ubuntu alternate/server installer needs to use /casper folder, but it already exists." + exit 1 + fi + mkdir "${WORK}"/casper + cp -r "${MNT}"/ubuntu-alternate/casper/* "${WORK}"/casper fi cp -r "${MNT}"/ubuntu-alternate/dists "${WORK}" cp -r "${MNT}"/ubuntu-alternate/doc "${WORK}" || true @@ -66,7 +72,7 @@ elif [ $1 = copy ];then fi fi elif [ $1 = writecfg ];then -if [ -f ubuntu-alternate.iso ] && [ ! -f "${TAGS}"/ubuntu-not-copied ];then +if [ -f ubuntu-alternate.iso ];then cd "$WORK" PRESEED=$(echo preseed/*ubuntu*|awk '{print $1}') cd - From 538b2e38cb0d17924567301c64746820c3643c54 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sun, 3 Mar 2019 18:25:32 -0600 Subject: [PATCH 22/38] Add plugin for newest version of SystemRescueCd (sysresccd) (May not work if CD label has spaces in it) --- plugins/sysresccd.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 plugins/sysresccd.sh diff --git a/plugins/sysresccd.sh b/plugins/sysresccd.sh new file mode 100755 index 0000000..daebc1c --- /dev/null +++ b/plugins/sysresccd.sh @@ -0,0 +1,53 @@ +#!/bin/sh +set -e +. "${MCDDIR}"/functions.sh +#SystemRescueCd plugin for multicd.sh +#version 20190303 +#Copyright (c) 2010-2019 Isaac Schemm and Pascal De Vuyst +# +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: +# +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. +if [ $1 = links ];then + echo "systemrescuecd-6*.iso sysresccd.iso none" +elif [ $1 = scan ];then + if [ -f sysresccd.iso ];then + echo "SystemRescueCd" + fi +elif [ $1 = copy ];then + if [ -f sysresccd.iso ];then + echo "Copying SystemRescueCd..." + mcdmount sysresccd + mkdir "${WORK}"/sysresccd + mcdcp -r "${MNT}"/sysresccd/sysresccd/* "${WORK}"/sysresccd + for i in "${WORK}"/sysresccd/boot/syslinux/*.cfg;do + sed -i -e "s/archisolabel=/archisolabel=$CDLABEL originalwas=/g" "$i" + done + umcdmount sysresccd + fi +elif [ $1 = writecfg ];then +if [ -f sysresccd.iso ];then +echo "label sysresccd +menu label --> ^SystemRescueCd +config /sysresccd/boot/syslinux/sysresccd.cfg /sysresccd +" >> "${WORK}"/boot/isolinux/isolinux.cfg +fi +else + echo "Usage: $0 {links|scan|copy|writecfg}" + echo "Use only from within multicd.sh or a compatible script!" + echo "Don't use this plugin script on its own!" +fi From 67d53c460dcab3d48a30283d4bf539091e1b817b Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sun, 3 Mar 2019 18:26:27 -0600 Subject: [PATCH 23/38] Do not try to run isohybrid from downloaded syslinux (use installed version only) --- multicd.sh | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/multicd.sh b/multicd.sh index 7511561..0f4d5bd 100755 --- a/multicd.sh +++ b/multicd.sh @@ -10,9 +10,9 @@ PATH=$PATH:$MCDDIR:$MCDDIR/plugins . functions.sh . downloader.sh -MCDVERSION="20170609" -#multicd.sh June 9, 2017 -#Copyright (c) 2017 Isaac Schemm +MCDVERSION="20190303" +#multicd.sh March 3, 2019 +#Copyright (c) 2019 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -449,9 +449,7 @@ cp /tmp/syslinux-*/bios/com32/elflink/ldlinux/ldlinux.c32 "${WORK}"/boot/isolinu cp /tmp/syslinux-*/bios/com32/chain/chain.c32 "${WORK}"/boot/isolinux/ cp /tmp/syslinux-*/bios/com32/libutil/libutil.c32 "${WORK}"/boot/isolinux/ cp /tmp/syslinux-*/bios/com32/lib/libcom32.c32 "${WORK}"/boot/isolinux/ -cp /tmp/syslinux-*/bios/utils/isohybrid "${TAGS}"/isohybrid chmod -R +w "$WORK/boot/isolinux" -chmod +x "${TAGS}"/isohybrid rm -r /tmp/syslinux-*/ if $MEMTEST;then @@ -694,27 +692,12 @@ $GENERATOR -o "${OUTPUTPATH}" \ -V "$CDLABEL" "${WORK}"/ rm -rf "${WORK}"/ -# try to find a working version of isohybrid -ISOHYBRID="${TAGS}/isohybrid" -{ - trap '' ERR - "${TAGS}"/isohybrid &> /dev/null - if [ $? = 127 ];then - echo "Could not run downloaded isohybrid (it's probably 32-bit) - looking for installed version..." - rm "$TAGS"/isohybrid - ihpath="$(which isohybrid)" - if [ -z "$ihpath" ];then - echo "WARNING: isohybrid not found." - echo "Install isohybrid (syslinux) to use your multicd on a USB drive" - else - ln -s $ihpath "$TAGS"/isohybrid - fi - fi -} -if [ -f "${TAGS}/isohybrid" ];then +if [ -n "$(which isohybrid)" ];then echo "Running isohybrid..." - "${TAGS}/isohybrid" "${OUTPUTPATH}" 2> /dev/null || echo "isohybrid gave an error status of $?. The ISO might not work on a flash drive." - rm "${TAGS}"/isohybrid + isohybrid "${OUTPUTPATH}" 2> /dev/null || echo "isohybrid gave an error status of $?. The ISO might not work on a flash drive." +else + echo "WARNING: isohybrid not found." + echo "Install isohybrid (from the syslinux-utils package) to use your multicd on a USB drive" fi if [ $(whoami) == "root" ];then From 96e1ecc72a0b43cb54ad2b24389b50dcdce8abe1 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Mon, 27 May 2019 14:06:04 -0500 Subject: [PATCH 24/38] Update Caine support --- plugins/caine.sh | 47 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/plugins/caine.sh b/plugins/caine.sh index 4bf5f92..b9ea929 100755 --- a/plugins/caine.sh +++ b/plugins/caine.sh @@ -2,8 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Caine plugin for multicd.sh -#version 6.9 -#Copyright (c) 2011 Isaac Schemm +#version 20190527 +#Copyright (c) 2019 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -22,37 +22,28 @@ set -e #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN #THE SOFTWARE. -if [ $1 = scan ];then - if [ -f caine.iso ];then - echo "Caine" - fi +if [ $1 = links ];then + echo "caine*.iso caine.casper.iso Caine_*" +elif [ $1 = scan ];then + true elif [ $1 = copy ];then - if [ -f caine.iso ];then - echo "Copying Caine..." - mcdmount caine - cp -r "${MNT}"/caine/casper "${WORK}"/boot/caine #Live system - cp "${MNT}"/caine/README.diskdefines "${WORK}"/ + if [ -f caine.casper.iso ];then + echo "Copying Caine (extra files/folders)..." + mcdmount caine.casper mkdir "${WORK}"/CaineFiles - for item in AutoPlay autorun.exe autorun.inf comdlg32.ocx files license.txt page5 preseed Programs RegOcx4Vista.bat rw_common tabctl32.ocx vbrun60.exe WinTaylor.exe; do - [[ -a "${MNT}"/caine/$item ]] && cp -r "${MNT}"/caine/$item "${WORK}"/CaineFiles - done - umcdmount caine + ls "${MNT}"/caine.casper | while read i;do + if [ "$i" = "casper" ];then + true + else + mcdcp -r "${MNT}/caine.casper/${i}" "${WORK}"/CaineFiles + fi + done + umcdmount caine.casper fi elif [ $1 = writecfg ];then - if [ -f "${TAGS}"/lang ];then - LANGCODE=$(cat "${TAGS}"/lang) - else - LANGCODE=en - fi - if [ -f caine.iso ];then - echo "label caine2 (Computer Aided Investigative Environment) - kernel /boot/caine/vmlinuz - initrd /boot/caine/initrd.gz - append live-media-path=/boot/caine ignore_uuid noprompt persistent BOOT_IMAGE=/casper/vmlinuz file=/cdrom/CaineFiles/custom.seed boot=casper -- debian-installer/language=$LANGCODE console-setup/layoutcode=$LANGCODE - " >> "${WORK}"/boot/isolinux/isolinux.cfg - fi + true else - echo "Usage: $0 {scan|copy|writecfg}" + echo "Usage: $0 {links|scan|copy|writecfg}" echo "Use only from within multicd.sh or a compatible script!" echo "Don't use this plugin script on its own!" fi From 700e4eb956a32e277ceee77e268f7fcddff8bff4 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 8 Jun 2019 18:04:20 -0500 Subject: [PATCH 25/38] Add ReactOS plugin --- plugins/reactos.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 plugins/reactos.sh diff --git a/plugins/reactos.sh b/plugins/reactos.sh new file mode 100755 index 0000000..55d4a8d --- /dev/null +++ b/plugins/reactos.sh @@ -0,0 +1,51 @@ +#!/bin/sh +set -e +. "${MCDDIR}"/functions.sh +#ReactOS plugin for multicd.sh +#version 20190608 +#Copyright (c) 2019 Isaac Schemm +# +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: +# +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. +if [ $1 = links ];then + echo "ReactOS-*.iso reactos.iso ReactOS" +elif [ $1 = scan ];then + if [ -f reactos.iso ];then + echo "ReactOS" + fi +elif [ $1 = copy ];then + if [ -f reactos.iso ];then + echo "Copying ReactOS..." + mcdmount reactos + mcdcp -r -n "${MNT}"/reactos/loader "${WORK}"/ + if [ -d "${MNT}"/reactos/Profiles ];then + mcdcp -r -n "${MNT}"/reactos/Profiles "${WORK}"/ + fi + mcdcp -r -n "${MNT}"/reactos/reactos "${WORK}"/ + cp -n "${MNT}"/reactos/freeldr.ini "${WORK}"/ + umcdmount reactos + fi +elif [ $1 = writecfg ];then + if [ -f reactos.iso ];then + echo "label reactos + menu label ^ReactOS $(getVersion reactos) + kernel /loader/isoboot.bin" >> "${WORK}"/boot/isolinux/isolinux.cfg + fi +else + echo "Usage: $0 {links|scan|copy|writecfg}" +fi From 7bb451f9e381805258d5f4e3809dcc45845b9e29 Mon Sep 17 00:00:00 2001 From: S4n1c <43365173+S4n1c@users.noreply.github.com> Date: Sat, 10 Aug 2019 01:15:51 +0200 Subject: [PATCH 26/38] Update to the TRK plugin Now the TRK plugin should support newer betas and older builds of the same distro --- plugins/trk.sh | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/trk.sh b/plugins/trk.sh index 46ea3cd..eefcfe4 100755 --- a/plugins/trk.sh +++ b/plugins/trk.sh @@ -2,7 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Trinity Rescue Kit plugin for multicd.sh -#version 20150622 +#version 20150622+ +#edited to fit newer version of trk #Copyright (c) 2015 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,6 +23,7 @@ set -e #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN #THE SOFTWARE. + if [ $1 = links ];then echo "trinity-rescue-kit.*.iso trk.iso none" elif [ $1 = scan ];then @@ -30,15 +32,26 @@ elif [ $1 = scan ];then fi elif [ $1 = copy ];then if [ -f trk.iso ];then - echo "Copying Trinity Rescue Kit..." + echo "Copying Trinity Rescue Kit..." mcdmount trk cp -r "${MNT}"/trk/trk3 "${WORK}"/ #TRK files - mkdir "${WORK}"/boot/trinity - cp "${MNT}"/trk/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu - cp "${MNT}"/trk/kernel.trk "${WORK}"/boot/trinity/kernel.trk - cp "${MNT}"/trk/initrd.trk "${WORK}"/boot/trinity/initrd.trk - cp "${MNT}"/trk/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo - umcdmount trk + if [ ! -f "${MNT}"/trk/disableautorun.exe ];then + echo New Build Detected + mkdir "${WORK}"/boot/trinity + cp "${MNT}"/trk/isolinux/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu + cp "${MNT}"/trk/isolinux/kernel.trk "${WORK}"/boot/trinity/kernel.trk + cp "${MNT}"/trk/isolinux/initrd.trk "${WORK}"/boot/trinity/initrd.trk + cp "${MNT}"/trk/isolinux/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo + else + echo Old Build Detected + mkdir "${WORK}"/boot/trinity + cp "${MNT}"/trk/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu + cp "${MNT}"/trk/kernel.trk "${WORK}"/boot/trinity/kernel.trk + cp "${MNT}"/trk/initrd.trk "${WORK}"/boot/trinity/initrd.trk + cp "${MNT}"/trk/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo + fi + + umcdmount trk fi elif [ $1 = writecfg ];then if [ -f trk.iso ];then From 4041a2a02fac8ff94981fee53324bb08f732042e Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 10 Aug 2019 16:18:46 -0500 Subject: [PATCH 27/38] Change spaces to tabs; update version in header --- plugins/trk.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/trk.sh b/plugins/trk.sh index eefcfe4..7aa87c3 100755 --- a/plugins/trk.sh +++ b/plugins/trk.sh @@ -2,9 +2,9 @@ set -e . "${MCDDIR}"/functions.sh #Trinity Rescue Kit plugin for multicd.sh -#version 20150622+ +#version 20190810 #edited to fit newer version of trk -#Copyright (c) 2015 Isaac Schemm +#Copyright (c) 2015-2019 Isaac Schemm et al # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -32,26 +32,26 @@ elif [ $1 = scan ];then fi elif [ $1 = copy ];then if [ -f trk.iso ];then - echo "Copying Trinity Rescue Kit..." + echo "Copying Trinity Rescue Kit..." mcdmount trk cp -r "${MNT}"/trk/trk3 "${WORK}"/ #TRK files - if [ ! -f "${MNT}"/trk/disableautorun.exe ];then - echo New Build Detected - mkdir "${WORK}"/boot/trinity - cp "${MNT}"/trk/isolinux/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu - cp "${MNT}"/trk/isolinux/kernel.trk "${WORK}"/boot/trinity/kernel.trk - cp "${MNT}"/trk/isolinux/initrd.trk "${WORK}"/boot/trinity/initrd.trk - cp "${MNT}"/trk/isolinux/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo - else - echo Old Build Detected - mkdir "${WORK}"/boot/trinity - cp "${MNT}"/trk/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu - cp "${MNT}"/trk/kernel.trk "${WORK}"/boot/trinity/kernel.trk - cp "${MNT}"/trk/initrd.trk "${WORK}"/boot/trinity/initrd.trk - cp "${MNT}"/trk/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo - fi - - umcdmount trk + if [ ! -f "${MNT}"/trk/disableautorun.exe ];then + echo New Build Detected + mkdir "${WORK}"/boot/trinity + cp "${MNT}"/trk/isolinux/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu + cp "${MNT}"/trk/isolinux/kernel.trk "${WORK}"/boot/trinity/kernel.trk + cp "${MNT}"/trk/isolinux/initrd.trk "${WORK}"/boot/trinity/initrd.trk + cp "${MNT}"/trk/isolinux/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo + else + echo Old Build Detected + mkdir "${WORK}"/boot/trinity + cp "${MNT}"/trk/syslinux.cfg "${WORK}"/boot/isolinux/trk.menu + cp "${MNT}"/trk/kernel.trk "${WORK}"/boot/trinity/kernel.trk + cp "${MNT}"/trk/initrd.trk "${WORK}"/boot/trinity/initrd.trk + cp "${MNT}"/trk/bootlogo.jpg "${WORK}"/boot/isolinux/trklogo.jpg #Boot logo + fi + + umcdmount trk fi elif [ $1 = writecfg ];then if [ -f trk.iso ];then From a3766e98546966ae506f3affec6083a1b9bc6092 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 2 Nov 2019 15:24:10 -0500 Subject: [PATCH 28/38] Add Bodhi Linux plugin (redirect to capser plugin) --- plugins/bodhi.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 plugins/bodhi.sh diff --git a/plugins/bodhi.sh b/plugins/bodhi.sh new file mode 100755 index 0000000..c60ebc8 --- /dev/null +++ b/plugins/bodhi.sh @@ -0,0 +1,8 @@ +#!/bin/sh +#Bodhi Linux plugin for multicd.sh +#https://www.bodhilinux.com/ +#version 20191102 +if [ $1 = links ];then + echo "bodhi-*-32.iso bodhilinux.casper.iso Bodhi_Linux_(*)" + echo "bodhi-*-64.iso bodhilinux.casper.iso Bodhi_Linux_(*)" +fi From b974b8fab5364bbbdc0cf3197b950d152b342006 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 2 Nov 2019 15:24:31 -0500 Subject: [PATCH 29/38] Bugfix (workaround) for when Hiren's (with /boot/memtest.exe) is included when running on Cygwin --- multicd.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multicd.sh b/multicd.sh index 0f4d5bd..fa8e84f 100755 --- a/multicd.sh +++ b/multicd.sh @@ -10,8 +10,8 @@ PATH=$PATH:$MCDDIR:$MCDDIR/plugins . functions.sh . downloader.sh -MCDVERSION="20190303" -#multicd.sh March 3, 2019 +MCDVERSION="20191102" +#multicd.sh November 2, 2019 #Copyright (c) 2019 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -458,7 +458,7 @@ if $MEMTEST;then rm memtestver fi if [ -f memtest ] && [ -f memtestver ] && [ "$(wc -c memtest)" != "0" ];then - cp memtest "${WORK}"/boot/memtest + cp memtest "${WORK}"/boot/memtest || true else echo "Downloading memtest86+ 5.01 from memtest.org..." if $VERBOSE;then @@ -467,7 +467,7 @@ if $MEMTEST;then wget -qO- http://www.memtest.org/download/5.01/memtest86+-5.01.bin.gz|gzip -cd>memtest fi if [ -f memtest ] && [ "$(wc -c memtest)" != "0 memtest" ];then - cp memtest "${WORK}"/boot/memtest + cp memtest "${WORK}"/boot/memtest || true echo 'v5.01' > memtestver else echo "Download of memtest failed." From 97ebc6837beffca21963a78bb953f3a1e13f8fe1 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 2 Nov 2019 16:09:37 -0500 Subject: [PATCH 30/38] Add Parrot OS plugin (redirect to debian) --- plugins/parrot.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 plugins/parrot.sh diff --git a/plugins/parrot.sh b/plugins/parrot.sh new file mode 100755 index 0000000..02ea659 --- /dev/null +++ b/plugins/parrot.sh @@ -0,0 +1,7 @@ +#!/bin/sh +#Parrot OS plugin for multicd.sh +#https://parrotlinux.org/ +#version 20191102 +if [ $1 = links ];then + echo "Parrot-*_x64.iso parrot.debian.iso Parrot_(*)" +fi From c898c459b72b0451f29c1faf85c0ca3fae4c8cbd Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sun, 3 Nov 2019 12:49:09 -0600 Subject: [PATCH 31/38] (#77) Fix old versions of Clonezilla --- plugins/clonezilla.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/clonezilla.sh b/plugins/clonezilla.sh index dd849d0..e4e3213 100755 --- a/plugins/clonezilla.sh +++ b/plugins/clonezilla.sh @@ -52,7 +52,7 @@ elif [ $1 = copy ];then echo "Copying Clonezilla ($i)..." BASENAME=$(echo $i|sed -e 's/\.iso//g') mcdmount $BASENAME - cp "${MNT}"/$BASENAME/*linux/ocswp.png "${WORK}"/boot/isolinux/ocswp.png #Boot menu logo + cp "${MNT}"/$BASENAME/*linux/ocswp.png "${WORK}"/boot/isolinux/ocswp.png || true #Boot menu logo cp -r "${MNT}"/$BASENAME/live "${WORK}"/boot/$BASENAME #Another Debian Live-based ISO cp "${MNT}"/$BASENAME/Clonezilla-Live-Version "${WORK}"/boot/$BASENAME #PDV Clonezilla-Live-Version file cp "${MNT}"/$BASENAME/GPL "${WORK}"/boot/$BASENAME #PDV GPL file From c489051cc15ea84a0a61406a953b531b58808129 Mon Sep 17 00:00:00 2001 From: Azhar Ahmed <49714602+ahmedazhar05@users.noreply.github.com> Date: Fri, 7 Jan 2022 00:42:25 +0530 Subject: [PATCH 32/38] updated syslinux directory location --- plugins/arch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/arch.sh b/plugins/arch.sh index 53f1b9a..b0820fe 100755 --- a/plugins/arch.sh +++ b/plugins/arch.sh @@ -38,6 +38,7 @@ elif [ $1 = copy ];then echo "Copying Arch Linux..." mcdmount arch mcdcp -r -T "${MNT}"/arch/arch "${WORK}"/arch + mcdcp -r "${MNT}"/arch/syslinux "${WORK}"/arch/boot/ umcdmount arch fi elif [ $1 = writecfg ];then From b2866e06b9a41b4aea89e6f22bd75ae8643dab99 Mon Sep 17 00:00:00 2001 From: Azhar Ahmed <49714602+ahmedazhar05@users.noreply.github.com> Date: Fri, 7 Jan 2022 00:43:29 +0530 Subject: [PATCH 33/38] added new puppy linux (Fossa) version to the list --- plugins/puppy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/puppy.sh b/plugins/puppy.sh index 1450ece..86c81e7 100755 --- a/plugins/puppy.sh +++ b/plugins/puppy.sh @@ -36,6 +36,7 @@ if [ $1 = links ];then echo "racy-*.iso racy.puppy.iso none" echo "slacko-*.iso slacko.puppy.iso Slacko_*" echo "tahr-*.iso tahr.puppy.iso Tahrpup_*" + echo "fossa-*.iso fossa.puppy.iso Fossapup_*" elif [ $1 = scan ];then if $(puppyExists);then for i in *.puppy.iso;do echo "Puppy Linux" From e8bf938ed32885d23256c1584b5b598733854504 Mon Sep 17 00:00:00 2001 From: Alfonso Date: Fri, 29 Jul 2022 13:26:20 +0200 Subject: [PATCH 34/38] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0d4df7..aa780e1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ MultiCD ======== -Official site: http://multicd.us -Updates are posted at http://blog.multicd.us and http://twitter.com/multicd +Official site: [https://www.lakora.us/multicd/](https://www.lakora.us/multicd/) + +Updates are posted at http://twitter.com/multicd From 169c9ee96794bcfe5dd7e390328436566112a1cb Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 19 Nov 2022 15:43:40 -0600 Subject: [PATCH 35/38] (#85) Update casper.sh for Zorin 16.2 --- plugins/casper.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/casper.sh b/plugins/casper.sh index 588e32d..942c657 100755 --- a/plugins/casper.sh +++ b/plugins/casper.sh @@ -2,8 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Casper plugin for multicd.sh -#version 20121113 -#Copyright (c) 2012 Isaac Schemm +#version 20221119 +#Copyright (c) 2022 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -84,8 +84,10 @@ elif [ $1 = copy ];then UBUCFG=text.cfg elif [ -f "${MNT}"/$BASENAME/isolinux/txt.cfg ];then UBUCFG=txt.cfg + elif [ -f "${MNT}"/$BASENAME/isolinux/menuentries.cfg ];then + UBUCFG=menuentries.cfg #e.g. Zorin else - UBUCFG=isolinux.cfg #For custom-made live CDs like Weaknet and Zorin + UBUCFG=isolinux.cfg fi cp "${MNT}"/$BASENAME/isolinux/splash.* \ "${MNT}"/$BASENAME/isolinux/bg_redo.png \ From 43a6188895d14f644bad91307656eb6c0588b5a4 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 19 Nov 2022 15:44:29 -0600 Subject: [PATCH 36/38] (#9) Update zorin.sh --- plugins/zorin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/zorin.sh b/plugins/zorin.sh index 93e0d2d..f5d502a 100755 --- a/plugins/zorin.sh +++ b/plugins/zorin.sh @@ -2,7 +2,8 @@ set -e . "${MCDDIR}"/functions.sh #Zorin OS plugin for multicd.sh -#version 20161022 +#version 20221119 if [ $1 = links ];then echo "zorin-os-*.iso zorin.casper.iso Zorin_OS" + echo "Zorin-OS-*.iso zorin.casper.iso Zorin_OS" fi From a02cfaa7a8f139b0d83adbd3cb5bb5b68f63ee49 Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 19 Nov 2022 15:47:47 -0600 Subject: [PATCH 37/38] Remove memtest option --- multicd.sh | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/multicd.sh b/multicd.sh index fa8e84f..17adb1c 100755 --- a/multicd.sh +++ b/multicd.sh @@ -113,7 +113,7 @@ fi # ARGS=$(getopt cdmviVo:tw "$@") #fi export MD5=false -export MEMTEST=true +export MEMTEST=false export VERBOSE=true export INTERACTIVE=false export DEBUG=false @@ -126,7 +126,6 @@ for i do -c) shift;export MD5=true;; -d) shift;export DEBUG=true;; -i) shift;export INTERACTIVE=true;; - -m) shift;export MEMTEST=false;; -o) shift;export OUTPUT="$1";shift;; -t) shift;export TESTISO=true;; -v) shift;export VERBOSE=true;; @@ -227,9 +226,6 @@ done if [ -f grub.exe ];then echo "GRUB4DOS" fi -if $MEMTEST;then - echo "Memtest86+" -fi if [ $EXTRACTOR == file-roller ];then FRVER=$(file-roller --version 2>/dev/null|awk '{print $2}'|head -c 3) @@ -452,29 +448,6 @@ cp /tmp/syslinux-*/bios/com32/lib/libcom32.c32 "${WORK}"/boot/isolinux/ chmod -R +w "$WORK/boot/isolinux" rm -r /tmp/syslinux-*/ -if $MEMTEST;then - if [ -f memtest ] && [ -f memtestver ] && [ "$(cat memtestver)" = "v4.20" ];then - rm memtest - rm memtestver - fi - if [ -f memtest ] && [ -f memtestver ] && [ "$(wc -c memtest)" != "0" ];then - cp memtest "${WORK}"/boot/memtest || true - else - echo "Downloading memtest86+ 5.01 from memtest.org..." - if $VERBOSE;then - wget -O- http://www.memtest.org/download/5.01/memtest86+-5.01.bin.gz|gzip -cd>memtest - else - wget -qO- http://www.memtest.org/download/5.01/memtest86+-5.01.bin.gz|gzip -cd>memtest - fi - if [ -f memtest ] && [ "$(wc -c memtest)" != "0 memtest" ];then - cp memtest "${WORK}"/boot/memtest || true - echo 'v5.01' > memtestver - else - echo "Download of memtest failed." - fi - fi -fi - echo "Writing isolinux.cfg..." ##BEGIN ISOLINUX MENU CODE## @@ -574,14 +547,6 @@ com32 menu.c32 append games.cfg">>"${WORK}"/boot/isolinux/isolinux.cfg fi #END GAMES ENTRY# - -#BEGIN MEMTEST ENTRY# -if [ -f "${WORK}"/boot/memtest ];then -echo "label memtest -menu label ^Memtest86+ $(cat memtestver) -kernel /boot/memtest">>"${WORK}"/boot/isolinux/isolinux.cfg -fi -#END MEMTEST ENTRY# ##END ISOLINUX MENU CODE## if [ $GAMES = 1 ];then From 3a490c16008db39600427a1dba51b77b15b62b4f Mon Sep 17 00:00:00 2001 From: Isaac Schemm Date: Sat, 19 Nov 2022 15:50:25 -0600 Subject: [PATCH 38/38] Update multicd.sh --- multicd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multicd.sh b/multicd.sh index 17adb1c..fe2a024 100755 --- a/multicd.sh +++ b/multicd.sh @@ -10,9 +10,9 @@ PATH=$PATH:$MCDDIR:$MCDDIR/plugins . functions.sh . downloader.sh -MCDVERSION="20191102" -#multicd.sh November 2, 2019 -#Copyright (c) 2019 Isaac Schemm +MCDVERSION="20221119" +#multicd.sh November 19, 2022 +#Copyright (c) 2022 Isaac Schemm # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal