PDA

View Full Version : 16.04 x64 grub install fails - UEFI to blame?



don-j-cooper
February 3rd, 2017, 09:29 PM
Building a new PC to replace my decade+ old PC running 12.04. Thought this was going to be easy as, with the mobo etc. installed but storage still on the way, I stuck an old SATA drive into the machine and booted from 16.04 on a USB drive. Told the installer to use the whole drive and it all installed perfectly. Once storage and graphics card had arrived and been fitted I did another install but this time partitioning the target disk (/dev/sda). This fell over pretty quickly with a warning message about legacy BIOS OS's that wouldn't be usable if I continued with a UEFI installation. There was no other OS installed at this stage but this message window wouldn't close even when clicking on Continue so abandoned that attempt - I'd seen the same message the first time round but was able to click through it then.

Thought this might be down to missing something in the setup on the UEFI side of things - not had to worry about that before - and as I was going to have a Win7 dual boot eventually anyway tried installing that on /dev/sdb. After the usual Windows type problems I had that up and running so tried again with Ubuntu. Now when I tried installing Ubuntu I could see /dev/sda already had 100MB NTFS partition so I just set up the usual partitions on the remainder of the disk with the boot loader to go on /dev/sda. I was hoping that, as with the BIOS type installs I'm more familiar with, Ubuntu would just modify the boot loader to give me dual booting. This looked promising as it seemed to go through the whole install then fell over in a heap at the end with a message that it could not install grub. Any thoughts as to what the problem might be most welcome.

oldfred
February 3rd, 2017, 10:39 PM
New system will be UEFI.
And probably better to use UEFI/gpt even for Windows 7.
But Windows 7 default install from DVD is BIOS/MBR only. Best to copy to flash drive, and convert installer to UEFI. Then boot in UEFI mode to install in UEFI mode.

Windows only works from gpt partitioned drive with UEFI and only from MBR partitioned drive with BIOS.

You cannot install Ubuntu in UEFI mode to sdb, unless you have an ESP - efi system partition on sda. Which would be a default if Windows installed in UEFI boot mode.
If you really want Windows in BIOS/MBR, you can still use gpt partitioning on sdb, but have to have a bios_grub partition for grub to install correctly.
Grub need either the ESP FAT32 300 to 500MB (UEFI) or bios_grub(BIOS) to install on gpt drives. I normally put both the FAT32 for UEFI and unformatted 1 or 2MB bios_grub on every new drive including larger flash drives.

How to Create a Bootable UEFI USB Flash Drive for Installing Windows 7, Windows 8, or Windows 8.1 - Also command line install of files to efi partition uses rufus
http://www.eightforums.com/tutorials/15458-uefi-bootable-usb-flash-drive-create-windows.html
You cannot use the Win7 DVD in UEFI mode, you need to use BIOS mode or modify to USB with UEFI.
Convert Windows 7 install to UEFI This user said he need the repair/recovery from his Windows 8 to convert Windows 7
http://ubuntuforums.org/showthread.php?t=2304736
Convert Windows from BIOS/MBR to UEFI/gpt.
http://social.technet.microsoft.com/wiki/contents/articles/14286.converting-windows-bios-installation-to-uefi.aspx

For UEFI install of Ubuntu see link in my signature.

don-j-cooper
February 4th, 2017, 04:53 PM
Thanks, I'll check out the info to expand my knowledge. From the digging around I've done so far it looks like it was the Win7 install that initially messed up - I really should have guessed that - as it appears downloading the ISO from MS and using MS's own USB creator tool to produce a bootable USB does not in fact create something that will install in EFI mode. File system is NTFS instead of FAT32, necessary files are in the ISO but not put in the right place. So it seems the Win7 install would have gone with legacy BIOS install and Ubuntu would have tried and failed to reconcile that with the EFI mode it was working to. When linux finally gets up to speed on games - and it's getting there - I'll happily ditch MS forever but for the moment I'll have to persevere with dual booting.