0

I currently have a Windows 10 and Ubuntu 16.04 dual boot on my PC. This issue happened because i have installed windows after Ubuntu.

I have tried to boot from a live-USB and reinstalling Grub using the terminal following this link http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

Also using the grub repair tool but with no success!

And now I am stuck in this grub2 command line screen:

Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.
grub>

I got this output after running lsblk; sudo parted -l

Model: ATA WDC WD3000HLFS-0 (scsi)
Disk /dev/sda: 300GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  525MB  524MB  primary  ntfs         boot
 2      525MB   300GB  300GB  primary  ntfs

Model: ATA WDC WD3000HLFS-0 (scsi)
Disk /dev/sdb: 300GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  300GB  300GB  primary  ext4

Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  8002MB  8001MB  primary   linux-swap(v1)
 2      8003MB  500GB   492GB   extended
 5      8003MB  28.0GB  20.0GB  logical   ext4
 6      28.0GB  28.5GB  500MB   logical   ext4
 7      28.5GB  43.5GB  15.0GB  logical   ext4
 8      43.5GB  58.5GB  15.0GB  logical   ext4
 9      58.5GB  88.5GB  30.0GB  logical   ext4            boot
10      88.5GB  500GB   412GB   logical   ext4

Model: JetFlash Transcend 16GB (scsi)
Disk /dev/sdd: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  15.8GB  15.8GB  primary  fat32        boot, lba
  • Will you append the output of lsblk; sudo parted -l to your question? – L. D. James Oct 4 '16 at 13:25
  • @L.D.James Done, i have appended the output to the question. – Osama Ahmaro Oct 4 '16 at 13:50
  • Is sdc6 the /boot-partition? If so you should have mounted the partition as well during your repair-attempt. After the first command (following your link) sudo mount /dev/sdXY /mnt you would have to mount the boot-partition sudo mount /dev/sdc6 /mnt/boot and then go on with the other commands in the link. We can't see what sdc6 is, but looking at the size it could be a /boot-partition, you are the one who knows... – mook765 Oct 4 '16 at 14:40
  • When you performed the steps in the link, what did you specify for /dev/sdaXY and /dev/sdX? Also when you performed the steps, did you get any errors at all? And finally, do you know for sure which partition has your Ubuntu insalled? – L. D. James Oct 4 '16 at 14:59
  • @mook765 Yes! sdc6 is my boot partition, and mounting the boot partition didn't solve the problem! – Osama Ahmaro Oct 4 '16 at 15:12
1

From your Question and comments the resolution will be the following:

Boot to the live disk and run these steps. the /dev/sdXY is replaced for the specifics of the information you have provided.

The c6 in step 1 and the a in step 4 are variables. The c6 should be replaced with the partition of your Ubuntu install. The a should be replaced with the default boot that you have set in your bios.

The prefix :$ and :# are the command prompts you see on the terminal.

1:$ sudo mount /dev/sdc6 /mnt
2:$ for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done
3:$ sudo chroot /mnt
4:# grub-install /dev/sda
5:# update-grub
6:# exit
7:$ for i in /sys /proc /run /dev; do sudo umount "/mnt/$i"; done
8:$ exit

Reboot.

Ensure that you have UEFI enabled in your BIOS if is a later model computer with that feature.

  • i get this problem : mount: special device /dev/sda6 does not exist, i have checked gparted and it only shows that i have sda1 and sda2 i don't have sda6!, and i don't recall that my bois have EUFI feature, its an old motherboard! – Osama Ahmaro Oct 4 '16 at 16:09
  • Sorry... that should be /dev/sdc6. I'm modifying the answer. The last is correct... the /dev/sda. So you have two parameters... /dev/sdc6 and /dev/sda to put in the commands above. – L. D. James Oct 4 '16 at 16:15
  • running the 2nd line causes the following error mount: mount point /mnt//sys does not exist mount: mount point /mnt//proc does not exist mount: mount point /mnt//run does not exist mount: mount point /mnt//dev does not exist I don't know what is happening i think it was working before! – Osama Ahmaro Oct 4 '16 at 16:21
  • From the error output it appears that you have a double slash "//" in that line. Can you verify that it's only a single slash "/"? – L. D. James Oct 4 '16 at 16:23
  • even with single line it give me this error mount: mount point /mnt/sys does not exist mount: mount point /mnt/proc does not exist mount: mount point /mnt/run does not exist mount: mount point /mnt/dev does not exist – Osama Ahmaro Oct 4 '16 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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