core: 修复原系统为 bios + nixos 重启后未能进入安装环境

This commit is contained in:
bin456789
2026-05-20 21:15:43 +08:00
parent 37af3fcd5f
commit 8d099f167f

View File

@ -4194,7 +4194,7 @@ recreate_grub_or_extlinux_cfg() {
/nix/var/nix/profiles/system/bin/switch-to-configuration boot /nix/var/nix/profiles/system/bin/switch-to-configuration boot
# 手动启用 41_custom # 手动启用 41_custom
nixos_grub_home="$(dirname "$(readlink -f "$(get_cmd_path grub-mkconfig)")")/.." nixos_grub_home="$(dirname "$(readlink -f "$(get_cmd_path grub-mkconfig)")")/.."
$nixos_grub_home/etc/grub.d/41_custom >>$target_cfg $nixos_grub_home/etc/grub.d/41_custom >>"$(dirname "$target_cfg")/grub.cfg"
elif is_have_cmd update-grub; then elif is_have_cmd update-grub; then
update-grub update-grub
else else