linux fedora35让GRUB 2记住上一次启动的操作系统
生活随笔
收集整理的這篇文章主要介紹了
linux fedora35让GRUB 2记住上一次启动的操作系统
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
linux fedora35讓GRUB 2記住上一次啟動的操作系統
修改符號鏈接/boot/grub2/grubenvWiki上說對于Fedora 20以上的要修改/boot/grub2/grubenv使其以相對路徑指向../efi/EFI/fedora/grubenv(原文:The /boot/grub2/grubenv is symbolic linked to /boot/efi/EFI/fedora/grubenv but /boot is not mounted at the time of booting. So grub2 does not have access to the environment variables. To fix this, change /boot/grub2/grubenv to point to ../efi/EFI/fedora/grubenv instead and your chosen default OS will boot without any problems.)才能奏效,我并沒有嘗試如果不修改此符號鏈接是否能成功。讀者如果有興趣的話可以嘗試不修改此符號鏈接,直接跳到下一步。cd /boot/grub2 rm grubenv ln -s ../efi/EFI/fedora/grubenv grubenv 修改/etc/default/grub原來的/etc/default/grub看起來可能是這樣的:GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="rhgb quiet" GRUB_DISABLE_RECOVERY="true"加入一行GRUB_SAVEDEFAULT=true 生成新的配置文件BIOS機器上:grub2-mkconfig -o /boot/grub2/grub.cfg UEFI機器上:grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg參考鏈接:https://blog.csdn.net/silicon_inspecter/article/details/54809958
總結
以上是生活随笔為你收集整理的linux fedora35让GRUB 2记住上一次启动的操作系统的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: k8s minikube在wsl中通过n
- 下一篇: linux fedora35指定某个固定