
어제 내 OS 버전을 Kubuntu 20.04에서 22.04로 업데이트했습니다. 불행히도 많은 문제가 발생했습니다(주로 Grub 2.06에서).
오늘 Grub을 부팅할 때 다음 오류가 발생했습니다.
minimal BASH like line editing is supported (...).
일반적인 그래픽 인터페이스 대신 입력을 요청하는 CLI가 표시되었습니다. 나는 성공적으로 다음과 같은 조언을 통해 문제를 일시적으로 해결했습니다.이 게시물은 geeksforgeeks.org에 있습니다..
다음 명령을 실행하여:
set root=(hd1,gpt2)
set prefix=(hd1,gpt2)/boot/grub
insmod normal
normal
그리고
sudo grub-install /dev/sdXY (in my case, /boot/efi is located on sdb3)
sudo update-grub
내 OS를 부팅할 때. 그러나 재부팅해도 문제가 지속되고 다시 CLI로 전송됩니다.
출력
sudo update-grub
다음과 같다:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-52-generic
Found initrd image: /boot/initrd.img-5.15.0-52-generic
Found linux image: /boot/vmlinuz-5.4.0-131-generic
Found initrd image: /boot/initrd.img-5.4.0-131-generic
Found linux image: /boot/vmlinuz-5.4.0-56-generic
Found initrd image: /boot/initrd.img-5.4.0-56-generic
Found linux image: /boot/vmlinuz-5.15.0-52-generic
Found initrd image: /boot/initrd.img-5.15.0-52-generic
Found linux image: /boot/vmlinuz-5.4.0-131-generic
Found initrd image: /boot/initrd.img-5.4.0-131-generic
Found linux image: /boot/vmlinuz-5.4.0-56-generic
Found initrd image: /boot/initrd.img-5.4.0-56-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sdb3@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Found linux image: /boot/vmlinuz-5.15.0-52-generic
Found initrd image: /boot/initrd.img-5.15.0-52-generic
Found linux image: /boot/vmlinuz-5.4.0-131-generic
Found initrd image: /boot/initrd.img-5.4.0-131-generic
Found linux image: /boot/vmlinuz-5.4.0-56-generic
Found initrd image: /boot/initrd.img-5.4.0-56-generic
Found Windows Boot Manager on /dev/sdb3@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
출력 grub-install
:
Installing for x86_64-efi platform.
Installation finished. No error reported.
출력df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 1629800 1972 1627828 1% /run
/dev/sdb2 205377444 77481204 117390824 40% /
tmpfs 8148984 512 8148472 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
/dev/sdb3 998480 37892 960588 4% /boot/efi
/dev/sda1 557135192 205411480 323349288 39% /media/User/Linux HDD
tmpfs 1629796 84 1629712 1% /run/user/1000
/dev/sdb4 277079036 24608052 252470984 9% /media/User/Windows_10
/dev/sdc1 976758780 504811472 471947308 52% /media/User/Seagate
출력fdisk -l
Device Start End Sectors Size Type
/dev/sda1 2048 1134323711 1134321664 540,9G Linux filesystem
Disk /dev/sdb: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9592ABCA-3C53-4225-B388-FDF8B09DF156
Device Start End Sectors Size Type
/dev/sdb1 2048 34815 32768 16M Microsoft reserved
/dev/sdb2 1052672 420614143 419561472 200,1G Linux filesystem
/dev/sdb3 420614144 422615039 2000896 977M EFI System
/dev/sdb4 422615040 976773119 554158080 264,2G Microsoft basic data
이것을 어떻게 지나칠 수 있나요?
답변1
메뉴를 찾는 grub의 연결 끊김을 추적합니다. /boot/efi/EFI/ubuntu/grub.cfg 파일을 cat하고 거기에 있는 UUID를 /dev/sdb2의 UUID와 비교합니다(sudo blkid가 이를 나열합니다). 일치해야 합니다. 그런 다음 configfile 명령은 UUID를 사용하여 grub 메뉴의 /boot/grub/grub.cfg 파일을 가져옵니다. 파일이 존재합니까?
답변2
/boot/efi/EFI/pop/grub.cfg
나와 같은 pop os(또는 잠재적으로 다른 배포판)를 사용 하는 경우 에 구성된 파티션이 echo $prefix
및 echo $root
.
GRUB는 기본적으로 롤빵을 사용 /boot/efi/EFI/ubuntu/grub.cfg
하고 그것이 존재하지 않는 경우(삭제되었거나 뭔가) 일부 기본값을 사용하는 것으로 나타났습니다.
짧은 대답은 배포판을 grub.cfg
'/boot/efi/EFI/ubuntu/grub.cfg'에 복사하는 것입니다.