1

I have a dual boot system, entering in Grub, with i could choose between Windows 10 and Ubuntu in one ssd. All was fine since november update of W10. The boot is UEFI and when i power the laptop it cant enter in grub and goes to windows ahead.

Ive a /boot partition in Ubuntu. I have some important documents in ubuntu and i need a step by step guide.

If i enter in BIOS and change UEFI to Legacy mode, it gets stuck waiting for a bootable disk. If i change again to UEFI mode it starts Windows 10.

Any help would be apreciated.

0

1. Boot from a live disk/usb

2. Mount the ubuntu root partition to /mnt. Find out ubuntu root partition by either

lsblk

or

sudo fdisk -l

(Assuming its sda5)

sudo mount /dev/sda5 /mnt

3. Bind mount other necessary partitions

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

4. Chroot into /mnt

sudo chroot /mnt

5. Install grub

grub-install /dev/sda

6. Update Grub

sudo update-grub

7. Exit

ctrl + D

8. Reboot

  • Thanks but it doesnt work Ive created an usb live:.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu. Every /dev/sda* appear mounted in /media/ubuntu/02bc.... large name. My boot partition is /dev/sda6, My / is /dev/sda8m swap is /dev/sda7....I can read all in gparted. It gives me error when i execute grub-install /dev/sda as root: Permission denied error /usr/lib/grub/i386-pc/modinfo.sh doesnt exist. Pleease specify --target or --directory. I also tried to run grub-install --boot-directory=/media/ubuntu/02bcda.... /dev/sda . Any help would be apreciated – Eduardo Gutierrez Nov 20 '15 at 17:20
  • paste.ubuntu.com/13369587 All my information of boot repair i could get from the live usb. Hope it helps. – Eduardo Gutierrez Nov 20 '15 at 19:07
0

After many tries i got a solution, hope it helps other people... Similar to duplicated post suggested but bit different as i have an partition for EFI:

What worked for me:

0) If not installed ( i have 64 bits system):

sudo apt-get install grub-efi-amd64

( this solves problems like Permission denied error /usr/lib/grub/i386-pc/modinfo.sh doesnt exist.Pleease specify --target or --directory).

1) Install gksudo:

sudo apt-get install gksu

2) It didnt work for me, but you dont loose anything to try it:

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install boot-repair

Execute boot-repair and use Recomended Repair.

If it doesnt work:

Observation: ( if live cd mounts any of this partitions, unmount them before mounting again in these folders):

4 ) As my / partition is /dev/sda8

sudo mount /dev/sda8 /mnt

5) This step Only if you have a separate boot partition ( my case /dev/sda6):

sudo mount /dev/sda6 /mnt/boot

Only if you have EFI in another partition also: mount the EFI partition . This solves errors like seems no efi partition

sudo mount /dev/sda2 /mnt/boot/EFI

6) Mount the critical virtual filesystems:

sudo mount --bind /dev /mnt/dev sudo mount --bind /dev/pts /mnt/dev/pts sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys

7) Chroot into your normal system device: sudo chroot /mnt

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number. In my case /dev/sda

grub-install /dev/sdX

10) Verify the install (use the correct device, for example sda. Do not specify a partition):In my case /dev/sda

grub-install --recheck /dev/sdX

11) Exit chroot: CTRL-D on keyboard exit

reboot

Optional: install grub-customizer in order to alter names and position of the entries

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.