이 스크립트를 Ubuntu의 Grub 커 스터 마이저의 소스 섹션에 붙여 넣어 Windows 항목을 생성했습니다. 하지만이 스크립트를 다른 PC에서 복사했습니다. 이 코드의 1A23-C8F4 부분은 Windows 파일에서이 코드를 찾을 수있는 Windows 용 PC에서 다릅니다. 이 코드는 어디에 있습니까?
insmod part_gpt
insmod fat
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 1A23-C8F4
else
search --no-floppy --fs-uuid --set=root 1A23-C8F4
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
그러나이 스크립트는 작동합니다. 그냥 작은 오류가 발생하고 Enter 키를 누르면 Windows를 사용할 수 있습니다. :).
이것은 UUID
해당 OS를 설치 한 파티션이며 시스템을 부팅 할 때이 장치에서 부트 로더를 검색합니다. 당신은 볼 수 있도록 UUID
에서 두 /etc/fstab
명령을 사용하여
cat /etc/fstab
또는
ll /dev/disk/by-uuid/
또는
sudo blkid
내 시스템에서는
....
else
search --no-floppy --fs-uuid --set=root a119cedc-3e53-4c17-8bdc-a6878c29adc9
....
과
ll /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Oct 3 16:32 ./
drwxr-xr-x 4 root root 80 Oct 3 18:32 ../
lrwxrwxrwx 1 root root 10 Oct 3 16:32 44a67255-60f1-44e6-8c3d-bdfc5a517c29 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 3 16:32 a119cedc-3e53-4c17-8bdc-a6878c29adc9 -> ../../dm-0
그리고 /etc/fstab
항목은
# /boot was on /dev/sda1 during installation
UUID=44a67255-60f1-44e6-8c3d-bdfc5a517c29 /boot ext2 defaults 0 2
ntfs 파티션의 경우 UUID의 크기가 다를 수 있으므로 신경 쓰지 마십시오.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다