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.

PRATAP
  • 22,460

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

  • @Wigalf Pimwick Thanks for the response. /dev/sda# this # is the number of EFI partition which I created when installing Ubuntu 18.04? – PRATAP Jun 02 '18 at 06:32
  • /dev/sda# is the partition with your root-filesystem. You may check this with fdisk -l /dev/sda – Wiglaf Pimwick Jun 02 '18 at 10:35
  • have a look at sudo fdisk -l Gerät Boot Start Ende Sektoren Größe Id Typ /dev/sda1 2048 528533503 528531456 252G 7 HPFS/NTFS/exFAT /dev/sda2 999088128 1000214527 1126400 550M 7 HPFS/NTFS/exFAT /dev/sda3 * 528533504 529582079 1048576 512M ef EFI (FAT-12/16/32) /dev/sda4 529584128 999088127 469504000 223,9G 8e Linux LVM – Wiglaf Pimwick Jun 02 '18 at 10:42