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
function load_efi_video { | |
set gfxmode=auto | |
insmod efi_gop | |
insmod efi_uga | |
insmod gfxterm | |
terminal_output gfxterm | |
} | |
function load_video { | |
set gfxmode=auto | |
insmod vbe | |
insmod vga | |
insmod video_bochs | |
insmod video_cirrus | |
insmod gfxterm | |
terminal_output gfxterm | |
} | |
if loadfont ($root)/boot/grub/fonts/unicode.pf2 | |
then | |
if load_efi_video | |
then | |
set bios="UEFI BIOS" | |
else | |
load_video | |
set bios="Legacy BIOS" | |
fi | |
fi | |
set locale_dir=($root)/boot/grub/locale | |
set lang=zh_TW | |
insmod gettext | |
set menu_color_normal=white/black | |
set menu_color_highlight=black/light-gray | |
if background_color 44,0,30 | |
then | |
clear | |
fi | |
set gfxpayload=keep | |
set options="file=/cdrom/preseed/ubuntu.seed boot=casper" | |
set desktop="locale=zh_TW.UTF-8 toram noeject noprompt" | |
set extra="" | |
insmod regexp | |
for isofile in /iso/*.iso | |
do | |
menuentry "試用 $isofile 免安裝 ($bios)" $isofile { | |
loopback loop $2 | |
if [ -f (loop)/casper/vmlinuz ]; then | |
set vmlinuz="(loop)/casper/vmlinuz" | |
elif [ -f (loop)/casper/vmlinuz.efi ]; then | |
set vmlinuz="(loop)/casper/vmlinuz.efi" | |
fi | |
if [ -f (loop)/casper/initrd ]; then | |
set initrd="(loop)/casper/initrd" | |
elif [ -f (loop)/casper/initrd.lz ]; then | |
set initrd="(loop)/casper/initrd.lz" | |
elif [ -f (loop)/casper/initrd.gz ]; then | |
set initrd="(loop)/casper/initrd.gz" | |
fi | |
linux $vmlinuz iso-scan/filename=$2 $options $desktop --- $extra | |
initrd $initrd | |
} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment