From b0ab1dcf976973de81f28c032f1f5e8a8be9a13d Mon Sep 17 00:00:00 2001 From: a1ive <10670106+a1ive@users.noreply.github.com> Date: Thu, 5 Nov 2020 13:45:45 +0800 Subject: [PATCH] update --- grub2_cmd_zh.md | 1 + grub2_menu_zh.md | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/grub2_cmd_zh.md b/grub2_cmd_zh.md index 7e58bd1..bfeea66 100644 --- a/grub2_cmd_zh.md +++ b/grub2_cmd_zh.md @@ -678,6 +678,7 @@ layout: default - \-\-eltorito=DISK, -e 同时指定挂载 El Torito 镜像的盘符 - \-\-nb, -n 不启动此虚拟盘 - \-\-unmap=DISK, -x 屏蔽某磁盘 +- \-\-first, -f 使虚拟盘排在磁盘列表的第一位,以解决 Windows 启动问题 ### md5sum arg ... diff --git a/grub2_menu_zh.md b/grub2_menu_zh.md index 703f9f0..90314e5 100644 --- a/grub2_menu_zh.md +++ b/grub2_menu_zh.md @@ -30,14 +30,6 @@ export color_highlight=black/white; terminal_output gfxterm; #### FUNCTION #### -function unmap_cd { - for dev in (cd*); do - if [ -e ${dev} ]; then - map -x ${dev}; - fi; - done; -} - function to_g4d_path { unset g4d_path; if regexp --set=1:num '^\(hd[0-9]+,[a-zA-Z]*([0-9]+)\).*' "${1}"; then @@ -95,8 +87,7 @@ menuentry "Boot Microsoft Windows 8/10" { menuentry "Boot WinPE ISO" { set iso_file="(hd0,2)/winpe.iso"; if [ "$grub_platform" = "efi" ]; then - unmap_cd; - map "${iso_file}"; + map -f "${iso_file}"; elif [ "$grub_platform" = "pc" ]; then to_g4d_path "${iso_file}"; if [ -n "${g4d_path}" ]; then