EFI U盘启动
-
设置u盘为gpt磁盘并创建分区
-
格式化u盘为fat32
-
将分区设置为esp分区
set 1 esp on
-
挂载至
/mnt
并按照systemd-bootsudo bootctl install --path=/mnt
-
在
/mnt/loader/entries/
下添加你需要的启动条目 -
重启选择u盘
具体命令及流程
sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
(parted)
sudo mkfs.vfat -F32 /dev/sda1 ~ 22:05:55
mkfs.fat 4.1 (2017-01-24)
sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Teclast CoolFlash(U) (scsi)
Disk /dev/sda: 6879MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 6879MB 6878MB primary fat32
(parted) set 1 esp on
(parted)
(parted) p
Model: Teclast CoolFlash(U) (scsi)
Disk /dev/sda: 6879MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 6879MB 6878MB fat32 boot, esp
sudo bootctl install --path=/mnt
Created "/mnt/EFI".
Created "/mnt/EFI/systemd".
Created "/mnt/EFI/BOOT".
Created "/mnt/loader".
Created "/mnt/loader/entries".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/mnt/EFI/systemd/systemd-bootx64.efi".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/mnt/EFI/BOOT/BOOTX64.EFI".
Failed to create EFI Boot variable entry: No such file or directory
启动信息模板
loader/entries/arch-lily.conf
title Arch Linux Lily
linux /vmlinuz-linux-lily
initrd /initramfs.img
options root=/dev/nvme0n1p2
其他
最好添加一个loader/loader.conf文件
timeout 5
不然看不到选择项目
网友评论