將這兩個設定檔 ventoy.json, ventoy_grub.cfg,
放入 /ventoy 目錄,這時開機預設會執行 ventoy_grub.cfg 裡面的項目,
注意將 (hd1,msdos1) 改成你 grub 所在的磁碟分割,
在選單按 c 進入 grub 命令列尋找。
grub> ls
(proc) (hd0) (hd0,msdos2) (hd0,msdos1)
#== /ventoy/ventoy.json ==#
{
"control": [
{ "VTOY_MAX_SEARCH_LEVEL": "2" },
{ "VTOY_DEFAULT_SEARCH_ROOT": "/" },
{ "VTOY_MENU_TIMEOUT": "10" },
{ "VTOY_DEFAULT_IMAGE": "F6>Grub2 Menu" }
],
"persistence": [
{
"image": "/ventoy/lubuntu-20.04.3-desktop-amd64.iso",
"backend": [
"/ventoy/persistence_ext4_512MB_casper-rw.dat",
"/ventoy/persistence_ext4_1GB_casper-rw.dat"
],
"autosel": 1,
"timeout": 10
}
]
}
#== /ventoy/ventoy.json ==#
參考:https://www.ventoy.net/en/plugin_control.html
另外 persistence 讓 LiveCD 可以儲存設定
相關檔案在:https://www.ventoy.net/en/plugin_persistence.html
#== /ventoy/ventoy_grub.cfg ==#
set timeout=10
set default="0"
# Press c ,grub> ls, to find out the partition number
# Press e to edit menu
menuentry "Boot to (hd1,msdos1) grub" --class=custom {
configfile (hd1,msdos1)/boot/grub/grub.cfg
}
menuentry '<-- Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
echo 'Return ...'
}
#== /ventoy/ventoy_grub.cfg ==#
No comments:
Post a Comment