0

I have installed Windows 10 and then Ubuntu 18.04, I can see grub and able to choose between the OS's.

Later after somedays, I have installed Ubuntu 18.04 First and then Windows 10, this time system is directly booting to windows 10. But i observed that my linux partitions are there and all data is available. Only thing is it is not showing grub, booting directly to Windows. How can i resolve this. I prefer not to install any software or using shift key all the time to select between OS's.

1 Answers1

1

You have to recreate your grub.

  1. boot from live-CD
  2. mount your filesystems from your original installation e. g.

    sudo mount /dev/sda<#> /mnt

  3. chroot

    sudo chroot /mnt

  4. recreate grub

    sudo grub-install --recheck /dev/sda

If you are using LVM you have to mount /dev/mapper/ /mnt

https://unix.stackexchange.com/questions/226169/chroot-copy-or-mount-bind