Skip to content

教程

已弃用 用Ventoy就行了

格式化到 Fat32

直接用 Gparted 吧,或者命令行用 cfdisk 分区,然后 mkfs.vfat -F 32 /dev/sda1

挂载到 /mnt

bash
mount /dev/sda1 /mnt

安装 Grub2 头部

bash
grub-install --target=x86_64-efi --efi-directory=/mnt --boot-directory=/mnt/boot --removable

写入 grub.cfg 文件

bash
grub-mkconfig -o /mnt/boot/grub/grub.cfg

假设 /dev/sda1 分区卷标是 D441-85AB

plaintext
menuentry 'Arch Linux ISO (Load to RAM)' --class arch {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    
    search --no-floppy --fs-uuid --set=root D441-85AB
    set isofile="/archlinux-x86_64.iso"
    loopback loop $isofile
    
    echo 'Loading Linux kernel from ISO...'
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=UUID=D441-85AB img_loop=$isofile copytoram=y rw loglevel=5 nowatchdog
    
    echo 'Loading initial ramdisk...'
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

menuentry 'Boot Windows / WePE (UEFI Mode)' --class windows --class os {
    insmod part_gpt
    insmod fat
    insmod chain

    search --no-floppy --fs-uuid --set=root D441-85AB

    chainloader /EFI/WEPE/bootx64.efi
}
grub.cfg
plaintext
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi

if [ "${env_block}" ] ; then
  set env_block="(${root})${env_block}"
  export env_block
  load_env -f "${env_block}"
fi

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   if [ "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   else
     save_env next_entry
   fi
   set boot_once=true
else
   set default="0"
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}"
    if [ "${env_block}" ] ; then
      save_env -f "${env_block}" saved_entry
    else
      save_env saved_entry
    fi

  fi
}

function load_video {
  if [ x$grub_platform = xefi ]; then
    insmod efi_gop
    insmod efi_uga
  elif [ 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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root e24a0393-96d2-4bbf-b705-566af8f1644d
    font="/@/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux ISO (Load to RAM)' --class arch {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    
    search --no-floppy --fs-uuid --set=root D441-85AB
    set isofile="/archlinux-x86_64.iso"
    loopback loop $isofile
    
    echo 'Loading Linux kernel from ISO...'
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=UUID=D441-85AB img_loop=$isofile copytoram=y rw loglevel=5 nowatchdog
    
    echo 'Loading initial ramdisk...'
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

menuentry 'Boot Windows / WePE (UEFI Mode)' --class windows --class os {
    insmod part_gpt
    insmod fat
    insmod chain

    search --no-floppy --fs-uuid --set=root D441-85AB

    chainloader /EFI/WEPE/bootx64.efi
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
# This menu entry is supported only on EFI platforms.
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/41_snapshots-btrfs ###
### END /etc/grub.d/41_snapshots-btrfs ###

### BEGIN /etc/grub.d/99_reboot_halt ###
menuentry "Reboot" --class reboot {
    reboot
}

menuentry "Poweroff" --class halt {
    halt
}

### END /etc/grub.d/99_reboot_halt ###

复制 Arch.iso

复制 archlinux-2026.07.01-x86_64.iso/mnt

复制 Wepe.iso 引导

挂载 Wepe.iso

直接用桌面,或者命令行用 losetup -f ./Wepe.iso

文件在我的 cloudflare-r2-buckets/cloudreve 里面

在这里联系我

似乎我当时从Bilibili下载的,链接找不到了

复制不冲突的文件

复制 BOOTMGR WEPE EFI/MICROSOFT 到分区根目录

处理冲突文件

用桌面复制吧

复制 Wepe.iso/EFI/BOOT/bootx64.efi/mnt/EFI/WEPE/bootx64.efi

这个是链式引导的文件

结果

tree
plaintext
/mnt
├── archlinux-2026.07.01-x86_64.iso
├── archlinux-x86_64.iso
├── boot
│   └── grub
│       ├── fonts
│       │   └── unicode.pf2
│       ├── grub.cfg
│       ├── grubenv
│       ├── locale
│       │   └── ...
│       ├── themes
│       │   └── starfield
│       │       └── ...
│       └── x86_64-efi
│           └── ...
├── BOOTMGR
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── MICROSOFT
│   │   └── BOOT
│   │       ├── BCD
│   │       └── FONTS
│   │           └── wgl4_boot.ttf
│   └── WEPE
│       └── bootx64.efi
└── WEPE
    ├── B64
    ├── FONTS
    │   └── wgl4_boot.ttf
    ├── MESSAGE
    ├── PELOAD
    ├── WEIPE
    ├── WEPE64
    ├── WEPE64.WIM
    ├── WEPE.INI
    ├── WEPE.SDI
    └── WEPE.TXT