Arch Linux - /boot on USB

Hello all,
So as a little project I want to try build arch with some twists, now I've setup arch but I can never get it to boot from USB, basically make grub jump to my ssd .
I always land at the grub command line and as far as I can tell my build is fine, no errors from grub at all either

Any suggestions? Would cryptsetup luks be causing issues?

Thanks

did you run grub-mkconfig after installing grub?

will only ever drop to a grub command line when grub cant find its config or you jump to it manually

yeah, I also rsynced the config to the flash drive, I am unsure exactly if it was struggling to detect my encrypted drive, even though I had setup the config to look for it with GRUB_ENABLE_CRYPTO=y

ok what is your setup and did you specify --boot-directory=DIR when you installed grub

--boot-directory tells grub to install all of the files it needs to boot to a directory

Yeah so the command I believe was grub-install --boot-directory --force /dev/sdc may have been slightly different to that but along them lines

what is your setup that your trying todo?

Basically have the USB key as the boot system separate from the ssd
My partition map would look something like this

/boot sdc
Crypto using pv vg sda
Root
Swap

did you mount the usb drive as /boot when installing?

Yeah so was configured with ext4 and then /mnt/boot to the USB

are you using EFI?

No, although I am tempted to try with efi and bootctl to see if that mays any difference

(Update):
So managed to get it working with EFI grub.
basically I setup my USB drive like so.
/dev/sdb1 - EFI 100MB - vfat mkdir /mnt/boot/efi mount /dev/sdb1 /mnt/boot/efi
/dev/sdb2 - /boot 250MB - ext2 - mkdir /mnt/boot mount /dev/sdb2 /mnt/boot
Then installed efibootmgr, grub-efi-x86_64 at pacstrap setup
When it comes to the grub setup I then had to sort of reconfigure the drive with the following line
mount -t vfat /dev/sdb1 /mnt -o uid=1000,gid=1000,umask=022

Then grub-install --target x86_64-efi --efi-directory /mnt --boot-directory=/mnt/boot --removable

Following this I had to edit the config located on the USB drive so it could detect encrypted drives
GRUB_ENABLE_CRYPTODISK=y and in the GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda1:lvm"

then

grub-mkconfig -o /mnt/boot/grub/grub.cfg

Quite a lot of work for USB boot but at least it works and detects my partitions now :slight_smile:

1 Like