Install to USB: No valid boot loader target device found

I’m trying to install Fedora 27 to a 64GB USB flash drive and also keep a separate (NTFS) partition free to use as a regular flash drive.

The first 32GB is a NTFS primary partition made with GParted.

Using Fedora Anaconda and custom partitioning, I tried creating a 1GB /boot/efi partition, 2GB swap, and the remaining space as / . This results in the error: “No valid boot loader target device found. For a UEFI installation, you must include an EFI System Partition on a GPT-formatted disk, mounted at /boot/efi.”

I also tried first creating a fat32 partition using GParted, and then selecting it as the /boot/efi partition in Anaconda. Same error. Only thing is I’m not sure if it’s GPT-formatted.

Alternatively, I also tried Fedora’s Anaconda installer in automatic partitioning mode. This gives the option to ‘reclaim’ the unused space (or other partitions) on the drive for installation, then complains that it “failed to find a suitable stage1 device.”

Any tips?

what is the output of fdisk -l? it should say something being GPT or MBR

that is much too large. it should at most be 100MB and even then ive never seen it use much of that.

I would avoid using swap on a flash drive because your gonna cause high IO wait when the drive is being written too which can make the system stutter as its cant access the data it needs when it needs it

I sorta solved it before I could check with fdisk -l. I let the Anaconda installer use the beginning of the flash drive just to make sure the installer was working. Later I deleted those partitions and recreated them with Gparted while making an NTFS partition in the first half. Now 'fdisk -l` reports that it is GPT, but I can’t be sure it was the case before.

Btw, the reason for putting the NTFS parition first was because I read Windows sometimes only sees the first partition of flash drives and I wanted a generally usable flash drive partition regardless of OS. Testing in Windows 10, it sees all (non-EFI) partitions, so maybe all this effort was unnecessary.

I ended up making it 256 MB before I saw your comment. I’m not familiar with EFI so I erred on the side of caution. I’m also unsure if a separate /boot partition is necessary, but seeing as Anaconda created it, I decided to copy that approach.

I made a small swap partition since the installer complained if I omitted it. I have no desire to use it except to avoid abrupt crashes due to running out of memory… a situation that I often run into. Would you suggest removing the swap?

Aside, is there general advice on optimizations for running linux from a flash drive? Eg. I vaguely remember reading about changing settings related to journaling.

iotop shows jbd2/dm-2-8 often at the top, momentarily spiking to 100% IO usage.

I’ve noticed that sometimes the system UI freezes, several seconds up to a couple of minutes, especially while installing software. During such freezes, top and iotop don’t seem to indicate anything hogging resources though. Updating packages after install literally took hours.

it depends. how much ram do you have and what kind of workload do you have? i would say 1-2GB of swap should be plenty for most people unless your constantly filling your ram up.

Use F2FS as its designed for stuff for flash based storage

thats the journaling part of journaling file systems. Im outside of my area of expertise so maybe someone else can help you. Perhaps @SgtAwesomesauce or @Eden maybe.

that would be the main downside of a flash drive. Cant really do much multitasking with them

1 Like

Oh thanks, I didn’t know about F2FS. I just used the usual ext4. From 2 seconds of searching, it doesn’t seem obvious how to install an OS with F2FS.

It’s currently run on borrowed hardware with 8GB RAM. The install on a USB flash drive, live USBs, and VMs on external hard drives are my current “system.” I’ve lost track of the number of times VMs have crashed, sometimes taking out the host too. Usually due to one too many browser tabs on the host and/or guest.

Eg. just recently a 4GB VM aborted itself, but not before eating ~1GB of the host’s swap. At least the host survived. So perhaps I’m better off keeping the swap for now.

I’ve done so many OS installs in last few weeks. Zen+ launch can’t come soon enough.

You have todo custom partitioning and select it

I’ll keep that in mind for next time. What’s its status for support, stability, “headache factor,” compared to ext4?

Support per distro wont be as good as ext4 but that would be about it

Uh, actually, as long as it’s compiled into the kernel (it will be), you’ll only need to install the tools package to be able to mess with the partition. (archwiki article for F2FS)

I would say distro support is equal to EXT4.

F2FS is actually the FS I recommend.

1 Like

Nice, tempted to try it soon. If f2fs-tools is installed, will Fedora’s Anaconda installer have the option to use that FS? That would be convenient especially when also setting up luks encryption.

What do you suggest for the cross platform USB flash drive partition? NTFS or exFAT?

I’m not 100% sure. I can boot up a VM and check later today, but I’m about to get busy, so I likely won’t be able to get that done for about 5 hours.

Thanks, there’s no rush. I would try a VM myself, but my RAM situation right now is precarious…

Sadly this isn’t the case, both the standard partition editor and blivet-gui have no support for F2FS or really anything other than the standard partition types.


Is there another reasonably simple way to install to USB with LUKS + F2FS?