theonlytalkinggoat
April 25th, 2017, 06:58 AM
I have been trying to install Ubuntu on a GPT disk, for 2 days, now. The installation goes perfect, no errors, but when I go to boot up, nothing. No bootable media found. I created a bios_grub and an ESP, bootable partition. I am sure it is a x64 usb key. Another querk is the installer will only allow me to put the boot record on /dev/sda, not /dev/sda1, the bootable ESP partition.
The installer, however, puts nothing in the ESP partition and, as far as I can tell, Nothing goes into the bios_grub partition, either, but it shouldn't need anything in the bios_grub, since this is a UEFI boot, not legacy.
In an attempt to correct the issue, these are the steps I've taken, to try to manually install grub.
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
EFI boot on HDD
sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 97F58661-5F72-4C9F-BF37-81D0D0C36643
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 391167 190.0 MiB EF00
2 411648 8742911 4.0 GiB 8200
3 8742912 218458111 100.0 GiB 8300
4 218458112 976773119 361.6 GiB 8300
5 391168 411647 10.0 MiB EF02
efibootmgr
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0001,0002,0007,0005,0006,0000
Boot0000* ubuntu
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
sudo efibootmgr -b 0 -B
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
sudo efibootmgr -c -d /dev/sda -p 1 -w -L ubuntu
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
Boot0000* ubuntu
mount /dev/sda3 /mnt
sudo mkdir /mnt/efi
sodu mount /dev/sda1 /mnt/efi
sudo apt-get install grub-efi-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
grub-efi-amd64-bin
The following packages will be REMOVED:
grub-gfxpayload-lists grub-pc
The following NEW packages will be installed:
grub-efi-amd64 grub-efi-amd64-bin
0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/724 kB of archives.
After this operation, 2,426 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2) xenial/main amd64 grub-efi-amd64-bin amd64 2.02~beta2-36ubuntu3.7 [658 kB]
Get:2 cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2) xenial/main amd64 grub-efi-amd64 amd64 2.02~beta2-36ubuntu3.7 [66.1 kB]
Preconfiguring packages ...
(Reading database ... 193482 files and directories currently installed.)
Removing grub-gfxpayload-lists (0.7) ...
Removing grub-pc (2.02~beta2-36ubuntu3.7) ...
Processing triggers for man-db (2.7.5-1) ...
Selecting previously unselected package grub-efi-amd64-bin.
(Reading database ... 193462 files and directories currently installed.)
Preparing to unpack .../grub-efi-amd64-bin_2.02~beta2-36ubuntu3.7_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.02~beta2-36ubuntu3.7) ...
Selecting previously unselected package grub-efi-amd64.
Preparing to unpack .../grub-efi-amd64_2.02~beta2-36ubuntu3.7_amd64.deb ...
Unpacking grub-efi-amd64 (2.02~beta2-36ubuntu3.7) ...
Setting up grub-efi-amd64-bin (2.02~beta2-36ubuntu3.7) ...
Setting up grub-efi-amd64 (2.02~beta2-36ubuntu3.7) ...
sudo rm -rf /mnt/boot/grub
sudo grub-install --boot-directory /mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/efi/ --recheck --debug /dev/sda1
grub-install: info: adding a relocation entry for 0xcbd8.
grub-install: info: adding a relocation entry for 0xcbe8.
grub-install: info: adding a relocation entry for 0xcbf0.
grub-install: info: adding 192 padding fixup entries.
grub-install: info: writing 904 bytes of a fixup block starting at 0xc000.
grub-install: info: reading /usr/lib/grub/x86_64-efi/fshelp.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/ext2.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/part_gpt.mod.
grub-install: info: kernel_img=0x236ec10, kernel_size=0x18800.
grub-install: info: the core size is 0x1c5d0.
grub-install: info: writing 0x1d800 bytes.
grub-install: info: copying `/mnt/boot/grub/x86_64-efi/core.efi' -> `/mnt/efi/EFI/ubuntu/grubx64.efi'.
grub-install: info: Registering with EFI: distributor = `ubuntu', path = `\EFI\ubuntu\grubx64.efi', ESP at hostdisk//dev/sda,gpt1.
grub-install: info: executing efibootmgr --version </dev/null >/dev/null.
grub-install: info: executing modprobe -q efivars.
grub-install: info: executing efibootmgr -b 0000 -B.
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
grub-install: info: executing efibootmgr -c -d /dev/sda -p 1 -w -L ubuntu -l \EFI\ubuntu\grubx64.efi.
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
Boot0000* ubuntu
Installation finished. No error reported.
ubuntu@ubuntu:/mnt/boot$ ls
abi-4.8.0-36-generic memtest86+.bin
config-4.8.0-36-generic memtest86+.elf
efi memtest86+_multiboot.bin
grub System.map-4.8.0-36-generic
initrd.img-4.8.0-36-generic vmlinuz-4.8.0-36-generic
This is the new grub folder...
ubuntu@ubuntu:/mnt/boot/grub$ ls
fonts grubenv locale x86_64-efi
This is the EFI folder on the ESP partition
ubuntu@ubuntu:/mnt/efi/EFI/ubuntu$ ls
grubx64.efi
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
sudo chroot /mnt
update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.8.0-36-generic
Found initrd image: /boot/initrd.img-4.8.0-36-generic
Adding boot menu entry for EFI firmware configuration
done
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
EFI boot on HDD
Results of /etc/fstab:
UUID=8ad57035-0736-40bd-a119-9bf0f8f9282d / ext4 errors=remoun$
# /boot/efi was on /dev/sda1 during installation
UUID=0E4C-314A /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda4 during installation
UUID=a30fd7f5-ed94-446a-8835-c896f5403919 /home ext4 defaults $
# swap was on /dev/sda2 during installation
UUID=c489e270-c9e1-445e-8e4b-4062b52fb3b0 none swap sw $
sudo blkid
...
/dev/sda1: UUID="0E4C-314A" TYPE="vfat" PARTUUID="b2953c8b-9474-488d-82bc-982127abb50a"
...
Even after all that, STILL, no boot.
The installer, however, puts nothing in the ESP partition and, as far as I can tell, Nothing goes into the bios_grub partition, either, but it shouldn't need anything in the bios_grub, since this is a UEFI boot, not legacy.
In an attempt to correct the issue, these are the steps I've taken, to try to manually install grub.
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
EFI boot on HDD
sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 97F58661-5F72-4C9F-BF37-81D0D0C36643
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 391167 190.0 MiB EF00
2 411648 8742911 4.0 GiB 8200
3 8742912 218458111 100.0 GiB 8300
4 218458112 976773119 361.6 GiB 8300
5 391168 411647 10.0 MiB EF02
efibootmgr
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0001,0002,0007,0005,0006,0000
Boot0000* ubuntu
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
sudo efibootmgr -b 0 -B
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
sudo efibootmgr -c -d /dev/sda -p 1 -w -L ubuntu
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
Boot0000* ubuntu
mount /dev/sda3 /mnt
sudo mkdir /mnt/efi
sodu mount /dev/sda1 /mnt/efi
sudo apt-get install grub-efi-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
grub-efi-amd64-bin
The following packages will be REMOVED:
grub-gfxpayload-lists grub-pc
The following NEW packages will be installed:
grub-efi-amd64 grub-efi-amd64-bin
0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/724 kB of archives.
After this operation, 2,426 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2) xenial/main amd64 grub-efi-amd64-bin amd64 2.02~beta2-36ubuntu3.7 [658 kB]
Get:2 cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2) xenial/main amd64 grub-efi-amd64 amd64 2.02~beta2-36ubuntu3.7 [66.1 kB]
Preconfiguring packages ...
(Reading database ... 193482 files and directories currently installed.)
Removing grub-gfxpayload-lists (0.7) ...
Removing grub-pc (2.02~beta2-36ubuntu3.7) ...
Processing triggers for man-db (2.7.5-1) ...
Selecting previously unselected package grub-efi-amd64-bin.
(Reading database ... 193462 files and directories currently installed.)
Preparing to unpack .../grub-efi-amd64-bin_2.02~beta2-36ubuntu3.7_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.02~beta2-36ubuntu3.7) ...
Selecting previously unselected package grub-efi-amd64.
Preparing to unpack .../grub-efi-amd64_2.02~beta2-36ubuntu3.7_amd64.deb ...
Unpacking grub-efi-amd64 (2.02~beta2-36ubuntu3.7) ...
Setting up grub-efi-amd64-bin (2.02~beta2-36ubuntu3.7) ...
Setting up grub-efi-amd64 (2.02~beta2-36ubuntu3.7) ...
sudo rm -rf /mnt/boot/grub
sudo grub-install --boot-directory /mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/efi/ --recheck --debug /dev/sda1
grub-install: info: adding a relocation entry for 0xcbd8.
grub-install: info: adding a relocation entry for 0xcbe8.
grub-install: info: adding a relocation entry for 0xcbf0.
grub-install: info: adding 192 padding fixup entries.
grub-install: info: writing 904 bytes of a fixup block starting at 0xc000.
grub-install: info: reading /usr/lib/grub/x86_64-efi/fshelp.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/ext2.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/part_gpt.mod.
grub-install: info: kernel_img=0x236ec10, kernel_size=0x18800.
grub-install: info: the core size is 0x1c5d0.
grub-install: info: writing 0x1d800 bytes.
grub-install: info: copying `/mnt/boot/grub/x86_64-efi/core.efi' -> `/mnt/efi/EFI/ubuntu/grubx64.efi'.
grub-install: info: Registering with EFI: distributor = `ubuntu', path = `\EFI\ubuntu\grubx64.efi', ESP at hostdisk//dev/sda,gpt1.
grub-install: info: executing efibootmgr --version </dev/null >/dev/null.
grub-install: info: executing modprobe -q efivars.
grub-install: info: executing efibootmgr -b 0000 -B.
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
grub-install: info: executing efibootmgr -c -d /dev/sda -p 1 -w -L ubuntu -l \EFI\ubuntu\grubx64.efi.
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0007,0005,0006
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0005 USB Floppy/CD
Boot0006 Hard Drive
Boot0007* UEFI: JetFlashTranscend 16GB 1100
Boot0000* ubuntu
Installation finished. No error reported.
ubuntu@ubuntu:/mnt/boot$ ls
abi-4.8.0-36-generic memtest86+.bin
config-4.8.0-36-generic memtest86+.elf
efi memtest86+_multiboot.bin
grub System.map-4.8.0-36-generic
initrd.img-4.8.0-36-generic vmlinuz-4.8.0-36-generic
This is the new grub folder...
ubuntu@ubuntu:/mnt/boot/grub$ ls
fonts grubenv locale x86_64-efi
This is the EFI folder on the ESP partition
ubuntu@ubuntu:/mnt/efi/EFI/ubuntu$ ls
grubx64.efi
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
sudo chroot /mnt
update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.8.0-36-generic
Found initrd image: /boot/initrd.img-4.8.0-36-generic
Adding boot menu entry for EFI firmware configuration
done
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
EFI boot on HDD
Results of /etc/fstab:
UUID=8ad57035-0736-40bd-a119-9bf0f8f9282d / ext4 errors=remoun$
# /boot/efi was on /dev/sda1 during installation
UUID=0E4C-314A /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda4 during installation
UUID=a30fd7f5-ed94-446a-8835-c896f5403919 /home ext4 defaults $
# swap was on /dev/sda2 during installation
UUID=c489e270-c9e1-445e-8e4b-4062b52fb3b0 none swap sw $
sudo blkid
...
/dev/sda1: UUID="0E4C-314A" TYPE="vfat" PARTUUID="b2953c8b-9474-488d-82bc-982127abb50a"
...
Even after all that, STILL, no boot.