두 개의 Linux 설치.. 2 grub 원본 버전을 원합니다

두 개의 Linux 설치.. 2 grub 원본 버전을 원합니다

Ardor 부팅을 위해 두 번째 보조 Linux를 설치한 후 원래 kdeneon에 grub을 설치할 수 없습니다. (다른 설정을 선호합니다).

대부분의 지침에는 sudo grub-install /dev/sda가 나와 있지만 해당 드라이브가 없으며 grub-update 후에는 원래 상태로 되돌아가지 않습니다.

무엇을 입력해야 하나요?

lsblk는 다음을 보여줍니다.

$ lsblk -f
NAME        FSTYPE   LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINT
nvme0n1                                                                           
├─nvme0n1p1 vfat     ESP      7C8F-092C                              23.7M    75% /boot/efi
├─nvme0n1p2                                                                       
├─nvme0n1p3 ntfs              04106A7F106A7816                                    
├─nvme0n1p4 ntfs     Recovery 44CC9028CC901670                                    
├─nvme0n1p5 ext4              749f67cc-2bca-4a9b-bca0-138ba97b6bc7   52.2G    33% /
├─nvme0n1p6 ext4              fc432fe9-2f83-4973-8675-e53dd8de2258                
└─nvme0n1p7 ntfs     Data     7914628E7BB468B5  

  sudo efibootmgr -v
[sudo] password for bhante: 
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0004,0001,0000,0005,2001,2002,2003
Boot0000* yes   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-26-B7-68-28-F3-73-A5)/HD(1,GPT,82e9aa6b-7b75-49ad-b362-7e51a9085ed9,0x800,0x32000)/File(\EFI\deepin\shimx64.efi)A01 ..
Boot0001* Linpus lite   HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Boot\grubx64.efi)RC
Boot0003* ubuntu        HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0004* Windows Boot Manager  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0005* neon  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\neon\shimx64.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

다음은 명령의 출력입니다.

bhante@subhuntu:~$ sudo grub-install /dev/nvme0n1
Installing for x86_64-efi platform.
Installation finished. No error reported.
bhante@subhuntu:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/99_breeze-grub.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/breeze/theme.txt
Found linux image: /boot/vmlinuz-5.4.0-65-generic
Found initrd image: /boot/initrd.img-5.4.0-65-generic
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition 5.20 (20.04) on /dev/nvme0n1p6
Warning: Please don't use old title `Neon GNU/Linux (on /dev/nvme0n1p6)' for GRUB_DEFAULT, use `Advanced options for KDE neon User Edition 5.20 (20.04) (on /dev/nvme0n1p6)>Neon GNU/Linux (on /dev/nvme0n1p6)' (for versions before 2.00) or `gnulinux-advanced-fc432fe9-2f83-4973-8675-e53dd8de2258>gnulinux---fc432fe9-2f83-4973-8675-e53dd8de2258' (for 2.00 or later)
Found linux image: /boot/vmlinuz-5.4.0-65-generic
Found initrd image: /boot/initrd.img-5.4.0-65-generic
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition 5.20 (20.04) on /dev/nvme0n1p6
Warning: Please don't use old title `Neon GNU/Linux (on /dev/nvme0n1p6)' for GRUB_DEFAULT, use `Advanced options for KDE neon User Edition 5.20 (20.04) (on /dev/nvme0n1p6)>Neon GNU/Linux (on /dev/nvme0n1p6)' (for versions before 2.00) or `gnulinux-advanced-fc432fe9-2f83-4973-8675-e53dd8de2258>gnulinux---fc432fe9-2f83-4973-8675-e53dd8de2258' (for 2.00 or later)
Found linux image: /boot/vmlinuz-5.4.0-65-generic
Found initrd image: /boot/initrd.img-5.4.0-65-generic
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition 5.20 (20.04) on /dev/nvme0n1p6
Warning: Please don't use old title `Neon GNU/Linux (on /dev/nvme0n1p6)' for GRUB_DEFAULT, use `Advanced options for KDE neon User Edition 5.20 (20.04) (on /dev/nvme0n1p6)>Neon GNU/Linux (on /dev/nvme0n1p6)' (for versions before 2.00) or `gnulinux-advanced-fc432fe9-2f83-4973-8675-e53dd8de2258>gnulinux---fc432fe9-2f83-4973-8675-e53dd8de2258' (for 2.00 or later)
Adding boot menu entry for UEFI Firmware Settings
done

이것은 cat /etc/default/grub btw의 출력입니다. 모든 작업은 기본값으로 설정하려는 kdeneon의 Linux 부팅에서 수행됩니다.

~$ cat /etc/default/grub           
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="Neon GNU/Linux (on /dev/nvme0n1p6)"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="3"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_SAVEDEFAULT="false"
GRUB_THEME="/boot/grub/themes/breeze/theme.txt"

시작할 때 나타나기를 원합니다. (네온 조명이 2개 있습니다.) 그럽 커스터마이저

업데이트 14/2 이것은 몇 가지 제안을 시도한 후 efibootmgr -v의 출력입니다. 이상한 점은 이것이 명령을 실행한 후라는 것입니다.

sudo efibootmgr -d /dev/nvme0n1 -n 5 -o 0005,0003,0004

그래서 무슨 일이 일어나고 있는지 잘 모르겠습니다.

bhante@subhuntu:~$ sudo efibootmgr -v
[sudo] password for bhante: 
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0003,0004,0005,0001,2001,2002,2003
Boot0000* yes   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-26-B7-68-28-F3-73-A5)/HD(1,GPT,82e9aa6b-7b75-49ad-b362-7e51a9085ed9,0x800,0x32000)/File(\EFI\deepin\shimx64.efi)A01 ..
Boot0001* yes   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-26-B7-68-28-F3-73-A5)/HD(1,GPT,82e9aa6b-7b75-49ad-b362-7e51a9085ed9,0x800,0x32000)/File(\EFI\deepin\shimx64.efi)A01 ..
Boot0002* Linpus lite   HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Boot\grubx64.efi)RC
Boot0003* ubuntu        HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0004* Windows Boot Manager  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0005* neon  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\neon\shimx64.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

이것은 이전 실행과 동일한 출력입니다.

bhante@subhuntu:~$ sudo efibootmgr -d /dev/nvme0n1 -n 5 -o 0005,0003,0004
BootNext: 0005
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0005,0003,0004
Boot0000* yes
Boot0001* yes
Boot0002* Linpus lite
Boot0003* ubuntu
Boot0004* Windows Boot Manager
Boot0005* neon
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

답변1

현재 Boot0003의 grub2 efi 실행 파일로 부팅하고 있으며 Neon(Boot0005)의 실행 파일로 부팅하고 싶으십니까?

그런 다음 실행: sudo efibootmgr -d /dev/nvme0n1 -n 5다음 부팅을 선택하여 네온 부팅 관리자로 들어갑니다.

현재 부팅 순서는 Ubuntu의 grub2 efi 실행 파일로 기본 설정되어 있습니다. (etc)를 efibootmgr의 인수로 사용하여 부팅 순서를 변경할 수 있습니다 -o 0005,0003,0004.

이것은 grub2-install실제로 도움이 되지 않습니다. 읽고 있는 문서는 아마도 UEFI보다 이전 버전일 것입니다. 적절한 시스템에 대한 화재 진입을 시작하도록 펌웨어에 지시하기만 하면 됩니다.

답변2

드라이브는 NVMe 드라이브 /dev/nvme0n1입니다.

따라서 설치로 부팅하는 경우 기본값으로 부팅하기를 원합니다.

sudo grub-install /dev/nvme0n1

또한보십시오:

man grub-install

기본값이 작동해야 하지만 UEFI를 설치할 때 다양한 옵션이 있습니다. fstab에 올바른 ESP가 설치되어 있어야 합니다. 다음을 통해 확인할 수 있습니다.

cat /etc/fstab

UEFI 부팅 항목을 확인할 수도 있습니다.

sudo efibootmgr -v

오래된 항목을 정리하고 싶다면. 오래된 항목만 삭제하십시오.

https://askubuntu.com/questions/1198221/cloning-ssd- also-cloned-boot-options/1198228#1198228

필요한 설치로 부팅할 수 없는 경우 일반적으로 해당 설치로 루트를 변경하여 필요한 파티션을 마운트해야 합니다. 신규 사용자의 경우 라이브 설치 프로그램에서 부팅 복구를 사용하는 것이 더 쉬운 경우가 많습니다.

https://help.ubuntu.com/community/Boot-Repair

UEFI 루트 디렉터리:

http://askubuntu.com/questions/53578/can-i-install-in-uefi-mode-with-the-alternate-installer/57380#57380

부팅 순서를 변경하려면 efibootmgr을 -o 옵션과 함께 사용하여 순서를 변경하세요.

https://askubuntu.com/questions/485261/change-boot-order-using-efibootmgr

관련 정보