Skip to content

Instantly share code, notes, and snippets.

@gorhill
Forked from Thermionix/grub.cfg
Created September 14, 2013 12:49
Show Gist options
  • Save gorhill/6561765 to your computer and use it in GitHub Desktop.
Save gorhill/6561765 to your computer and use it in GitHub Desktop.
#!/bin/sh
DEVICE=sdf
mkfs.vfat -n multipass01 /dev/$DEVICE1
mount /dev/$DEVICE1 /mnt/
grub-install --no-floppy --root-directory=/mnt /dev/$DEVICE
apt-get install syslinux
cp /usr/lib/syslinux/memdisk /mnt/grub/boot/
cp /boot/grub/fonts/unicode.pf2 /mnt/grub/boot/
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
set color_normal=white/black
set color_highlight=white/light-blue
export color_normal
export color_highlight
set drive_label=multipass01
set isopath=/iso
export drive_label
export isopath
menuentry "manjaro-mate-0.8.6-x86_64.iso" {
set isofile="$isopath/manjaro-mate-0.8.6-x86_64.iso"
loopback loop $isofile
linux (loop)/manjaro/boot/x86_64/manjaroiso img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile misobasedir=manjaro misolabel=MJRO_086 nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 logo.nologo locale.LANG=en_AU.utf8 timezone=Australia/Melbourne nonfree=yes --
initrd (loop)/manjaro/boot/x86_64/manjaro.img
}
menuentry "manjaro-xfce-0.8.6-x86_64.iso" {
set isofile="$isopath/manjaro-xfce-0.8.6-x86_64.iso"
loopback loop $isofile
linux (loop)/manjaro/boot/x86_64/manjaroiso img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile misobasedir=manjaro misolabel=MJRO_086 nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 logo.nologo locale.LANG=en_AU.utf8 timezone=Australia/Melbourne nonfree=yes --
initrd (loop)/manjaro/boot/x86_64/manjaro.img
}
menuentry "pentoo-amd64-2013.0_RC1.9.iso" {
set isofile="$isopath/pentoo-amd64-2013.0_RC1.9.iso"
loopback loop $isofile
linux (loop)/boot/pentoo root=/dev/ram0 init=/linuxrc aufs max_loop=256 dokeymap looptype=squashfs loop=/image.squashfs cdroot video=uvesafb:mtrr:3,ywrap,1024x768-16 usbcore.autosuspend=1 console=tty0 isoboot=$isofile
initrd (loop)/boot/pentoo.igz
}
menuentry "systemrescuecd-x86-3.7.1.iso" {
set isofile="$isopath/systemrescuecd-x86-3.7.1.iso"
loopback loop $isofile
linux (loop)/isolinux/rescue32 isoloop=$isofile setkmap=us scandelay=1
initrd (loop)/isolinux/initram.igz
}
menuentry "pmagic_2013_06_15.iso (Default 32 Runs from RAM)" {
set isofile="$isopath/pmagic_2013_06_15.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 vmalloc=256MiB --
initrd (loop)/pmagic/initrd.img
}
menuentry "pmagic_2013_06_15.iso (Default 64 Runs from RAM)" {
set isofile="$isopath/pmagic_2013_06_15.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage64 iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 vmalloc=384MiB --
initrd (loop)/pmagic/initrd.img
}
menuentry "pmagic_2013_06_15.iso (Console)" {
set isofile="$isopath/pmagic_2013_06_15.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal consoleboot max_loop=256 vmalloc=256MiB loglevel=9 --
initrd (loop)/pmagic/initrd.img
}
menuentry "linuxmint-15-mate-dvd-64bit.iso" {
set isofile="$isopath/linuxmint-15-mate-dvd-64bit.iso"
loopback loop $isofile
linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper iso-scan/filename=$isofile noprompt --
initrd (loop)/casper/initrd.lz
} #bootdegraded=true
menuentry "gparted-live-0.16.1-1-amd64.iso" {
set isofile="$isopath/gparted-live-0.16.1-1-amd64.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live config noswap noprompt ip=frommedia nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.blacklist=yes findiso=$isofile
initrd (loop)/live/initrd.img
}
menuentry "ophcrack-notables-livecd-3.4.0.iso" {
set isofile="$isopath/ophcrack-notables-livecd-3.4.0.iso"
loopback loop $isofile
linux (loop)/boot/bzImage root=/dev/null rw vga=normal lang=en_US kmap=us autologin iso-scan/filename=$isofile
initrd (loop)/boot/rootfs.gz
}
menuentry "archlinux-2013.08.01-dual.iso" {
set isofile="$isopath/archlinux-2013.08.01-dual.iso"
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_201308 img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile earlymodules=loop noeject noprompt
initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "Konboot" {
linux16 /boot/grub/memdisk raw ro
initrd16 $isopath/FD0-konboot-v1.1-2in1.img
# set root=(hd1)
# drivemap -s hd0 hd1
}
menuentry "Plop Boot Manager" {
set isofile="$isopath/pmagic_2013_01_29.iso"
loopback loop $isofile
linux16 (loop)/boot/plpbt/plpbt.bin
}
menuentry "Seagate SeaTools" {
linux16 /boot/grub/memdisk bigraw ro
initrd16 $isopath/SeaTools.img
}
menuentry "wdidle3_1_05 FreeDOS" {
linux16 /boot/grub/memdisk raw ro
initrd16 $isopath/wdidle.img
}
menuentry "Thinkpad x200t BIOS Upgrade to 3.20" {
linux16 /boot/grub/memdisk iso ro
initrd16 $isopath/7wuj44uc.iso
}
menuentry "fd_sas1068e_p21.img" {
linux16 /boot/grub/memdisk raw ro
initrd16 $isopath/fd_sas1068e_p21.img
}
menuentry "crucial-c400.070H.07.00.iso" {
linux16 /boot/grub/memdisk iso ro
initrd16 $isopath/crucial-c400.070H.07.00.iso
}
submenu "grub2 related functions" {
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
}
}
menuentry "DBAN (Darik's Boot and Nuke)" {
set isofile="$isopath/dban-2.2.6_i586.iso"
set gfxpayload=text
loopback loop $isofile
linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=$isofile silent --
}
menuentry "memtest86+" {
linux16 $isopath/memtest.bin
}
menuentry "development entries" {
configfile /boot/grub/grub.cfg.dev
}
menuentry "Boot to Hard Disk" {
chainloader +1
}
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment