您尚未登录。

#1 2024-05-28 22:59:09

durandal
会员
注册时间: 2023-10-15
帖子: 15

双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

如何用systemd-boot引导加上window11?或者用clover引导来引导win11和arch?

离线

#2 2024-07-13 21:22:58

giteeajake
a noob
所在地: Hebei
注册时间: 2024-06-11
帖子: 87
个人网站

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

i think you don't install the systemd-boot
i used it
Becaus i installed the Blissos
then it broken my PC sad
so please install the grub2 (only my thinking)


i am a noob

离线

#3 2024-07-14 19:18:55

giteeajake
a noob
所在地: Hebei
注册时间: 2024-06-11
帖子: 87
个人网站

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

Hello
I think i find the anwser(cpu 64bits)
first use pacman to install the package "edk2-shell"
and copy the shellx64.efi
command "sudo pacman -S edk2-shell && cp /usr/share/edk2-shell/x64/Shell.efi /boot/shellx64.efi"
then reboot computer and select UEFI Shell
run "map" command
you can see the fs alias

third reboot to your ArchLinux
cd /boot
Create a UEFI Shell script "windows.nsh"
if you fs alias is"HD0b"
you write "HD0b:EFI\Microsoft\Boot\Bootmgfw.efi" to "windows.nsh"
go to /boot/loader/entries/
create "windows.conf"
write "title  Windows
efi     /shellx64.efi
options -nointerrupt -noconsolein -noconsoleout windows.nsh" to "windows.conf"

but if you update your kernel
the /boot/loader/entries/ will be reset!
so do it.
you can mkdir ~/systemd-windows_boot-backup
cd /etc/systemd/system
create "update-windows-boot.service"
write "[Unit]
Description=Update Windows boot entry

[Service]
ExecStart=/usr/bin/update-windows-entry.sh"

cd /usr/bin
create "update-windows-entry.sh"
write "#!/bin/bash
cp ~/systemd-windwos_boot-backup/conf/windows.nsh /boot/
cp ~/systemd-windows_boot-backup/windows.conf /boot/loader/entries/ "
then chmod 777 update-windows-entry.sh

go to /etc/pacman.d/hooks
create "update-windows-entry.hooks"
write " [Trigger]
Operation = Upgrade
Type = Package
Target = linux-cachyos
Target = linux-cachyos-lts
Target = linux-lts
Target = linux

[Action]
Description = Updating Windows boot entry...
When = PostTransaction
Exec = /usr/bin/systemctl start update-windows-boot.service"

all is OK


i am a noob

离线

#4 2024-07-14 21:44:17

BreadCat209
K.I.S.S.
注册时间: 2023-09-09
帖子: 206

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

durandal 说:

如何用systemd-boot引导加上window11?或者用clover引导来引导win11和arch?

虽然但是,为啥不用grub


[mbm@ArchLinux:~]$ sudo rm -rf /*

离线

#5 2024-07-15 08:13:31

giteeajake
a noob
所在地: Hebei
注册时间: 2024-06-11
帖子: 87
个人网站

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

i think i have some wrong
it is " Create an UEFI Shell script "
who can translator it?


i am a noob

离线

#6 2024-11-11 16:11:25

onikage
会员
注册时间: 2023-02-01
帖子: 23

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

将windows的efi分区挂载到/mnt,并将Microsoftk拷贝到/boot/EFI目录下,然后重启
sudo cp -ax /mnt/EFI/Microsoft/ /boot/EFI/
会自动增加一个windows的启动选项.

离线

#7 2024-11-11 17:22:10

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 9,168
个人网站

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

onikage 说:

将windows的efi分区挂载到/mnt,并将Microsoftk拷贝到/boot/EFI目录下,然后重启
sudo cp -ax /mnt/EFI/Microsoft/ /boot/EFI/
会自动增加一个windows的启动选项.

这个取决于主板,标准没有这种自动发现。

离线

#8 2024-12-29 13:36:13

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 9,168
个人网站

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

请勿转发由机器生成的奇怪内容。

AImixAE 说:

要在Arch Linux的systemd-boot上添加Windows 11的引导,可以按照以下步骤操作:


• 安装edk2-shell:首先需要安装`edk2-shell`来给`systemd-boot`添加EFI shell。可以通过以下命令安装:


sudo pacman -S edk2-shell && cp /usr/share/edk2-shell/x64/Shell.efi /boot/shellx64.efi



• 使用EFI Shell:在启动时选择EFI Shell,使用`map`命令来获取所有盘的`fs alias`,找到Windows EFI分区的`fs alias`。


• 创建windows.nsh:在`/boot/`目录下创建一个`windows.nsh`文件,内容如下:

HD0b:EFI\Microsoft\Boot\Bootmgfw.efi

这里的`HD0b`是你的Windows EFI分区的`fs alias`。


• 创建引导项:在`/boot/loader/entries/`目录下创建一个新的引导项配置文件`windows.conf`,内容如下:


title  Windows
efi     /shellx64.efi
options -nointerrupt -noconsolein -noconsoleout windows.nsh


• 检查配置:确保`windows.nsh`文件位于`/boot/`目录下,并使用`bootctl list`命令检查boot项的输出,确认新的引导项已经添加。

以上步骤可以帮助你在Arch Linux的systemd-boot引导中添加Windows 11的启动选项。这样,你就可以在启动时选择进入Windows 11或Arch Linux系统了。

离线

#9 2025-03-27 23:16:09

onikage
会员
注册时间: 2023-02-01
帖子: 23

Re: 双硬盘,一个win11,一个arch,systemd-boot引导,如何加上windows引导?

依云 说:
onikage 说:

将windows的efi分区挂载到/mnt,并将Microsoftk拷贝到/boot/EFI目录下,然后重启
sudo cp -ax /mnt/EFI/Microsoft/ /boot/EFI/
会自动增加一个windows的启动选项.

这个取决于主板,标准没有这种自动发现。

https://wiki.archlinuxcn.org/zh-sg/Systemd-boot
这个wiki里面的 "3.2 增加启动选项" 部分说是会搜索这个目录的.

离线

页脚