![EndeavourOS 설치 후(라이브 USB를 통해) grub이 작동하지 않습니다.](https://linux55.com/image/175816/EndeavourOS%20%EC%84%A4%EC%B9%98%20%ED%9B%84(%EB%9D%BC%EC%9D%B4%EB%B8%8C%20USB%EB%A5%BC%20%ED%86%B5%ED%95%B4)%20grub%EC%9D%B4%20%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
이전에 Ubuntu를 설치했던 /dev/sda 파티션의 가이드에 따라 라이브 USB를 통해 EndeavorOS(아치 리눅스 기반)를 설치했는데 제대로 실행되었습니다. 또한 Windows 10이 설치된 별도의 하드 드라이브인 /dev/sdb 파티션도 있습니다. 컴퓨터를 켤 때마다 grub 쉘에 들어가지만 두 OS 모두 제대로 부팅할 수 없습니다.
다음은 grub 쉘의 출력입니다.
grub>ls
grub>(hd0) (hd1) ... (hd1,gpt2) (hd2,gpt2) (hd1,msdos1)...
필요한 파티션은 (hd1,gpt2)이므로 다음과 같이 합니다.
grub>set root (hd1,gpt2)
grub>linux /boot/vmlinuz-linux root=/dev/sda2
grub>initrd /boot/initramfs_linux.image
grub> boot
정상적으로 EndeavourOS로 부팅됩니다. 그런 다음 grub 설치를 복구하려고 시도했습니다.
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
$ sudo grub-install /dev/sda
그러면 다음 오류가 발생합니다.
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
다음과 같이 EFI 파티션을 지정해 보았습니다.이것답변:
$ sudo mount /dev/sda1 /mnt
$ sudo grub-install --efi-directory=/mnt/EFI
하지만 나는 다음을 얻습니다.
Installing for x86_64-efi platform.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: error: disk `hostdisk//dev/sda1' not found.
/mnt/EFI 디렉토리를 확인했습니다.
$ls /mnt/EFI/
drwxr-xr-x 2 root root 4096 21 apr 2019 BOOT
drwxr-xr-x 3 root root 4096 24 mar 15.22 ubuntu
그래서 USB Live 설치가 파티션을 올바르게 포맷하지 않았을 수도 있다고 생각했습니다. 모든 것을 포맷하고 처음부터 시작하지 않고 이 문제를 해결할 수 있는 방법이 있습니까? 미리 감사드립니다.
편집: 제안된 대로 efi 디렉토리에 /mnt를 호출해 보았습니다.
$ sudo grub-install --efi-directory=/mnt
그리고 이 오류가 발생했습니다:
Installing for x86_64-efi platform.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
이제 내 /mnt/EFI 폴더는 다음과 같습니다.
$ ls /mnt/EFI
BOOT endeavouros ubuntu
$ ls /mnt/EFI/endeavouros
grubx64.efi
$ ls /mnt/EFI/ubuntu
BOOTX64.CSV fw grub.cfg grubx64.efi mmx64.efi shimx64.efi
우분투 폴더를 삭제해야 하나요?
또한 efibootmgr을 실행하여 많은 결과를 얻었습니다.
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,000C,001A,0012,0007,0009,0011,0013,0014,0015,0017,0018,0019,0001,0002,0003
Boot0000* ubuntu
Boot0001* UEFI:CD/DVD Drive
Boot0002* UEFI:Removable Device
Boot0003* UEFI:Network Device
Boot0007 UEFI OS
Boot0009 CD/DVD Drive
Boot000C* UEFI OS
Boot0011 UEFI OS
Boot0012* Unknown Device
Boot0013 ubuntu
Boot0014 ubuntu
Boot0015 UEFI OS
Boot0017 ubuntu
Boot0018 UEFI OS
Boot0019 ubuntu
Boot001A* UEFI OS
해결됨: 팔로우했습니다가이드Wiki에서 UEFI로 라이브 시스템을 부팅합니다(그렇지 않으면 작동하지 않습니다).
답변1
efi 디렉터리가 잘못되었으므로 파티션이 마운트된 경로로 설정해야 합니다. 다음 용도로 도 sudo
사용됩니다 grub-install
.
sudo mount /dev/sda1 /mnt
sudo grub-install --efi-directory=/mnt
편집하다:
efivars(파티션이 아닌 EEPROM 위치 /dev/sda1
)가 가득 차서 정리해야 하는 것 같습니다.
efibootmgr -v
오래된 Ubuntu 항목이 있는 경우 오래된 항목을 실행 하고 삭제합니다.
Boot0014* ubuntu HD(1,GPT,...)/File(\EFI\ubuntu\shimx64.efi)
그럼 삭제해도 돼
sudo efibootmgr -b 0014 -B
또한 dump-*
의 파일을 삭제하십시오 /sys/firmware/efi/efivars
. 이 답변을 참조하십시오.그럽 설치 실패.
네, 디렉터리를 삭제할 수도 있지만 성공적으로 작성되었기 /mnt/EFI/ubuntu
때문에 이것이 오류의 원인은 아닌 것 같습니다 .endeavouros/grubx64.efi
그럼 시도해봐
sudo grub-install --efi-directory=/mnt
다시.