What to do with grub old config?


update BIOS ruin grub only left windows. I restore grub according Restore grub after window 8 installation

$ sudo su   # 切换到 root
# parted -l
# mount /dev/nvme0n1p2 /mnt # 挂载系统根分区到 /mnt
# mount /dev/nvme0n1p1 /mnt/boot/efi    # 挂载 efi 分区到 /mnt/boot/efi
# arch-chroot /mnt  # 不是很懂,大概就是把这个挂载点认为是根分区
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EnOS   # 将 grub 安装为 bootloader
# grub-mkconfig -o /boot/grub/grub.cfg  # 生成配置文件

now I can boot into enOS. and then append GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. then sudo grub-mkconfig -o /boot/grub/grub.cfg. now grub menu has windows.

system works fine

what question

Is safe to delete endeavouros and Manjaro list below? now en grub is named EnOS(see info command). endeavouros is former config. Manjaro is the linux I use before endeavouros.

I kown Lenovo and Microsoft for what use. just keep both.

$ ls /boot/efi/EFI/
Boot  endeavouros  EnOS  Lenovo  Manjaro  Microsoft
1 Like

You can delete unused entries.

You can also check efibootmgr and see if there are any old unused entries there to be deleted

efibootmgr got Windows, EnOS. so i can del endeavouros and Manjaro.

$ efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0013,0014,0015,0016,0017,0018,0019
Boot0000* Windows Boot Manager  HD(1,GPT,171ffb3e-6c37-4801-8b11-3ba3cea2e27a,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0001* EnOS  HD(1,GPT,171ffb3e-6c37-4801-8b11-3ba3cea2e27a,0x800,0x82000)/File(\EFI\EnOS\grubx64.efi)
Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu     FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0012  UEFI Diagnostics      FvFile(f8397897-e203-4a62-b977-9e7e5d94d91b)
Boot0013* NVMe: WDC PC SN730 SDBPNTY-512G-1101          PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-1B-44-8B-46-3A-AB-8F){99191c00-d932-4e4c-ae9a-a0b6e98eb8a4}
Boot0014* ATA HDD:      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot0015* ATA HDD1:     VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot0016* ATAPI CD:     VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot0017* USB HDD: SMI USB DISK PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(5,0){aa21e833-33af-47bc-89bd-419f88c50803}
Boot0018* USB FDD:      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0019* USB CD:       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)

$ sudo rm /boot/efi/EFI/Manjaro/ -r
$ sudo rm /boot/efi/EFI/endeavouros/ -r

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.