Skip to content

Instantly share code, notes, and snippets.

@ethanwilloner
Forked from aguslr/README.md
Created February 5, 2014 08:42
Show Gist options
  • Select an option

  • Save ethanwilloner/8819472 to your computer and use it in GitHub Desktop.

Select an option

Save ethanwilloner/8819472 to your computer and use it in GitHub Desktop.
# MultiBoot USB with Grub2
# http://forums.kali.org/showthread.php?1025-Grub2-Loop-Boot-Solution
# http://gist.github.com/Thermionix/1840478
# http://www.circuidipity.com/multi-boot-usb.html
# http://www.panticz.de/MultiBootUSB
# Config for GNU GRand Unified Bootloader (GRUB)
# /boot/grub/grub.cfg
insmod font
if loadfont /boot/grub/unicode.pf2 ; then
if keystatus --shift ; then true ; else
insmod gfxterm
insmod vbe
insmod vga
set gfxmode=auto
set gfxpayload=auto
terminal_output gfxterm
if terminal_output gfxterm ; then true ; else
terminal gfxterm
fi
fi
fi
# Timeout for menu
set timeout=30
# Default boot entry
set default=0
# Menu Colours
set menu_color_normal=white/black
set menu_color_highlight=white/light-green
export menu_color_normal
export menu_color_highlight
set drive_label=multiboot
set isopath=/isos
export drive_label
export isopath
# Boot from disk by default
menuentry "Boot from First HD (default)" {
chainloader +1
}
# Boot ISOs
submenu "Kali Linux ->" {
set isofile="$isopath/kali-linux-1.0.6-i386.iso"
search --set -f $isofile
loopback loop $isofile
menuentry "Live (686-pae)" {
bootoptions="findiso=$isofile boot=live noconfig=sudo username=root hostname=kali"
linux (loop)/live/vmlinuz $bootoptions
initrd (loop)/live/initrd.img
}
menuentry "Live (686-pae failsafe)" {
bootoptions="findiso=$isofile boot=live config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal"
linux (loop)/live/vmlinuz $bootoptions
initrd (loop)/live/initrd.img
}
menuentry "Live (forensic mode)" {
bootoptions="findiso=$isofile boot=live noconfig=sudo username=root hostname=kali noswap noautomount"
linux (loop)/live/vmlinuz $bootoptions
initrd (loop)/live/initrd.img
}
}
submenu "Parted Magic ->" {
set isofile="$isopath/pmagic_2013_08_01.iso"
loopback loop $isofile
menuentry "Default settings 32 (Runs from RAM)" {
bootoptions="iso_filename=$isofile edd=on vga=normal vmalloc=384MiB"
linux (loop)/pmagic/bzImage $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Default settings 64 (Runs from RAM)" {
bootoptions="iso_filename=$isofile edd=on vga=normal vmalloc=384MiB"
linux (loop)/pmagic/bzImage64 $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Live with default settings 32" {
bootoptions="iso_filename=$isofile edd=on vga=normal boot=live eject=no vmalloc=384MiB"
linux (loop)/pmagic/bzImage $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Live with default settings 64" {
bootoptions="iso_filename=$isofile edd=on vga=normal boot=live eject=no vmalloc=384MiB"
linux (loop)/pmagic/bzImage64 $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Failsafe Settings 32" {
bootoptions="iso_filename=$isofile boot=live edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal nopcmcia noscsi nogpm consoleboot nosmart nosshd nosound max_loop=256 no_iscsi vmalloc=384MiB loglevel=9 nolapic"
linux (loop)/pmagic/bzImage $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Failsafe Settings 64" {
bootoptions="iso_filename=$isofile boot=live edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal nopcmcia noscsi nogpm consoleboot nosmart nosshd nosound max_loop=256 no_iscsi vmalloc=384MiB loglevel=9 nolapic"
linux (loop)/pmagic/bzImage64 $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Plop Boot Manager" {
bootoptions=""
linux16 (loop)/boot/plpbt/plpbt.bin $bootoptions
}
submenu "Extras Menu ->" {
menuentry "Hardware Detection Tool (HDT)" {
bootoptions=""
linux16 (loop)/boot/syslinux/memdisk $bootoptions
initrd16 (loop)/boot/syslinux/hdt.gz
}
menuentry "Memtest86+" {
bootoptions=""
linux16 (loop)/boot/syslinux/memtest $bootoptions
}
menuentry "Super Grub Disk" {
bootoptions=""
linux16 (loop)/boot/syslinux/memdisk $bootoptions
initrd16 (loop)/boot/sgd/sgd.gz
}
menuentry "Super Grub2 Disk" {
bootoptions=""
linux16 (loop)/boot/syslinux/memdisk $bootoptions
initrd16 (loop)/boot/sgd/sgd2.gz
}
menuentry "MHDD" {
bootoptions=""
linux16 (loop)/boot/syslinux/memdisk $bootoptions
initrd16 (loop)/boot/mhdd/mhdd.gz
}
menuentry "Clonezilla 32" {
bootoptions="iso_filename=$isofile edd=on vga=normal vmalloc=384MiB clonezilla=yes"
linux (loop)/pmagic/bzImage $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Clonezilla 64" {
bootoptions="iso_filename=$isofile edd=on vga=normal vmalloc=384MiB clonezilla=yes"
linux (loop)/pmagic/bzImage64 $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Nwipe 32" {
bootoptions="iso_filename=$isofile edd=on vga=normal vmalloc=384MiB nwipe=yes"
linux (loop)/pmagic/bzImage $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Nwipe 64" {
bootoptions="iso_filename=$isofile edd=on vga=normal vmalloc=384MiB nwipe=yes"
linux (loop)/pmagic/bzImage64 $bootoptions
initrd (loop)/pmagic/initrd.img
}
menuentry "Chntpw" {
bootoptions="vga=1 loglevel=0 initrd=/boot/chntpw/scsi.cgz"
linux (loop)/boot/chntpw/vmlinuz $bootoptions
initrd (loop)/boot/chntpw/initrd.cgz
}
}
}
submenu "System Rescue CD ->" {
set isofile="$isopath/systemrescuecd-x86-4.0.0.iso"
loopback loop $isofile
menuentry "Default boot options 32bit" {
bootoptions="isoloop=$isofile scandelay=1"
linux (loop)/isolinux/rescue32 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Default boot options 64bit" {
bootoptions="isoloop=$isofile scandelay=1"
linux (loop)/isolinux/rescue64 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "All files cached to memory (docache) 32bit" {
bootoptions="isoloop=$isofile docache"
linux (loop)/isolinux/rescue32 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "All files cached to memory (docache) 64bit" {
bootoptions="isoloop=$isofile docache"
linux (loop)/isolinux/rescue64 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Framebuffer console in high resolution 32bit" {
bootoptions="isoloop=$isofile nomodeset vga=791"
linux (loop)/isolinux/rescue32 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Framebuffer console in high resolution 64bit" {
bootoptions="isoloop=$isofile nomodeset vga=791"
linux (loop)/isolinux/rescue64 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Alternative kernel with default boot options 32bit" {
bootoptions="isoloop=$isofile scandelay=1"
linux (loop)/isolinux/altker32 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Alternative kernel with default boot options 64bit" {
bootoptions="isoloop=$isofile scandelay=1"
linux (loop)/isolinux/altker64 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Directly start the graphical environment 32bit" {
bootoptions="isoloop=$isofile dostartx"
linux (loop)/isolinux/rescue32 $bootoptions
initrd (loop)/isolinux/initram.igz
}
menuentry "Directly start the graphical environment 64bit" {
bootoptions="isoloop=$isofile dostartx"
linux (loop)/isolinux/rescue64 $bootoptions
initrd (loop)/isolinux/initram.igz
}
submenu "System Tools ->" {
menuentry "MEMTEST: Memory test using Memtest86+" {
bootoptions="-"
linux16 (loop)/bootdisk/memtestp $bootoptions
}
menuentry "NTPASSWD: Reset or edit Windows passwords" {
bootoptions="rw vga=1 initrd=/ntpasswd/scsi.cgz"
linux (loop)/ntpasswd/vmlinuz $bootoptions
initrd (loop)/ntpasswd/initrd.cgz
}
menuentry "SGD: Super Grub2 Disk" {
bootoptions="floppy raw"
linux16 (loop)/isolinux/memdisk $bootoptions
initrd16 (loop)/bootdisk/grubdisk.img
}
menuentry "FreeDOS: Clone of the MSDOS Operating System" {
bootoptions="floppy"
linux16 (loop)/isolinux/memdisk $bootoptions
initrd16 (loop)/bootdisk/freedos.img
}
menuentry "HDT: recent hardware diagnostics tool" {
bootoptions="floppy"
linux16 (loop)/isolinux/memdisk $bootoptions
initrd16 (loop)/bootdisk/hdt.img
}
menuentry "AIDA: old hardware diagnostics tool" {
bootoptions="floppy"
linux16 (loop)/isolinux/memdisk $bootoptions
initrd16 (loop)/bootdisk/aida.img
}
menuentry "GAG: Graphical Boot Manager" {
bootoptions="floppy"
linux16 (loop)/isolinux/memdisk $bootoptions
initrd16 (loop)/bootdisk/gag.img
}
menuentry "DBAN: erase all data from the disk" {
bootoptions="nuke=dwipe silent"
linux16 (loop)/bootdisk/dban.bzi $bootoptions
}
menuentry "MHDD: Low-level Hard Drive diagnostic tool" {
bootoptions="floppy"
linux16 (loop)/isolinux/memdisk $bootoptions
initrd16 (loop)/bootdisk/mhdd.img
}
}
}
submenu "TAILS ->" {
set isofile="$isopath/tails-i386-0.21.iso"
loopback loop $isofile
menuentry "Live" {
bootoptions="findiso=$isofile boot=live config live-media=removable nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails quiet"
linux (loop)/live/vmlinuz $bootoptions
initrd (loop)/live/initrd.img
}
menuentry "Live (failsafe)" {
bootoptions="findiso=$isofile boot=live config live-media=removable nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal"
linux (loop)/live/vmlinuz $bootoptions
initrd (loop)/live/initrd.img
}
menuentry "Live 686-pae" {
bootoptions="findiso=$isofile boot=live config live-media=removable nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails quiet"
linux (loop)/live/vmlinuz2 $bootoptions
initrd (loop)/live/initrd2.img
}
menuentry "Live 686-pae (failsafe)" {
bootoptions="findiso=$isofile boot=live config live-media=removable nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal"
linux (loop)/live/vmlinuz2 $bootoptions
initrd (loop)/live/initrd2.img
}
}
# Grub options
submenu "GRUB2 options ->" {
menuentry "List devices/partitions" {
ls -l
sleep --interruptible 9999
}
menuentry "Enable GRUB2's LVM support" {
insmod lvm
}
menuentry "Enable GRUB2's RAID support" {
insmod dm_nv
insmod mdraid09_be
insmod mdraid09
insmod mdraid1x
insmod raid5rec
insmod raid6rec
}
menuentry "Enable GRUB2's PATA support (to work around BIOS bugs/limitations)" {
insmod ata
update_paths
}
menuentry "Enable GRUB2's USB support *experimental*" {
insmod ohci
insmod uhci
insmod usbms
update_paths
}
menuentry "Mount encrypted volumes (LUKS and geli)" {
insmod luks
insmod geli
cryptomount -a
}
menuentry "Enable serial terminal" {
serial
terminal_input --append serial
terminal_output --append serial
}
}
# Other options
submenu "Other >" {
menuentry "Test memory with Memtest86+" {
linux16 /boot/memtest86+-4.20.bin
}
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment