1

I've upgraded from Ubuntu 14.04 to 16.04.2, recently. After having a failed upgrade, I reinstalled it using a DVD. Now after completing installation, when the DVD is ejected and I'm restarting, grub is coming up. I can't understand what I'm doing wrong. I followed the usual manual present at Ubuntu site. Please help.

output from lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sr0 11:0 1 1.5G 0 rom /cdrom

loop0 7:0 0 1.4G 1 loop /rofs

sda 8:0 0 465.8G 0 disk

├─sda4 8:4 0 1M 0 part

├─sda2 8:2 0 40M 0 part

├─sda5 8:5 0 7.9G 0 part [SWAP]

├─sda3 8:3 0 3G 0 part

├─sda1 8:1 0 500M 0 part

└─sda6 8:6 0 454.4G 0 part

output of blkid

/dev/sda1: LABEL="ESP" UUID="FA37-2A18" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="ff682bf3-7817-4b03-98dd-3771979e9eb2"

/dev/sda2: LABEL="DIAGS" UUID="AAA2-6116" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="6ccc7ecf-6835-4622-99ad-727d741dfb71"

/dev/sda3: LABEL="OS" UUID="3AA3-6F37" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="25f16079-8a5c-460c-aebc-1065ee3498e5"

/dev/sda6: UUID="9ac4d432-65b5-4897-9a56-0ed86acb9803" TYPE="ext4" PARTUUID="82cbf0c4-bfd7-4b4e-8b18-fa752181e21f"

/dev/sr0: UUID="2017-02-15-21-44-13-00" LABEL="Ubuntu 16.04.2 LTS amd64" TYPE="iso9660" PTUUID="15e2543d" PTTYPE="dos"

output of grub-install

ubuntu@ubuntu:~$ sudo grub-install /dev/sda1

Installing for i386-pc platform.

grub-install: error: failed to get canonical path of `aufs'.

output after formatting hard drive (as obtained from live dvd boot)

ubuntu@ubuntu:~$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sr0 11:0 1 1.5G 0 rom /cdrom

loop0 7:0 0 1.4G 1 loop /rofs

sda 8:0 0 465.8G 0 disk

├─sda2 8:2 0 1K 0 part

├─sda5 8:5 0 3.9G 0 part [SWAP]

└─sda1 8:1 0 461.9G 0 part

ubuntu@ubuntu:~$

2 Answers2

1

Final edit, for the straight to results solution.

Make sure you turn off UEFI completely in BIOS. i.e Use Legacy. If the option UEFI/Legacy appears on more than one BIOS menu, make sure Legacy is selected on all.

Boot into the Live CD

Do not reset or logout until you complete all of the steps or you will have to reinstall any program mentioned here as the Live CD will not save changes.

On the Live session install gparted, either through the GUI Software Center or with sudo apt-get install gparted

Open Gparted from the apps list and then select the hard drive on top right section.

With the drive selected delete all of the partitions on it by right clicking and selecting delete. Write those changes by clicking the check mark icon in the top menu

Once that is complete, select "Device" from the top text menu and "Create Partition Table"

When the pop up appears select ms-dos and write the changes. You can tell it to ignore any errors if you get any more popups.

Once that is done you have an MBR hard drive that is ready for Legacy booting.

Reboot and try installing Ubuntu again. Let the installer auto partition the hardrive, ,i.e Use Entire disk , with or without LVM.

m_krsic
  • 549
  • Thanks m_krsic. But it says that I can't repair boot unless I'm on UEFI mode. I can't get Ubuntu to run on UEFI mode. All I have is the legacy ( via live DVD). Again, I've only Ubuntu installed on my system – Debadri Chowdhury Feb 23 '17 at 19:02
  • Are you dual booting ? – m_krsic Feb 23 '17 at 19:05
  • No. I've only Ubuntu – Debadri Chowdhury Feb 23 '17 at 19:06
  • Can you access your BIOS? Can you check if legacy/mbr mode is enabled? – m_krsic Feb 23 '17 at 19:12
  • Yeah. I can. I'm looking into it now. Should I change boot mode to UEFI? But then, options for booting from DVD and internal HDD are present in legacy. All I can do from UEFI is boot Ubuntu which is getting me stuck at grub2 – Debadri Chowdhury Feb 23 '17 at 19:16
  • Didn't understand MBR though. But there's something called secure boot and that's turned 'on' for UEFI and 'off' for legacy – Debadri Chowdhury Feb 23 '17 at 19:16
  • MBR is the master boot record. – m_krsic Feb 23 '17 at 19:29
  • Sorry for the multiple edits, seeing conflicting steps based on setups when I try to run a test before posting the solution. Can you point me to the exact guide you followed? Also is Secure Boot turned on in your BIOS? – m_krsic Feb 23 '17 at 19:32
  • Guide while installing Ubuntu? Yes secure boot is turned on – Debadri Chowdhury Feb 23 '17 at 19:33
  • Umm. I'm reading here in this link https://www.howtogeek.com/196740/how-to-fix-an-ubuntu-system-when-it-wont-boot/ that reinstalling Ubuntu will fix grub issues. If I reinstall wouldn't it fix the problem (although it's for 14.04) ? Again, shouldld I select "install 16.04.2 along with 16.04.2" over "erase and reinstall"? I tried the latter twice, but didn't work – Debadri Chowdhury Feb 23 '17 at 19:41
  • I edited the answer with some new steps to troubleshoot further based on this https://help.ubuntu.com/community/Grub2/Installing#BIOS.2FMBR_Notes – m_krsic Feb 23 '17 at 20:02
  • "From the desktop open up "Disks" and check to see what "Partitioning" is set to for the physical hard drive that Ubuntu and Grub2 are to be installed on. Is it GPT or is it Master Boot Record?", do i look into the desktop directory? Please bear with me. I don't think i can follow you. Will df command work? Please give me the steps otherwise – Debadri Chowdhury Feb 23 '17 at 20:36
  • sudo grub-install /dev/sda1 should i try this in ubuntu terminal of the live dvd or the grub2 terminal which is coming up on normal boot? – Debadri Chowdhury Feb 23 '17 at 20:38
  • From the ubuntu terminal of the live CD. A couple more questions, was Windows installed on this hard drive before? Have you formatted the hard drive fully since? If you do not have anything that you want to back up and can format the drive fully there is an easier way that is almost guranteed to work. – m_krsic Feb 23 '17 at 20:40
  • i haven't installed windows. Never. All i had before upgrade was ubuntu 14.04 LTS. i do not have anything that i want to backup. all that were there softwares which i can download any time later. just make my system work ;) – Debadri Chowdhury Feb 23 '17 at 20:45
  • Following the above procedure, I've run into another problem. Now after downloading when I remove the installation DVD and reboot, this is what it says- No bootable devices found. Press F1 key to retry boot. F2 to setup utility. F5 to run onboard diagnostics. Please help – Debadri Chowdhury Feb 23 '17 at 22:05
  • What is the boot order in BIOS? Is the hard drive enabled/selected as a primary boot device? – m_krsic Feb 23 '17 at 22:31
  • included it under "output obtained after formatting hard drive" – Debadri Chowdhury Feb 23 '17 at 22:47
1

Check EFI boot path. When booting with secureboot on custom EFI image should be:

EFI\ubuntu\shimx64.efi

Are you using HP computer? Those are having some problem with uefi boot. Hp bug:

https://bugs.launchpad.net/linuxmint/+bug/1309395

Martin
  • 53