-
-
Save javara/d3a6cd5be3c55719289d to your computer and use it in GitHub Desktop.
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others.
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
# Config for GNU GRand Unified Bootloader (GRUB) | |
# /boot/grub/grub.cfg | |
# This grub.cfg file was created by Lance http://www.pendrivelinux.com | |
# Suggested Entries and the suggestor, if available, will also be noted. | |
# Sources: | |
# http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/#more-5352 | |
# https://gist.github.com/jamiekurtz/26c46b3e594f8cdd453a | |
# https://gist.github.com/noisufnoc/e0053d738f5fbb679535 | |
# https://gist.github.com/samdoran/90056b8e4a2aedc6a3e8 | |
# https://gist.github.com/yeahunter/9eca12b3db064e5dc23b | |
# https://gist.github.com/jeekl/5564476 | |
# https://wiki.archlinux.org/index.php/Multiboot_USB_drive | |
# https://help.ubuntu.com/community/Grub2/ISOBoot/Examples | |
# Notes: | |
# For variables, be sure to use double-quotes to have them actually resolve. | |
# Need to re-declare variables inside sub-menus because they open a new "context"..... great.. | |
# Source: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1175127 | |
# Timeout for menu | |
set timeout=10 | |
# Default boot entry | |
set default=0 | |
set isoPath="/ISOs" | |
set linuxPath="$isoPath/Linux" | |
set toolPath="$isoPath/Tools" | |
set memdiskPath="/boot/memdisk" | |
# Menu Colours | |
set menu_color_normal=white/black | |
set menu_color_highlight=white/cyan | |
submenu "Linux Distros" { | |
set isoPath="/ISOs" | |
set linuxPath="$isoPath/Linux" | |
menuentry "kali-linux-1.1.0a-amd64" { | |
set isofile="$linuxPath/kali-linux-1.1.0a-amd64.iso" | |
loopback loop $isofile | |
linux (loop)/live/vmlinuz boot=live findiso=$isofile noconfig=sudo username=root hostname=kali | |
initrd (loop)/live/initrd.img | |
} | |
menuentry "Fedora-Live-Workstation-x86_64-21-5" { | |
set isofile="$linuxPath/Fedora-Live-Workstation-x86_64-21-5.iso" | |
loopback loop $isofile | |
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-WS-x86_64-21-5 iso-scan/filename=$isofile rd.live.image | |
initrd (loop)/isolinux/initrd0.img | |
} | |
menuentry "Elementary OS" { | |
set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso" | |
loopback loop $isofile | |
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash -- | |
initrd (loop)/casper/initrd.lz | |
} | |
#menuentry "linuxmint-17.1-xfce-64bit" { | |
# set isofile="$linuxPath/linuxmint-17.1-xfce-64bit.iso" | |
# loopback loop $isofile | |
# linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile live-config quiet splash noeject noprompt | |
# initrd (loop)/casper/initrd.lz | |
#} | |
#menuentry "ubuntu-14.04.2-desktop-amd64" { | |
# set isofile="$linuxPath/ubuntu-14.04.2-desktop-amd64.iso" | |
# loopback loop $isofile | |
# linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8 | |
# initrd (loop)/casper/initrd.lz | |
#} | |
#menuentry "Linux Mint ISO" { | |
# set isofile="$linuxPath/linuxmint.iso" | |
# loopback loop $isofile | |
# linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash -- | |
# initrd (loop)/casper/initrd.lz | |
#} | |
#menuentry "Tinycore ISO" { | |
# set isofile="$linuxPath/tinycore.iso" | |
# loopback loop $isofile | |
# linux (loop)/boot/bzImage -- | |
# initrd (loop)/boot/tinycore.gz | |
#} | |
#menuentry "ArchLinux x86_64" { | |
# set iso="/iso/archlinux-2014.06.01-dual.iso" | |
# loopback loop $iso | |
# linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$iso earlymodules=loop | |
# initrd (loop)/arch/boot/x86_64/archiso.img | |
#} | |
#menuentry "ArchLinux 32 Bit" { | |
# set iso="/iso/archlinux-2014.06.01-dual.iso" | |
# loopback loop $iso | |
# linux (loop)/arch/boot/i686/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$iso earlymodules=loop | |
# initrd (loop)/arch/boot/i686/archiso.img | |
#} | |
#menuentry "CentOS 6 x86_64 minimal" { | |
# set iso="/iso/CentOS-6.5-x86_64-minimal.iso" | |
# loopback loop $iso | |
# linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$iso | |
# initrd (loop)/isolinux/initrd.img | |
#} | |
#menuentry "CentOS 6 x86_64 minimal with basic video driver" { | |
# set iso="/iso/CentOS-6.5-x86_64-minimal.iso" | |
# loopback loop $iso | |
# linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$iso xdriver=vesa nomodset askmethod | |
# initrd (loop)/isolinux/initrd.img | |
#} | |
#menuentry "Xbuntu 14.04 Beta - 64bit" { | |
# set iso="/iso/xubuntu-14.04-beta1-desktop-amd64.iso" | |
# loopback loop $iso | |
# linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso noprompt noeject splash -- | |
# initrd (loop)/casper/initrd.lz | |
#} | |
#menuentry "Boot Finnix 109 (64-bit)" { | |
# set iso="/iso/finnix-109.iso" | |
# loopback loop $iso | |
# linux (loop)/boot/x86/linux64 findiso=$iso vga=791 nomodeset quiet -- | |
# initrd (loop)/boot/x86/initrd.xz | |
#} | |
#menuentry "Boot Finnix 109 (64-bit, text mode)" { | |
# set iso="/iso/finnix-109.iso" | |
# loopback loop $iso | |
# linux /boot/x86/linux64 findiso=$iso vga=normal nomodeset quiet -- | |
# initrd /boot/x86/initrd.xz | |
#} | |
#menuentry "Boot Finnix 109 (32-bit)" { | |
# set iso="/iso/finnix-109.iso" | |
# loopback loop $iso | |
# linux /boot/x86/linux findiso=$iso vga=791 nomodeset quiet -- | |
# initrd /boot/x86/initrd.xz | |
#} | |
#menuentry "Boot Finnix 109 (32-bit, text mode)" { | |
# set iso="/iso/finnix-109.iso" | |
# loopback loop $iso | |
# linux /boot/x86/linux findiso=${iso_path} vga=normal nomodeset quiet -- | |
# initrd /boot/x86/initrd.xz | |
#} | |
#menuentry "TAILS - The Amnesic Incognito Live System" { | |
# set iso="/iso/tails-i386-0.17.2.iso" | |
# loopback loop $iso | |
# linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=Europe/Stockholm block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$iso quiet_ | |
# initrd (loop)/live/initrd.img | |
#} | |
#menuentry "GRML - the sysadmins best friend" { | |
# set iso="/iso/grml64-full_2013.02.iso" | |
# loopback loop $iso | |
# set root=(loop) | |
# configfile /boot/grub/loopback.cfg | |
#} | |
#menuentry "Debian 7.0 Wheezy AMD64 Installer (netinst, firmware)" { | |
# set iso="/iso/debian-7.0.0-amd64-firmware-netinst.iso" | |
# loopback loop $iso | |
# linux (loop)/install.amd/vmlinuz | |
# initrd (loop)/install.amd/initrd.gz | |
#} | |
#menuentry "Debian 7.0 Wheezy AMD64 Live system (GNOME, firmware/non-free)" { | |
# set iso="/iso/debian-live-7.0.0-amd64-gnome-desktop+nonfree.iso" | |
# loopback loop $iso | |
# linux (loop)/live/vmlinuz boot=live | |
# initrd (loop)/live/initrd.img | |
#} | |
menuentry "Damn Small Linux" { | |
# Maybe try this instead later: https://gist.github.com/oxplot/2041319 | |
linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix | |
initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz | |
} | |
} | |
#menuentry "win7" { | |
# loopback loop "$isoPath/win7.iso" | |
# chainloader (loop) | |
#} | |
submenu "Utils" { | |
set isoPath="/ISOs" | |
set toolPath="$isoPath/Tools" | |
menuentry "Memtest 86+" { | |
set isofile="$toolPath/memtest86+-5.01.iso" | |
linux16 $isofile | |
} | |
menuentry "SpinRite" { | |
set isofile="$toolPath/SpinRite.iso" | |
set gfxpayload=text | |
linux16 $memdiskPath raw | |
initrd16 $isofile | |
} | |
menuentry "SpinRite 2" { | |
set isofile="$toolPath/SpinRite.iso" | |
loopback loop $isofile | |
linux (loop)/vmlinuz boot=cd isofrom=$isofile xbmc=nvidia,nodiskmount,tempfs,setvolume loglevel=0 -- | |
initrd (loop)/initrd0.img | |
} | |
menuentry "gparted-live-0.22.0-2-i586" { | |
set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso" | |
# set gfxpayload=text | |
loopback loop $isofile | |
linux (loop)/live/vmlinuz boot=live username=user config components quiet noswap noeject findiso=$isofile toram=filesystem.squashfs nosplash | |
initrd (loop)/live/initrd.img | |
} | |
#menuentry "Parted Magic" { | |
# set isofile="$isopath/pmagic.iso" | |
# loopback loop $isofile | |
# linux (loop)/pmagic/bzImage iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw gfxpayload=800x600x16 loglevel=9 max_loop=256 vmalloc=384MiB keymap=dvorak | |
# initrd (loop)/pmagic/initrd.img | |
#} | |
menuentry "SystemRescueCd" { | |
set isofile="$toolPath/systemrescuecd.iso" | |
loopback loop $isofile | |
linux (loop)/isolinux/rescuecd isoloop=$isofile setkmap=us docache dostartx | |
# Or linux (loop)/isolinux/rescue32 | |
# Or linux (loop)/isolinux/rescue64 | |
initrd (loop)/isolinux/initram.igz | |
} | |
menuentry "CloneZilla" { | |
set isofile="$toolPath/clonezilla-live-2.4.2-10-amd64.iso" | |
loopback loop $isofile | |
linux (loop)/live/vmlinuz boot=live live-config union=aufs nolocales noprompt gfxpayload=800x600x16 ip=frommedia findiso=$isofile | |
initrd (loop)/live/initrd.img | |
} | |
#menuentry "Ophcrack No Tables" { | |
# set isofile="$isopath/ophcrack-notables.iso" | |
# set gfxpayload=text | |
# loopback loop $isofile | |
# linux (loop)/boot/bzImage root=/dev/null rw lang=en_US kmap=dvorak autologin iso-scan/filename=$isofile | |
# initrd (loop)/boot/rootfs.gz | |
#} | |
#menuentry "Ophcrack Vista/7 Tables" { | |
# set isofile="$isopath/ophcrack-vistatables.iso" | |
# set gfxpayload=text | |
# loopback loop $isofile | |
# linux (loop)/boot/bzImage root=/dev/null rw lang=en_US kmap=dvorak autologin iso-scan/filename=$isofile | |
# initrd (loop)/boot/rootfs.gz | |
#} | |
#menuentry "DBAN ISO" { | |
# set isofile="$toolPath/dban.iso" | |
# loopback loop $isofile | |
# linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=$isofile silent -- | |
#} | |
#menuentry "Boot Hardware Detection Tool from iso using memdisk 4.05" { | |
# linux16 $memdiskPath iso | |
# initrd16 /customboot/hdt.iso | |
#} | |
#menuentry "Free Dos from iso using memdisk 4.05" { | |
# set isofile="/OS/fdbasecd.iso" | |
# linux16 $memdiskPath iso | |
# initrd16 (hd0,6)$isofile | |
#} | |
menuentry "Hiren's boot CD using memdisk 4.05" { | |
set isofile="$toolPath/Hiren's.BootCD.15.2.iso" | |
linux16 $memdiskPath iso | |
initrd16 (hd0,6)$isofile | |
} | |
menuentry "Ultimate Boot CD iso using memdisk 4.05" { | |
set isofile="$toolPath/UBCD4WinBuilder.iso" | |
linux16 $memdiskPath iso | |
initrd16 (hd0,6)$isofile | |
} | |
#menuentry "UBCD with MEMDISK" { | |
# linux16 /memdisk iso raw | |
# initrd /ubcd502.iso | |
#} | |
#menuentry "UBCD with grub4dos" { | |
# linux16 /grub.exe --config-file="map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);" | |
# initrd /ubcd502.iso | |
#} | |
} | |
menuentry "System shutdown" { | |
echo "System shutting down..." | |
halt | |
} | |
menuentry "System restart" { | |
echo "System rebooting..." | |
reboot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
found that here with google
you could just loop all isos in that folder so you dont need to make an entry for each one
`function init_iso_loop {
iso_path="${1}"
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
}
submenu 'ISO boot' --class void --id 'iso-boot' {
submenu "iso prober" {
}
`
i've dont it like that