Skip to content

Instantly share code, notes, and snippets.

@t94xr
Last active December 8, 2021 18:58
Show Gist options
  • Save t94xr/4d48bacc0a0267035fc6caf1817a288c to your computer and use it in GitHub Desktop.
Save t94xr/4d48bacc0a0267035fc6caf1817a288c to your computer and use it in GitHub Desktop.
/etc/grub.d/40_custom file on my Dell Precision M3800
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#
# ZORIN 16 PRO x64
# Boots fine, no issues.
#
menuentry "Zorin OS 16 x64 R1" {
set isofile="/iso/ZorinOS16-x64-R1.iso"
rmmod tpm
loopback loop (hd1,2)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
initrd (loop)/casper/initrd.lz4
}
# CAINE 11
# Tries to mount /dev/sda2 as /cdrom and goes no further.
#
menuentry "CAINE 11" {
set isofile="/iso/caine11.0.iso"
rmmod tpm
loopback loop (hd1,2)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram nomdmonddf nomdmonisw
initrd (loop)/casper/initrd.gz
}
# Tails OS
# Boots fine, no issues.
#
menuentry "Tails OS"{
set isofile="/iso/tails-amd64-4.22.iso"
loopback loop (hd1,2)$isofile
linux (loop)/live/vmlinuz boot=live config nopersistence noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash noautologin module=Tails slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 quiet findiso=$isofile
initrd (loop)/live/initrd.img
}
# Kali Linux
# Boots fine, no issues.
#
menuentry "kali-linux-2021.2-live-amd64" {
insmod ext2
set isofile="/iso/kali-linux-2021.2-live-amd64.iso"
loopback loop (hd1,2)$isofile
linux (loop)/live/vmlinuz boot=live findiso=$isofile
initrd (loop)/live/initrd.img
}
# BlackArch
# Boots fine, no issues.
#
set isodir="/iso"
menuentry "BlackArch Linux 2021.09.01 (x86-64) - root:blackarch" --class dvd {
set isofile="/iso/blackarch-linux-full-2021.09.01-x86_64.iso"
set dri="free"
probe -u $root --set=abc
set pqr="/dev/disk/by-uuid/$abc"
loopback loop (hd1,2)$isofile
linux (loop)/blackarch/boot/x86_64/vmlinuz-linux img_dev=$pqr img_loop=$isofile driver=$dri tz=Pacific/Auckland lang=en_US keytable=US nouveau.modeset=0 rd.driver.blacklist=nouveau nouveau.blacklist=yes archisobasedir=blackarch cow_spacesize=60%
initrd (loop)/blackarch/boot/intel-ucode.img (loop)/blackarch/boot/amd-ucode.img (loop)/blackarch/boot/x86_64/initramfs-linux.img
}
# PartedMagic
# Boots fine, no issues.
#
menuentry "Parted Magic" {
set isofile="/iso/pmagic_2021_08_17.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile load_ramdisk=1 boot=live mem=32G
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m.img
}
# SystemRescue
# Boots fine, no issues.
#
menuentry 'System Rescue CD' {
set isofile='/iso/systemrescue-8.05-amd64.iso'
probe -u $root --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
loopback loop (hd1,2)$isofile
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
}
# Parrot Security
# Fails to boot
#
menuentry "Parrot Security" {
set isofile="/iso/Parrot-security-4.10_amd64.iso"
probe -u $root --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
loopback loop (hd1,2)$isofile
linux (loop)/live/vmlinuz iso-scan/filename=$isofile boot=live hostname=parrot quiet splash components noautomount nouveau.modeset=0 nvidia.modeset=0 radeon.modeset=0 vga=normal
initrd (loop)/live/initrd.img
}
# KNOPPIX LIVE DVD v9.1
#
#
menuentry "KNOPPIX_V9.1DVD-2021-01-25-EN" {
set isofile="/iso/KNOPPIX_V9.1DVD-2021-01-25-EN.iso"
loopback loop (hd1,2)$isofile
linux (loop)/boot/isolinux/linux64 initrd=minirt.gz init=/etc/init bootfrom=/dev/sda2$isofile BOOT_IMAGE=knoppix knoppix_dir=/KNOPPIX toram noimage noswap noprompt xmodule=nouveau screen=1920x1080
initrd (loop)/boot/isolinux/minirt.gz
boot
}
menuentry "Reboot" { reboot }
menuentry "Halt" { halt }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment