GRUB2는 Windows 10 대신 Windows 7 또는 Windows 복구 환경을 보여줍니다. 낸 Q & A이므로 아래 답변을 게시했습니다. Windows

이것은 내가 최근에 알아 낸 Q & A이므로 아래 답변을 게시했습니다.

Windows 10을 설치 한 후 커널 업데이트를 받거나 실행할 때 update-grub2마다 항상 Windows 7또는 Windows Recovery Environment대신 표시 됩니다 Windows 10. 이 문제를 영구적으로 해결하려면 어떻게합니까?



답변

업데이트 : 방금 Xubuntu 14.04를 새로 설치했으며 아래 나열된 파일에 대한 항목이 이미 있습니다. GRUB 팀에 업데이트가 포함 된 것 같습니다. 나는 아직 시스템의 업데이트 없이이 문제를 해결할 수있는 사람을 위해 이것을 남겨 둘 것입니다.


업데이트 # 2 : 최소한 1GB의 영구 파일이있는 Ubuntu 14.04 LiveUSB를 만드는 경우이 파일 위치는 동일하며 영구 파일은 변경 내용을 유지할 수 있습니다. 이 파일은 부팅시 시스템을 USB 드라이브로 Try Ubuntu부팅 한 후에 만 ​​수정해야합니다 .


파일 이 여전히 Windows 7또는 Windows Recovery Environment대신 표시되는 이유 Windows 10는 파일 /usr/lib/os-probes/mounted/20microsoft에 레이블이 포함되어 있지 않기 때문입니다. 따라서 OS 감지 Windows 10중에는 또는로 os-prober돌아갑니다 . Windows 7Windows Recovery Environment

이 문제를 해결하려면 다음 파일을 다음과 같이 변경해야합니다 (gedit를 편집기로 사용하지만 원하는 것을 사용합니다).

sudo gedit /usr/lib/os-probes/mounted/20microsoft

참고 : 파일을 수정하기 전에 항상 파일을 백업해야합니다!

if item_in_dir -q bootmgr "$2"; then
        # there might be different boot directories in different case as:
        # boot Boot BOOT
        for boot in $(item_in_dir boot "$2"); do
                bcd=$(item_in_dir bcd "$2/$boot")
                if [ -n "$bcd" ]; then
                        if grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then
                                long="Windows 10 (loader)"
                        elif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
                                long="Windows 8 (loader)"
                        elif grep -qs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
                                long="Windows 7 (loader)"

위의 변경 사항은 행 if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then을 로 변경하고 해당 행 을 elif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then추가 if grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then하고 long="Windows 10 (loader)"위에 저장합니다.

일단 저장되면 다음 os-prober과 같이 실행됩니다 .

terrance@terrance-ubuntu:~$ sudo os-prober
[sudo] password for terrance:
/dev/sdf1:Windows 10 (loader):Windows:chain

다음 실행 update-grub2은 지금에 업데이트를 할 것입니다 /boot/grub/grub.cfg지금 (아래 예) 윈도우의 올바른 버전을 보여줍니다 있도록 커널 업데이트를 얻을 영구 언제 :

terrance@terrance-ubuntu:~$ sudo update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.19.0-26-generic
Found initrd image: /boot/initrd.img-3.19.0-26-generic
Found linux image: /boot/vmlinuz-3.13.0-58-generic
Found initrd image: /boot/initrd.img-3.13.0-58-generic
Found linux image: /boot/vmlinuz-3.13.0-57-generic
Found initrd image: /boot/initrd.img-3.13.0-57-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 (loader) on /dev/sdf1
done

도움이 되었기를 바랍니다!