wanchenyi
V2EX  ›  问与答

ubuntu22.04 windows11 双系统修改启动项

  •  
  •   wanchenyi · Mar 15, 2024 · 1549 views
    This topic created in 809 days ago, the information mentioned may be changed or developed.

    台式机修改启动的名称, menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-984E-BA96' { insmod part_gpt insmod fat search --no-floppy --fs-uuid --set=root 984E-BA96 chainloader /EFI/Microsoft/Boot/bootmgfw.efi } set timeout_style=menu if [ "${timeout}" = 0 ]; then set timeout=10 fi 想要把 Windows Boot Manager (on /dev/nvme0n1p1)改的年 windows11 ,改完保存后,执行命令 sudo update-grub 后会被改回去,请问各位大佬,有什么办法解决吗

    Supplement 1  ·  Mar 16, 2024
    menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-984E-BA96' {
            insmod part_gpt
            insmod fat
            search --no-floppy --fs-uuid --set=root 984E-BA96
            chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    set timeout_style=menu
    if [ "${timeout}" = 0 ]; then
      set timeout=10
    fi
    

    我知道Windows Boot Manager (on /dev/nvme0n1p1)这是windows的启动项,但我把它改成window11后,并且保存后,update_grub,就会被改会原来的样子,请问有什么办法可以使用其生效吗

    3 replies    2024-03-16 19:11:17 +08:00
    dandycheung
        1
    dandycheung  
       Mar 16, 2024 via Android
    这个是 os_probe 环节自动生成的,要么你忍,要么你自己把这个条目写到 40_custom 里,再把 os_probe 禁用掉。
    coffeehat
        2
    coffeehat  
       Mar 16, 2024 via Android
    不建议自己改 grub.cfg ;你可以装个 grub-customizer ,图形界面很好改启动项
    busier
        3
    busier  
       Mar 16, 2024 via iPhone
    那你改 grub.cfg 的时候 没看到第一行写着 不要直接修改这个文件吗!!!

    一楼正解

    禁用 os_probe ,防止自动添加 win 项

    然后 40_custom 自定义一个 win 项

    最后 update-grub 一下!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1064 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 93c8b4a0 · 32ms · UTC 18:52 · PVG 02:52 · LAX 11:52 · JFK 14:52
    ♥ Do have faith in what you're doing.