Boot ISO By GRUB

範例

GRUB Boot ISO 範例 設定檔路徑 是否需要執行 update-grub
demo_40_custom / 22.04 /etc/grub.d/40_custom 修改後,需要執行 sudo update-grub
demo_41_custom / 22.04 /boot/grub/custom.cfg 修改後,不需要執行 sudo update-grub

GRUB Menu Entry / Boot ISO 樣板

menuentry "Xubuntu 22.04 Live ISO" --class Ubuntu {
	set gfxpayload=keep
	set iso_file="/opt/iso/ubuntu/22.04/xubuntu-22.04-desktop-amd64.iso"
	search --set=iso_partition --no-floppy --file $iso_file
	probe --set=iso_partition_uuid --fs-uuid $iso_partition
	set img_dev="/dev/disk/by-uuid/$iso_partition_uuid"
	loopback loop ($iso_partition)$iso_file
	set boot_option=""
	#set boot_option="locale=zh_TW"
	#set boot_option="quiet splash"
	#set boot_option="file=/cdrom/preseed/xubuntu.seed maybe-ubiquity ---"
	linux (loop)/casper/vmlinuz iso-scan/filename=$iso_file boot=casper $boot_option
	initrd (loop)/casper/initrd
}

See Also