I have a Lenovo Y520 laptop running Windows 10 and Ubuntu 20.04 with a dual-boot setup. A while ago, Windows decided it no longer wants to boot, and the machine would hum for a while and then promptly shut down when I selected Windows from the grub menu. I barely use Windows and spend 99% of my time in Ubuntu anyway, so I ignored the issue (since Ubuntu still worked). Until yesterday, when I decided I would try to fix this problem...
I came across an answer online that said to edit the /boot/grub/grub.cfg
file, namely to find the line chainloader +1
in the Windows menu option and add the line ntldr /bootmgr
below it. I restarted the laptop and selected Windows from the grub menu, and got a black background with the message "Command ntldr is missing" and prompting me to press Enter to continue. Which I did, and that took me to the grub rescue console. At this point I (stupidly) got worried and powered the laptop off by holding in the power button, thinking I'd boot back into Ubuntu and remove the offending line from the grub config, and continue debugging.
Only now nothing boots - not even grub. The laptop simply hangs on the Lenovo logo indefinitely. I've tried pressing all the F-keys, holding power in for 10 seconds, pressing power and F9 simultaneously, and nothing helps. I can only shut down by holding the power in again.
Is there a way to remedy this situation without having to format the laptop? Most of my important data is backed up, but there's still a lot on there that I'd rather not lose. Any suggestions are welcome. Obviously I'd like to save the whole setup but if it's a choice between losing Ubuntu or losing Windows, I'd prefer to keep my Ubuntu partitions safe.
If that doesn't work,
Finally, on some machines you might need to edit the boot .efi files. DiskGenius has a useful guide to editing these boot options. On some PC's I've found the only way to have Grub2 show consistently is by copying the Windows .efi file as a backup and renaming shhim64.efi or similar Linux file o that of the Windows option.
N.B. Make a full disk image before editing UEFI boot items, lest a change make the device unbootable.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다