Last active
January 10, 2017 10:22
-
-
Save bluebat/70deb9122f9674cde775 to your computer and use it in GitHub Desktop.
Multi-Boot GRUB2 Configuration
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
if [ -s $prefix/grubenv ]; then | |
load_env | |
fi | |
if [ "${next_entry}" ] ; then | |
set default="${next_entry}" | |
set next_entry= | |
save_env next_entry | |
set boot_once=true | |
else | |
set default="${saved_entry}" | |
fi | |
if [ x"${feature_menuentry_id}" = xy ]; then | |
menuentry_id_option="--id" | |
else | |
menuentry_id_option="" | |
fi | |
export menuentry_id_option | |
if [ "${prev_saved_entry}" ]; then | |
set saved_entry="${prev_saved_entry}" | |
save_env saved_entry | |
set prev_saved_entry= | |
save_env prev_saved_entry | |
set boot_once=true | |
fi | |
function savedefault { | |
if [ -z "${boot_once}" ]; then | |
saved_entry="${chosen}" | |
save_env saved_entry | |
fi | |
} | |
function load_video { | |
if [ x$feature_all_video_module = xy ]; then | |
insmod all_video | |
else | |
insmod efi_gop | |
insmod efi_uga | |
insmod ieee1275_fb | |
insmod vbe | |
insmod vga | |
insmod video_bochs | |
insmod video_cirrus | |
fi | |
} | |
terminal_output console | |
set timeout=-1 | |
load_video | |
set gfxpayload=keep | |
insmod gzio | |
insmod part_msdos | |
insmod ext2 | |
insmod fat | |
menuentry 'FreeDOS 1.1 (16-bit)' --class windows { | |
set root='hd0,msdos1' | |
drivemap -s (hd0) ${root} | |
chainloader +1 | |
} | |
menuentry 'Fedora 20 (32-bit)' --class fedora --class gnu-linux --class gnu { | |
set root='hd0,msdos2' | |
linux /boot/vmlinuz-3.15.10-201.fc20.i686 root=/dev/sda2 ro vconsole.font=latarcyrheb-sun16 | |
initrd /boot/initramfs-3.15.10-201.fc20.i686.img | |
} | |
menuentry 'Android-x86 4.4 (32-bit)' { | |
set root='hd0,msdos3' | |
linux /android-4.4-r1/kernel root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.4-r1 | |
initrd /android-4.4-r1/initrd.img | |
} | |
menuentry 'CentOS 7.0 (64-bit)' --class gnu-linux --class gnu { | |
set root='hd0,msdos5' | |
linux16 /boot/vmlinuz-3.10.0-123.6.3.el7.x86_64 root=/dev/sda5 ro | |
initrd16 /boot/initramfs-3.10.0-123.6.3.el7.x86_64.img | |
} | |
menuentry 'Debian 7.6 (32-bit)' --class gnu-linux { | |
set root='hd0,msdos6' | |
linux /boot/vmlinuz-3.2.0-4-486 root=/dev/sda6 ro | |
initrd /boot/initrd.img-3.2.0-4-486 | |
} | |
menuentry 'Ubuntu 14.04 (32-bit)' --class gnu-linux --class gnu { | |
set root='hd0,msdos7' | |
linux /boot/vmlinuz-3.13.0-30-generic root=/dev/sda7 ro | |
initrd /boot/initrd.img-3.13.0-30-generic | |
} | |
menuentry 'RemixOS 3.0 (64-bit)' { | |
set root='hd0,msdos8' | |
linux /RemixOS/kernel root=/dev/ram0 androidboot.hardware=remix_x86_64 video=-16 SRC=/RemixOS | |
initrd /RemixOS/initrd.img | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment