Created
June 8, 2019 09:34
-
-
Save TheRinger/262ce9b0e6679027b4a9238d41c513f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set locale_dir=$prefix/locale | |
set icondir=$prefix/themes/icons | |
export theme | |
insmod png | |
insmod font | |
insmod part_msdos | |
insmod ext2 | |
insmod loopback | |
insmod iso9660 | |
menuentry "<-- [M] Back Main menu" --class arrow_left --hotkey="m"{ | |
configfile "${prefix}/grub.cfg" | |
} | |
######################## | |
set centOSname="CentOS-7-x86_64-LiveGNOME-1708" | |
set isoFilename="${centOSname}.iso" | |
# Name of USB | |
set isolabel="USB-BOOT" | |
search --no-floppy --file --set=root /ISO/${isoFilename} | |
if [ -e "/ISO/${isoFilename}" ]; then | |
menuentry "${isoFilename}" { | |
set isofile="/ISO/${isoFilename}" | |
echo "Loading ${isofile}..." | |
insmod iso9660 | |
loopback loop ${isofile} | |
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=${centOSname} rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${isofile} | |
initrd (loop)/isolinux/initrd0.img | |
} | |
fi | |
# Arch Linux: | |
if [ -e "/ISO/archlinux.iso" ]; then | |
menuentry "Arch Linux (x86_64)" --class arch { | |
echo "Please wait..." | |
probe -u $root --set=rootuuid | |
set imgdevpath="/dev/disk/by-uuid/$rootuuid" | |
set isofile="/ISO/archlinux.iso" | |
loopback loop $isofile | |
linux (loop)/arch/boot/x86_64/vmlinuz archisodevice=/dev/loop0 img_dev=$imgdevpath img_loop=$isofile | |
initrd (loop)/arch/boot/x86_64/archiso.img | |
} | |
fi | |
# Android | |
if [ -e "/ISO/android-x86/ramdisk.img" ]; then | |
menuentry "Android OS (extracted)" --class icon-android { | |
echo "Please wait..." | |
if [ -e "/ISO/android-x86/system.sfs" ]; then | |
search --file --no-floppy --set=root /ISO/android-x86/system.sfs | |
fi | |
if [ -e "/ISO/android-x86/system.img" ]; then | |
search --file --no-floppy --set=root /ISO/android-x86/system.img | |
fi | |
linux /ISO/android-x86/kernel root=/dev/ram0 androidboot.hardware=android_x86 quiet SRC= DATA= | |
initrd /ISO/android-x86/initrd.img | |
} | |
fi | |
# Backbox: | |
search --no-floppy --file --set=root /ISO/backbox.iso | |
if [ -e "iso/backbox.iso" ]; then | |
set isoname="backbox.iso" | |
set isofile="/ISO/${isoname}" | |
loopback loop $isofile | |
if [ "${grub_platform}" == "efi" ]; then | |
menuentry "Install Backbox > backbox.iso" --class icon-backbox { | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linuxefi (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject only-ubiquity | |
initrdefi (loop)/casper/initrd.gz | |
} | |
fi | |
if [ "${grub_platform}" == "pc" ]; then | |
menuentry "Backbox Live ISO > backbox.iso" --class icon-backbox { | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject | |
initrd (loop)/casper/initrd.gz | |
} | |
fi | |
fi | |
# Centos: | |
search --no-floppy --file --set=root /ISO/centos.iso | |
if [ -e "/ISO/centos.iso" ]; then | |
menuentry "Install CentOS 7 (amd64)" --class os_centos { | |
echo "Please wait..." | |
set isofile="/ISO/centos.iso" | |
loopback loop $isofile | |
linuxefi (loop)/images/pxeboot/vmlinuz boot=images iso-scan/filename=$isofile inst.stage2=hd:LABEL=CentOS/x207/x20x86_64 | |
initrdefi (loop)/images/pxeboot/initrd.img | |
} | |
fi | |
# Debian: | |
search --no-floppy --file --set=root /ISO/debian.iso | |
if [ -e /ISO/debian.iso ]; then | |
menuentry "Debian > debian.iso" --class os_debian { | |
set isoname="debian.iso" | |
set isofile="/ISO/${isoname}" | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/live/vmlinuz boot=live findiso=${isofile} config quiet splash | |
initrd (loop)/live/initrd.img | |
} | |
fi | |
# Ubuntu: | |
search --no-floppy --file --set=root /ISO/Ubuntu.iso | |
if [ -e /ISO/Ubuntu.iso ]; then | |
menuentry "Ubuntu 64 > ubuntu.iso" --class os_ubuntu { | |
set isoname="ubuntu.iso" | |
set isofile="/ISO/${isoname}" | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash | |
initrd (loop)/casper/initrd.lz | |
} | |
fi | |
# System Rescue CD: | |
search --no-floppy --file --set=root /ISO/sysrescd.iso | |
if [ -e /ISO/sysrescd.iso ]; then | |
menuentry "System RescueCD 64 > sysrescd.iso " --class os_gentoo { | |
set isoname="sysrescd.iso" | |
set isofile="/ISO/${isoname}" | |
if cpuid -l; then | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/isolinux/rescue64 isoloop=${isofile} docache | |
initrd (loop)/isolinux/initram.igz | |
} | |
fi | |
# Linux Mint: | |
search --no-floppy --file --set=root /ISO/linuxmint.iso | |
if [ -e /ISO/linuxmint.iso ]; then | |
menuentry "Linux Mint > Linuxmint.iso" --class os_linuxmint { | |
set isoname="linuxmint.iso" | |
set isofile="/ISO/${isoname}" | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${isofile} quiet splash | |
initrd (loop)/casper/initrd.lz | |
} | |
fi | |
# Gparted: | |
search --no-floppy --file --set=root /ISO/gparted.iso | |
if [ -e /ISO/gparted.iso ]; then | |
menuentry "GParted > gparted.iso" --class icon-gparted { | |
set isoname="gparted.iso" | |
set isofile="/ISO/${isoname}" | |
echo "Using ${isoname}..." | |
loopback loop $isofile | |
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components noswap nosplash noprompt ip=frommedia gfxpayload=1024x768x16,1024x768 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.blacklist=yes toram=filesystem.squashfs findiso=${isofile} | |
initrd (loop)/live/initrd.img | |
} | |
fi | |
# Parted Magic: | |
search --no-floppy --file --set=root /ISO/pmagic.iso | |
if [ -e /ISO/pmagic.iso ]; then | |
menuentry "Parted Magic 64-bit" --class icon-pmagic { | |
set isoname="pmagic.iso" | |
set isofile="/ISO/${isoname}" | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/pmagic/bzImage64 iso_filename=$isofile directory=boot edd=on vga=normal | |
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img | |
} | |
menuentry "Parted Magic 32-bit" --class icon-pmagic { | |
set isoname="pmagic.iso" | |
set isofile="/ISO/${isoname}" | |
echo "Loading ${isofile}..." | |
loopback loop $isofile | |
linux (loop)/pmagic/bzImage iso_filename=$isofile directory=boot edd=on vga=normal | |
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m32.img | |
} | |
fi | |
# Kali Linux: | |
search --no-floppy --file --set=root /ISO/kali-linux.iso | |
if [ -e "/iso/kali-linux.iso" ]; then | |
menuentry "Live Kali Linux > kali-linux.iso" --class icon-kali { | |
set isoname="kali-linux.iso" | |
set isofile="/ISO/${isoname}" | |
loopback loop $isofile | |
bootoptions="findiso=$isofile boot=live username=root hostname=kali" | |
echo "Using ${isoname}..." | |
linux (loop)/live/vmlinuz $bootoptions | |
initrd (loop)/live/initrd.img | |
} | |
fi | |
if [ -e "/install/gtk/initrd.gz" ]; then | |
search --no-floppy --file --set=root /install/gtk/initrd.gz | |
menuentry "Kali Linux Extract Install" --class icon-kali { | |
search --no-floppy --file --set=root /boot/grub/kali.cfg | |
configfile /boot/grub/kali.cfg | |
} | |
fi | |
# Slackware: | |
search --no-floppy --file --set=root /ISO/slackware.iso | |
if [ -e "/ISO/slackware.iso" ]; then | |
menuentry "Slackware Live ISO (x86-64 UEFI)" --class os_slackware { | |
echo "Please wait..." | |
set isoname="slackware.iso" | |
set isofile="/ISO/${isoname}" | |
loopback loop $isofile | |
linux (loop)/kernels/huge.s/bzImage vga=normal load_ramdisk=1 prompt_ramdisk=0 ro printk.time=0 nomodeset SLACK_KERNEL=huge.s | |
initrd (loop)/isolinux/initrd.img | |
} | |
fi | |
# OpenSuse: | |
search --no-floppy --file --set=root /ISO/opensuse.iso | |
if [ -e "/ISO/opensuse.iso" ]; then | |
menuentry "OpenSuse Live ISO" --class os_opensuse { | |
echo "Please wait..." | |
set gfxpayload=keep | |
set isoname="opensuse.iso" | |
loopback loop $isofile | |
linux (loop)/boot/x86_64/loader/linux isofrom_device=$imgdevpath isofrom_system=$isofile LANG=en_US.UTF-8 | |
initrd (loop)/boot/x86_64/loader/initrd | |
} | |
fi | |
# Wifislax | |
search --no-floppy --file --set=root /ISO/wifislax.iso | |
if [ -e "/ISO/wifislax.iso" ]; then | |
menuentry "Wifislax With KDE Live ISO" --class wifislax { | |
echo "Please wait..." | |
set isofile="/ISO/wifislax.iso" | |
loopback loop $isofile | |
linux (loop)/boot/vmlinuz2 noload=000-Ker';'006-Xfce load=English from=$isofile autoexec=startx | |
initrd (loop)/boot/initrd.xz | |
} | |
menuentry "Wifislax64 With KDE Live ISO" --class wifislax { | |
echo "Please wait..." | |
set isofile="/ISO/wifislax.iso" | |
export isofile | |
search --set=root --file $isofile | |
loopback loop $isofile | |
linux (loop)/boot/vmlinuz livemedia=/dev/disk/by-uuid/$rootuuid:$isofile kbd=us kbd tz=US/Pacific tz locale=en_US.utf8 locate xkb= xkb rw nop iso-scan/filename=$isofile | |
initrd (loop)/boot/initrd.xz | |
} | |
fi | |
search --no-floppy --file --set=root /ISO/nst.iso --hint hd0,msdos2 | |
if [ -e "/ISO/nst.iso" ]; then | |
menuentry "Network Security Toolkit" --class nst { | |
echo "Please wait..." | |
set isofile="/ISO/nst.iso" | |
loopback loop $isofile | |
probe -u (loop) --set=loopuuid | |
set id=UUID=$loopuuid | |
linux (loop)/isolinux/vmlinuz0 root=live:$id rootfstype=auto ro rd.live.image rd.luks=0 rd.md=0 rd.dm=0 audit=0 systemd.unit=graphical.target nstrelocate=false iso-scan/filename=$isofile | |
initrd (loop)/isolinux/initrd0.img | |
} | |
fi | |
# Fedora: | |
search --no-floppy --file --set=root /ISO/Fedora.iso --hint hd0,msdos2 | |
if [ -e "/ISO/Fedora.iso" ]; then | |
menuentry "Fedora Workstation live ISO" --class fedora { | |
echo "Please wait..." | |
set isofile="/ISO/Fedora.iso" | |
loopback loop $isofile | |
probe -u (loop) --set=loopuuid | |
set id=UUID=$loopuuid | |
linux (loop)/isolinux/vmlinuz root=live:$id iso-scan/filename=$isofile rootfstype=auto ro rd.live.image xquiet nosplash rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset | |
initrd (loop)/isolinux/initrd.img | |
} | |
fi | |
menuentry "<-- [M] Back Main menu" --class arrow_left --hotkey="m"{ | |
configfile "${prefix}/grub.cfg" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment