
Windows 부트 로더가 GRUB를 덮어쓴다고 들었으므로 GRUB 부트 로더를 다시 설치하려면 어떻게 해야 합니까?
답변1
"Try Ubuntu" 모드에서 라이브 CD 또는 라이브 USB로 부팅합니다. 기본 파티션의 파티션 번호를 결정합니다. 여기에서 GParted(기본적으로 라이브 세션에 이미 설치되어 있음)가 도움이 될 수 있습니다. 이 답변에서는 /dev/sda2라고 가정하겠습니다. 하지만 시스템에 맞는 올바른 파티션 번호를 사용했는지 확인하세요!
Mount your partition:
sudo mount /dev/sda2 /mnt #Replace sda2 with your partition number
Bind mount some other necessary stuff:
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
chroot into your Ubuntu install:
sudo chroot /mnt
At this point, you're in your install, not the live session, and running as root. Update grub:
update-grub
If you get errors, go to step 7. (Otherwise, it is optional.)
Depending on your situation, you might have to reinstall grub:
grub-install /dev/sda
update-grub # I'm not sure if this is necessary, but it doesn't hurt.
If everything worked without errors, then you're all set:
exit
sudo reboot
At this point, you should be able to boot normally.
정상적으로 부팅이 되지 않고, 오류 메시지가 없어 7단계를 진행하지 않았다면 7단계부터 다시 시도해 보세요.
때때로 GRUB2에 파티션에 대한 올바른 구성을 제공하는 것만으로는 충분하지 않으며 실제로 마스터 부트 레코드에 설치(또는 재설치)해야 하며, 이는 7단계에서 수행됩니다. 채팅에서 사용자를 지원한 경험에 따르면 오류 메시지가 표시되지 않는 경우에도 7단계가 필요한 경우가 있습니다.
답변2
Ubuntu 설치 미디어에서 부팅하고 다음을 선택하십시오.설치하지 않고 Ubuntu를 사용해 보세요. Ubuntu Live 데스크탑에 들어가면 터미널을 열고 다음 명령을 실행하십시오.
귀하의 기계에UEFI BIOSWindows와 Ubuntu는 EFI 모드로 설치됩니다.
sudo mount /dev/sd*** /mnt
sudo mount /dev/sd** /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sd*
update-grub
참고: sd*
= 디스크 | sd**
= efi 파티션 | sd***
= 시스템 파티션
만약에레거시 BIOSWindows와 Ubuntu는 MBR(msdos) 모드로 설치됩니다.
sudo mount /dev/sd** /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sd*
참고: sd*
= 디스크 | sd**
= 시스템 파티션
디스크 및 파티션 번호를 식별하려면 다음을 사용할 수 있습니다.GParted- 설치미디어에 포함되어 있습니다.