I had a dual-boot (Ubuntu+Win10) configuration on my laptop (single disk). Due to space limitations, I had to delete the Ubuntu partitions (root, home, swap in extended partition) and extend the big NTFS partition to the full disk. Unfortunately the Grub configuration was stored in the Ubuntu part. So I was not able to boot any more. I just got to the grub repair CLI.
During repair attempts using a Ubuntu 20.04 live USB stick, I got to the point where I now have sda1 (NTFS 500MB), sda2 (Windows 10, 250GB), sda3 (Windows recovery) and sda4 (300MB ext4 designated as /boot partition for Grub). With the latter I try to repair the existing configuration. I installed grub using grub-install --root-directory /mnt/sda4 /dev/sda
from this post.
I am able to boot into the Grub CLI (2.04). With the commands from this post, I can boot into Win10 again:
insmod chain
insmod ntfs
set root=(hd0,msdos1)
chainloader +1
boot
But at this point I am stuck. I do not see how to install the grub menu permanently again. Commands like update-grub
or grub2-mkconfig
(run from the live stick) require not to be run from the live stick. I tried chroot
, but was not successful. All manuals that I found assume that one Linux OS is still installed, which seems to be the "basis" of chroot
. I want to get a running Windows-only configuration. Right now it would be ok if it is with a Grub bootloader.
It would be better to use the Windows bootloader, but I seem not to be able to start the recovery mode despite hitting F8 on Windows boot and also have no Windows recovery media.
So does someone have a clue on how to permanently add the windows boot entry to Grub in this scenario? A quick workaround which does not require me to type the five commands on every boot would also be fine. Thanks :-)