PDA

View Full Version : [SOLVED] Picking a mount point for the Boot loader.



irv
February 5th, 2018, 09:51 PM
I got behind on my upgrades and I am sitting at 17.04, unsupported. I was going to upgrade from a USB with 17.10.1. I have the option to upgrade the 17.04 to 17.10 but it is asking me to pick a partition for the bootloader. I thought I would ask before I install which one do I pick? Here is my window from Gparted.
278447
I am thinking it is /dev/sda2, EFI System partition, the fat32?
It is the one that the windows and I believe the grub is loading from right now. I do need to know if this is the case before I do the upgrade?

oldfred
February 5th, 2018, 10:55 PM
If you are using UEFI, it really does not matter what you pick.
Generally you pick the drive like sda. And you should.

But with UEFI it only installs to the ESP - efi system partition on drive seen as sda. Which is not always right or desired, but you cannot change it.
Other distributions do allow you to choose.

irv
February 5th, 2018, 11:09 PM
oldfread, doesn't it look like it is booting from /dev/sda2, EFI System partition, the fat32? I am running Window and Ubuntu in EFI right now. Would Grub be in sda2 or would it be in sda? For some reason I just can't get this straight in my head? Is sda the drive and sda2 a partition. And does the grub need to be on the drive and does it have to be bootable?

ubfan1
February 5th, 2018, 11:48 PM
In UEFI, the bootloaders are just files. grub's executable is usually located on the EFI partition (mounted at /boot/efi) at .../EFI/ubuntu/grubx64.efi. If secure boot is enabled, the bootloader is shimx64.efi, and grubx64.efi must be present in the same directory. A fallback location is set up at .../EFI/Boot/bootx64.efi, which is just a copy of the bootloader in use. Possibly, some other grub executable is used, but the only difference is where it looks for the grub.cfg file. So the bootloaders are all in sda2, the EFI partition.

oldfred
February 6th, 2018, 01:18 AM
Just as when you install in BIOS mode and choose a drive like sda, with UEFI you choose a drive like sda, but grub only then installs its boot files into the ESP - efi system partition on drive seen as sda.

With UEFI there are no boot files in the gpt drive's protective MBR. MBR with gpt only exists to have one entry saying full drive is gpt, so old MBR only partitioning tools do not see an empty drive and then create issues.

All installs then have boot files in the ESP in different folders.

irv
February 6th, 2018, 03:51 PM
I am going to do the upgrade this morning and will set to boot from sda. If all goes well I will be back, If not I will be repairing the damage.

irv
February 6th, 2018, 06:15 PM
Well, I went ahead with the upgrade and I picked sda to boot from. It told me when I got into the install that there was something wrong and that the grub would not load.
From that point it was a nightmare It would not boot. I ended up doing a clean install of Ubuntu but it still would not boot. The only way I can get into Ubuntu or Windows is using a Super Grub boot stick.
I was going to make a Boot Repair USB but the Unetbootin will not work Here is the error I get
278456
I tried to do this on my other laptop which is running 17.10.1 as well and I get the same error.
I tried running unetbootin from the prompt at the command line and I get this.
278457
Where do I go from here?

oldfred
February 6th, 2018, 06:34 PM
If you want an UEFI only bootable flash drive, you do not need any installer.

If UEFI only, then can just extract ISO with 7-zip to FAT32 formatted drive with boot flag on FAT32 partition.
Will not boot in BIOS mode
UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formated flash & set boot flag.
http://askubuntu.com/questions/395879/how-to-create-uefi-only-bootable-usb-live-media
UEFI only bootable flash drive
http://ubuntuforums.org/showthread.php?t=2299040

ubfan1
February 6th, 2018, 08:07 PM
Check the ownership on all your home directory "dot" files, the only root owner should be on ..
ls -la
Running X programs with sudo causes various problems.

irv
February 6th, 2018, 08:32 PM
I don't care what I do I can't get the bootloader to install at the end of the install. I can't believe I am having this much trouble installing Ubuntu.
OK when the install finishes I get this message

The 'grub-efi-amd64-signed' package failed to install into the /target/ without grub boot loader the installed system will not boot.
I tried to do a grub repair following these instructions (http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd) but when I get to the point where I do the command

grub-install /dev/sda5
It tells me that there is no EFI directory.
sda5 is where I have installed Ubuntu and made it the mount point

EDIT: here is my boot directory.
278458

oldfred
February 6th, 2018, 09:16 PM
You (almost) never install grub to a partition. Your sda5 is a partition.
You should have an ESP - efi system partition which is the FAT32 with boot flag.

Often for users not familiar with command line:
Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot, only use ppa download into Ubuntu live installer.
https://help.ubuntu.com/community/Boot-Repair
https://sourceforge.net/p/boot-repair/home/Home/

bcschmerker
February 6th, 2018, 09:20 PM
@irv (https://ubuntuforums.org/member.php?u=47460) How many partitions your system, what sizes, and where? I'm used to multiple hard drives on the Hot Rod gPC™; as of February 2018 it packs a Western DigitalŽ WD1600JS (/dev/sda; sda1 as /boot, sda2 subdivided to sda5 as / and sda6 as /tmp) on SATA 0 and three ToshibaŽ MQ01ABD050's (/dev/sdb, /dev/sdc, /dev/sdd) on SATA 1 through 3. All have multiple ext4 partitions except /dev/sdd, which bears /home as a BTrFS partition, all under the old Master Boot Record format due to ubuntuŽ 16.04-LTS installation-tool limitations. (Advance plans call for re-format of all HDDs as GUID Partitions to integrate with the Unified Extensible Firmware Interface - GigabyteŽ GA-MA78GM-S2HP BIOS F6D can do UEFI - and IntelŽ Advanced Host Controller Interface™ as part of the ubuntuŽ 16.04.5-LTS-to-18.04.0-LTS major dist-upgrade.)

The GUID Partition Table formatting during initial installation of ubuntuŽ 16.10 or later makes a GUID-Partition-Tabled /dev/sda1 across the entire primary drive, with the master boot record of /dev/sda so indicating. This /dev/sda1 can be subdivided into multiple mount points.

irv
February 6th, 2018, 09:50 PM
Every time I go to install I get this warning.
278460

I included my gparted window so you can see my partitions.

EDIT: I tried to make a mount point then it tells me I have two.

oldfred
February 6th, 2018, 10:21 PM
Your sda2 is the ESP.
Not sure why you are getting errors, but some have had to run repairs on the FAT32 partition.

You can mount ESP in Windows repair console and run chkdsk.

Or from Ubuntu live installer:
http://askubuntu.com/questions/862724/grub2-failed-to-install/865872#865872
dosfstools - dosfsck (aka fsck.msdos and fsck.vfat) utilities
Must be unmounted
sudo dosfsck -t -a -w /dev/sda2
The -a seems to help in clearing dirty bit
https://bbs.archlinux.org/viewtopic.php?id=164185

irv
February 7th, 2018, 02:53 AM
I am not sure what the problem was but I got around it. Here is what I ended up doing.
After trying to install 17.10.1 I am going to guess 15+ times. No matter what I did it didn't work.
I even wipe everything off the hard drive and reformated and created new partitions. The last time I got this:
278466
I quit trying to install 17.10.1. Instead, I installed 16.04 and it went like clockwork. I made sure everything was up to date and then I did upgrade to 17.10.1 from within 16.04.
I am now running 17.10.1 and all I have to do now is install all my programs and set up my settings.
I will mark it as solved but it was a hard way to go. It took me over 10 hours to just do the upgrade and I have to remove Windows 10.
I filed a bug report I for some reason the install for 17.10.1 just would not work,