Skip to content

Instantly share code, notes, and snippets.

@smoke
Created March 20, 2015 17:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smoke/47f5250b9e6f59a5d172 to your computer and use it in GitHub Desktop.
Save smoke/47f5250b9e6f59a5d172 to your computer and use it in GitHub Desktop.
Multiboot USB drive - Grub2 configurations for direct ISO boot
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
# Suggested Entries and the suggestor, if available, will also be noted.
set timeout=10
set default=0
set pager=1
## Gentoo things
function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod all_video
}
if loadfont ($root)/boot/grub/fonts/unicode.pf2 ; then
set gfxmode=1024x768
load_video
insmod gfxterm
set locale_dir=$prefix/locale
terminal_output gfxterm
insmod gettext
fi
terminal_output gfxterm
insmod gfxmenu
loadfont ($root)/boot/grub/themes/GenGrub/Sans-10.pf2
loadfont ($root)/boot/grub/themes/GenGrub/Sans-12.pf2
loadfont ($root)/boot/grub/themes/GenGrub/Sans-14.pf2
insmod png
set theme=($root)/boot/grub/themes/GenGrub/theme.txt
export theme
if [ x = x$bootlang ]; then
set bootlang=en_US
fi
if [ x = x$bootkeymap ]; then
set bootkeymap=us
fi
if [ x = x$acpi_opt ]; then
unset acpi_opt
fi
if [ x = x$modeset_opt ]; then
unset modeset_opt
fi
if [ x = x$noefi_opt ]; then
unset noefi_opt
fi
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
play 60 800 1
insmod part_gpt
menuentry 'Gentoo LiveDVD amd64 multilib ISO' --class gentoo {
set gfxpayload=keep
set isofile='/livedvd-amd64-multilib-20140826.iso'
loopback loop $isofile
echo "Language: $bootlang"
echo "Keyboard: $bootkeymap"
#echo 'Loading amd64-multilib 3.15.6 kernel'
linux (loop)/isolinux/gentoo root=/dev/ram0 init=/linuxrc aufs looptype=squashfs loop=/image.squashfs cdroot isoboot=$isofile vga=791 splash=silent,theme:default vconsole.keymap=$bootkeymap locale=$bootlang $modeset_opt $nox $acpi_opt console=tty1 quiet --
echo 'Loading initial ramdisk ...'
initrd (loop)/isolinux/gentoo.igz
}
menuentry "Gentoo Install Minimal AMD64 multilib ISO" --class gentoo {
set isofile='/install-amd64-minimal-20150319.iso'
loopback loop $isofile
linux (loop)/isolinux/gentoo root=/dev/ram0 init=/linuxrc looptype=squashfs loop=/image.squashfs cdroot isoboot=$isofile vga=791 splash=silent,theme:default console=tty1 quiet --
echo 'Loading initial ramdisk ...'
initrd (loop)/isolinux/gentoo.igz
}
## /Gentoo things
menuentry "Ubuntu Desktop ISO" --class ubuntu {
loopback loop /ubuntu-14.04.1-desktop-amd64.iso
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/ubuntu-14.04.1-desktop-amd64.iso noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
#menuentry "Debian NetInstall ISO" --class debian {
# loopback loop /debian-testing-amd64-netinst.iso
# linux (loop)/install.amd/vmlinuz vga=normal --
# initrd (loop)/install.amd/initrd.gz
#}
#menuentry 'Debian NetInstall ISO' --class debian {
# set isofile='/debian-testing-amd64-netinst.iso'
# set initrdfile='/debian-loopback-initrd.gz'
# loopback loop $isofile
# linux (loop)/install.amd/vmlinuz vga=791 iso-scan/ask_second_pass=true iso-scan/filename=$isofile
# # initrd $initrdfile
# initrd (loop)/install.amd/initrd.gz
#}
menuentry "Linux Mint ISO" {
loopback loop /linuxmint.iso
linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/linuxmint.iso noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
#menuentry "DBAN ISO" {
# loopback loop /dban.iso
# linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=/dban.iso silent --
#}
#menuentry "Tinycore ISO" {
# loopback loop /tinycore.iso
# linux (loop)/boot/bzImage --
# initrd (loop)/boot/tinycore.gz
#}
menuentry "SystemRescueCd" {
loopback loop /systemrescuecd.iso
linux (loop)/isolinux/rescuecd isoloop=/systemrescuecd.iso setkmap=us docache dostartx
initrd (loop)/isolinux/initram.igz
}
#menuentry "FreeDOS 1.1" {
# #set root=(hd0,1)
# loopback loop /freedos/fd11src.iso
# linux16 (loop)/isolinux/memdisk
# initrd16 (loop)/isolinux/fdboot.img
#}
menuentry "Samsung SSD 840 EVO performance restoration" {
#set root=(hd0,1)
loopback loop /Samsung_Performance_Restoration.iso
linux16 (loop)/isolinux/memdisk
initrd16 (loop)/isolinux/btdsk.img
}
menuentry "memtest86+ 4.20" --unrestricted {
linux16 /memtest86plus/memtest
}
menuentry "memtest86+ 4.20 (netbsd)" --unrestricted {
insmod bsd
knetbsd /memtest86plus/memtest.netbsd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment