You are not logged in.

#1 2015-11-07 13:42:31

haushinka
Member
Registered: 2015-11-07
Posts: 7

Booting from a USB Stick (Problems with UEFI)

I'm trying to install Arch on a USB stick, for use on various laptops, but failing to make it bootable - I get a blank screen briefly rather than a grub menu.

I've installed the Grub UEFI application to the equivalent directory as the laptop I'm using to test it on, so the UEFI shouldn't have any issues locating the .efi (I think).

I'm not convinced the output of efibootmgr is correct, but I've no idea what I've done wrong. Help?

Info:
# grub-install --target=i386-efi --efi-directory=/boot --bootloader-id=mobile-grub --removable --recheck
Installing for i386-efi platform.
Installation finished. No error reported.

# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found Intel Microcode image
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initramfs image: /boot/initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
done

# efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001
Boot0000* grub HD(1,GPT,13154bc1-1595-4f74-9eb6-e121a42af47c,0x800,0xf4000)/File(\EFI\grub\grubx64.efi)
Boot0001* UEFI: SanDisk PciRoot(0x0)/Pci(0x14,0x0)/USB(6,0)/HD(1,GPT,7cc8145a-3f4b-43e2-a48e-238d2305f944,0x800,0x100000)AMBO

# parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: SanDisk Ultra Fit (scsi)
Disk /dev/sdb: 62.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 ESP boot, esp
2 538MB 62.2GB 61.6GB primary

Offline

#2 2015-11-07 14:34:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,418

Re: Booting from a USB Stick (Problems with UEFI)

If you want to use it on various laptops, efibootmgr is useless. You need to make sure that your chosen bootloader is installed to the default loader location, then just go into your firmware's boot menu and choose USB.

Offline

#3 2015-11-07 14:49:19

haushinka
Member
Registered: 2015-11-07
Posts: 7

Re: Booting from a USB Stick (Problems with UEFI)

If I select USB from the boot menu, I get a blank screen briefly, but nothing more. What am I missing?

Offline

#4 2015-11-07 14:51:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,418

Re: Booting from a USB Stick (Problems with UEFI)

Is installed to the default loader location?

Offline

#5 2015-11-07 16:40:59

haushinka
Member
Registered: 2015-11-07
Posts: 7

Re: Booting from a USB Stick (Problems with UEFI)

Thanks for your help, but I'm not sure what you mean. I've installed grub, as described above. Have I missed anything?

Offline

#6 2015-11-07 16:47:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,418

Re: Booting from a USB Stick (Problems with UEFI)

I refuse to use grub2, so I can't help you there. If you google EFI default loader location, you should be able to figure out what I'm talking about. Make sure you note that the architecture differences are for the UEFI setup, not for the installed system.

Offline

#7 2015-11-07 18:14:44

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Booting from a USB Stick (Problems with UEFI)

# cp $ESP/EFI/grub/grubx64.efi $ESP/EFI/boot/bootx64.efi

https://wiki.archlinux.org/index.php/GRUB#EFI_path

It may also be worth copying the GRUB .efi loader to the Windows default loader location:

# mkdir -p $ESP/EFI/Microsoft/Boot
# cp $ESP/EFI/grub/grubx64.efi $ESP/EFI/Microsoft/Boot/bootmgfw.efi

Jin, Jîyan, Azadî

Offline

#8 2015-11-07 22:55:49

haushinka
Member
Registered: 2015-11-07
Posts: 7

Re: Booting from a USB Stick (Problems with UEFI)

Head_on_a_Stick wrote:
# cp $ESP/EFI/grub/grubx64.efi $ESP/EFI/boot/bootx64.efi

https://wiki.archlinux.org/index.php/GRUB#EFI_path

It may also be worth copying the GRUB .efi loader to the Windows default loader location:

# mkdir -p $ESP/EFI/Microsoft/Boot
# cp $ESP/EFI/grub/grubx64.efi $ESP/EFI/Microsoft/Boot/bootmgfw.efi

Okay, thanks. I did try both of these things (although, it might be worth noting I have a 32 bit install, so copied the equivalent files instead), but that made no difference. The laptop I'm using has grub2 installed on the HDD and I just used the default locations (i.e $ESP/EFI/grub/grubx64.efi); it boots with no issues.

Offline

#9 2015-11-07 23:44:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Booting from a USB Stick (Problems with UEFI)

Is your firmware set to boot USB sticks?


Jin, Jîyan, Azadî

Offline

#10 2015-11-08 02:41:58

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,418

Re: Booting from a USB Stick (Problems with UEFI)

haushinka wrote:

although, it might be worth noting I have a 32 bit install, so copied the equivalent files instead), but that made no difference

Which is why I was trying to lead you to figuring out how it works instead of giving you commands. If you'd looked this up, you'd know that this is a problem.

Offline

#11 2015-11-08 12:21:46

haushinka
Member
Registered: 2015-11-07
Posts: 7

Re: Booting from a USB Stick (Problems with UEFI)

Scimmia wrote:

Which is why I was trying to lead you to figuring out how it works instead of giving you commands. If you'd looked this up, you'd know that this is a problem.

It should be obvious, but I have already looked up the issue and read about what I'm trying to do from multiple sources. You didn't previously mention 32-bit being a problem and I've never seen anything that indicates it would be. If you know otherwise please point me to the source.

Just telling someone to Google a problem is not really a helpful nor welcoming response.

Offline

#12 2015-11-08 12:23:17

haushinka
Member
Registered: 2015-11-07
Posts: 7

Re: Booting from a USB Stick (Problems with UEFI)

Head_on_a_Stick wrote:

Is your firmware set to boot USB sticks?

The option to boot from the stick appears in the UEFI boot manager thingmy, so I assume that should work (must have booted successfully from a usb stick on that particular laptop anyway and have tried it on other machines that can boot from usb).

Offline

#13 2015-11-08 16:07:21

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,418

Re: Booting from a USB Stick (Problems with UEFI)

haushinka wrote:

It should be obvious, but I have already looked up the issue and read about what I'm trying to do from multiple sources. You didn't previously mention 32-bit being a problem and I've never seen anything that indicates it would be. If you know otherwise please point me to the source.

And you never came across the difference between 32-bit and 64-bit EFI? Not the installed system, but the firmware itself. I'm assuming you're dealing with 64-bit UEFI, so copying "the equivalent files" is no good, you need a 64-bit UEFI executable.

Last edited by Scimmia (2015-11-08 16:10:05)

Offline

#14 2015-11-21 13:09:38

haushinka
Member
Registered: 2015-11-07
Posts: 7

Re: Booting from a USB Stick (Problems with UEFI)

Scimmia wrote:

And you never came across the difference between 32-bit and 64-bit EFI? Not the installed system, but the firmware itself. I'm assuming you're dealing with 64-bit UEFI, so copying "the equivalent files" is no good, you need a 64-bit UEFI executable.

Nope, can't say I have. Also still haven't found any documentation that mentions it being an issue. However, I can at least confirm it works now, so thanks for your help.

Offline

Board footer

Powered by FluxBB