Thursday, May 11, 2017

system installation - Boot option not included USB after fully installed in USB with UEFI



I have followed the steps from this video. But the USB is not showing on my boot option.






1) I downloaded Ubuntu desktop and installed it on my 4GB USB drive using Rufus



2) I then installed the ubuntu OS into my 64GB USB drive from the 4GB USB drive



3) Then I tried to access the boot option menu after I finished installing it only showed me the windows boot manager









1) Using fdisk -l to check the name of ESP partition




Disk /dev/sdb: 57.3 GiB, 61505273856 bytes, 120127488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt
Disk identifier: 09D357C5-2585-4D1D-9658-9417516D1E0A

Device Start End Sectors Size Type
/dev/sdb1 2048 1953791 1951744 953M EFI System
/dev/sdb2 1953792 117188607 115234816 55G Linux filesystem
/dev/sdb3 117188608 120125439 2936832 1.4G Linux swap


2) And then I used mkdir /media/root/Ubuntu to create a new mount point




3) Then I mount the ESP partition mount /dev/sdb1 /media/root/Ubuntu



4) My Boot directory



5) My Ubuntu directory



6)Using blkid to check if the UUID showed in terminal is the same as what grub.conf pointed to





/dev/sdb1: UUID="AD33-1FB3" TYPE="vfat" PARTUUID="99511b0d-05ea-4920-9a44-c94544b20091"
/dev/sdb2: UUID="1b3eccd8-7b52-4de9-947d-5183c43a5584" TYPE="ext4" PARTUUID="1400a3bf-43c9-441a-b124-85d54a961492"
/dev/sdb3: UUID="aef579c4-f98b-4abd-b54c-a521a2fa6074" TYPE="swap" PARTUUID="fcb804cc-6a81-4dae-8727-c8da31faab6b"


7) Check if bootx64.efi and shimx64.efi have the same size



8) Copygrubx64.efi to EFI/Boot



I'll edit this answer instead of responding in the comments.

To answer your last question, where on the live media are the bootloaders?
Look in the live media's /EFI/BOOT directory and see BOOTx64.EFI and grubx64.efi.
These are the two files that should wind up on the full-install USB's EFI partition (in the EFI/BOOT directory). Also on the full-install's EFI, there must be a /EFI/ubuntu/grub.cfg file. This file should have a UUID in it which must be the UUID of the root partition of the full-install USB (I think it gets set up correctly, even though all the files get written to the internal disk's EFI instead of the full-install's EFI.).
Those three files in those locations should be all that it necessary for a UEFI secure boot, done by selecting the USB device for booting. Looks like the below:



full-install USB  
EFI partition
EFI (directory)
Boot (directory)
bootx64.efi
grubx64.efi

ubuntu (directory)
grub.cfg
root partition





So your EFI/Boot directory is missing the grubx64.efi file (if bootx64.efi is a copy of shimx64.efi, check the sizes), or you have set up with secure boot disabled, and bootx64.efi is actually a copy of grubx64.efi (again, check sizes). Using shimx64.efi as bootx64.efi will work with or without secure boot being on, so that's what I recommend. Both files are found in the EFI/ubuntu directory, so you can fix that up.
The UUID for you root, , UUID="1b3eccd8-7b52-4de9-947d-5183c43a5584 should be the UUID used in the EFI/ubuntu/grub.cfg file. Edit the file if necessary to change the UUID.







OK, so copy grubx64.efi from EFI/ubuntu to EFI/Boot, so it's ion the same directory as bootx64.efi(shim). Check the UUID in grub.cfg, note, I originally had the wrong ID, the partition id instead of the UUID, but I changed that.
Selecting the USB device for a UEFI boot should then work (both with or without secure boot enabled). If not, your system does not follow the UEFI spec, so additional tweaking may be necessary, but doing the boot from the bootx64.efi gets around most name nonsense introduced by some vendors.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...