Fedora 38 KDE Format USB Drive

malonn

Member
Joined
May 23, 2023
Messages
61
Reaction score
31
Credits
522
I'm not seeing a lot of info on the web for Fedora 38 KDE on this, so I'll ask here. How do I format a USB stick (to Fat32 for flashing BIOS)? I'd prefer a GUI utility, but command line is fine. I looked at the partition manager that comes with KDE, but I have to figure out why /run/media/<username>/<drivename>/ is read-only. That's not really a problem, I can just remount it to a different location. Everything is fricking Ubuntu on the web.

So, I guess I have two questions, really. What's the best way to ensure my USB drives always mount read/writable? And, what's the best way to format a drive?
 


Fedora KDE comes with gparted. It will format USB sticks from a GUI.

...best format for a USB drive? That's like asking which is better? Ford or Chevy?

For flashing a BIOS, I would say FAT32. It's the most compatible.
The problem with FAT32 on Linux, is that there is a file size limit. So I usually use EXFAT instead of FAT32.
However EXFAT, might not be compatible with your BIOS Flash utility.

For command line I use fdisk, it's a little trickier, always make sure you select the right drive :)

Sometimes I use XFS or EXT4 to format USB drives, but these aren't easily compatible with Windows, ( if that matters )
If you need Windows compatibility, I would use FAT32 or EXFAT.

For mounting read/write.. you have a few options.

You can mount /dev/sdb to /mnt if you want to. But like you say, you don't always get read/write.
 
For a more secure way to do this...

blkid /dev/sdc1

/dev/sdc1: LABEL="MYSTUFF" UUID="8E6A-7CD1" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="39f5d30c-01"

Use the uuid instead of the device/path. The device path will be the same for every USB drive ( unless you have more than one mounted ). Obviously your uuid will be different. It's unique for every device.

Edit your /etc/fstab file. Add this line at the bottom.

UUID=8E6A-7CD1 /mnt/myUSB vfat rw,user,exec,mode=1777

The rw means read/write. The 777 is probably over-kill. But it means you have full permissions to everything.
 
Last edited:
Thanks, fellas. I was going to go the fstab route anyway, I think. Just more of a pain. But it beats un-mounting and remounting the stick every single time.

Off I go...
 
Nevermind. I figured how to do it with KDE Partition Manager. No need to hold my wee little hand.
 
For a more secure way to do this...

blkid /dev/sdc1

/dev/sdc1: LABEL="MYSTUFF" UUID="8E6A-7CD1" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="39f5d30c-01"

Use the uuid instead of the device/path. The device path will be the same for every USB drive ( unless you have more than one mounted ). Obviously your uuid will be different. It's unique for every device.

Edit your /etc/fstab file. Add this line at the bottom.

UUID=8E6A-7CD1 /mnt/myUSB vfat rw,user,exec,mode=1777

The rw means read/write. The 777 is probably over-kill. But it means you have full permissions to everything.
Isn't this overkill for mounting a usb drive? especially one that will be removed frequently? an edit of fstab should be for drives that are permanently attached. Doing this way is sort of like taking 3 left turns instead of going right. Oh and you forgot to tell the person to do "sudo mount -a" after the fstab so they don't have to reboot
 
What would you recommend, @APTI? For the record, I was able to get the drive reformatted to FAT32, and get my BIOS flashed, which fixed the missing boot drive during a cold boot. TMI, I know.

I noticed I plugged in another USB key formatted as FAT32, mounted to /run/media/<user>/<label>, and it was not read-only. It may have something to do with the last key being formatted by Balena Etcher. Thoughts? It was ISO999 or something. That may be pertinent, but I don't know.

Trouble with FAT32 on Linux, is partitions can only be 2GB large. A lot of devices use FAT32 (such as my car stereo). No way around this limitation?
 
What would you recommend, @APTI? For the record, I was able to get the drive reformatted to FAT32, and get my BIOS flashed, which fixed the missing boot drive during a cold boot. TMI, I know.

I noticed I plugged in another USB key formatted as FAT32, mounted to /run/media/<user>/<label>, and it was not read-only. It may have something to do with the last key being formatted by Balena Etcher. Thoughts? It was ISO999 or something. That may be pertinent, but I don't know.

Trouble with FAT32 on Linux, is partitions can only be 2GB large. A lot of devices use FAT32 (such as my car stereo). No way around this limitation?
plugging in a usb drive should be automatic in that it appears under /run/media/{user}/{drive} and should require nothing new.

My thoughts as the the reason for it being read only is the usb flash drive itself. if there is a problem physically with it, it can become read only. Also the partitioning and or formatting (for reasons I do not know) can make it read only. Normally I fix this by either using a different flash drive and throwing out the old or wiping out the partition with gparted (GUI for partitioning and formatting) then re-partition and format with that. sometimes you have to low level format it. I have both balena etcher and fedora media writer, I prefer fedora media writer but both work fine. But those utilities are for writing ISO images mostly.

FAT32 has its limits and the partition can be over 2gb it is individual files that have the 4gb limit. FAT32 is highly compatible and as long as you do not need files over 4gb you are fine with it. If you need to move larger files you can use ntfs to stay compatible. exfat is not something I recommend. ext4 is great for linux and clearly superior but will not work well in the windows world. If you have a car stereo that requires FAT32 then you are stuck with it. Unless you change the electronics. If you get a song over 4gb then something is very wrong. It seems like you may be confusing the file size limit and the partition size. FAT32 has max partition of 2TB and file size of 4gb. If you have problems with the flash drive then delete the partitions and start over on it.
 
Odd. I used KDE Partition Manager to format the thumb drive, and it only allowed 2GB partitions. I could grab GParted (available through Discover), but I'd like to get used to KDE Partition Manager. I don't use Windows. The only reason I wanted FAT32 is because I had to flash my BIOS. Let me see if I missed something...
 
Odd. I used KDE Partition Manager to format the thumb drive, and it only allowed 2GB partitions. I could grab GParted (available through Discover), but I'd like to get used to KDE Partition Manager. I don't use Windows. The only reason I wanted FAT32 is because I had to flash my BIOS. Let me see if I missed something...
were there other partitions and maybe 2gb was all that was available?

Another possible issue is you may have been ripped off. Some people will get a 2gb or 4gb flash drive and hack it. Make it say that it is a 128gb or something larger than what it is then sell it for less than any actual drive of the supposed size. Most windows users will not know until they try to do something and information is lost due to that. When you went to partition it, the manager may have bypassed the hack and gotten the real drive size.

The only other option if no other partitions exist is the drive is damaged.
 
Well... I don't know. It's a drive bought from a retail store. The entry in KDE PM says 28GB, yet the PM can only format at 2GB. It works fine for what partitions I can get from it. The old partitions were 2GB, and two other smaller ones. Defective, maybe?
 
possible that it is defective. Only way to tell if a problem is try it on another computer and see what it says. try to get partition the full size of drive and then fill it up by copying files to it then move those files to another computer from that drive and make sure they made it ok. You can delete them off the computer and drive afterward.

You may not find out if it was hacked or defective but either way it is not usable. Even retail stores have had the issue. It is not the store it is where they got it from that may have done it. It is something to keep an eye on and be careful of. Many scams selling flash drives.

Bottom line is that if you can't remove all partitions and make one the full size of the drive in FAT32 then the flash drive should be junked.
 
I'll check it out on a Windows laptop I have available to me (not mine). Thanks for your input, @APTI
 
Well... I don't know. It's a drive bought from a retail store. The entry in KDE PM says 28GB, yet the PM can only format at 2GB. It works fine for what partitions I can get from it. The old partitions were 2GB, and two other smaller ones. Defective, maybe?
It could be mis-formatted, it could be defective, or it could be counterfeit.

If the price was too good to be true, be aware that bad guys are altering the firmware on cheap thumb drives to make them look like high speed and large capacity when plugged into the computer, but they are fakes that do not work beyond a low capacity, if at all.

If it is counterfeit, there is no recourse with the maker, who packed up and is long gone. You may be able to return the drive to the seller and stick them with the responsibility.

Do not jump to conclusions. It could be legitimate but defective, or it could be formatted incorrectly for its type.
 
It could be mis-formatted, it could be defective, or it could be counterfeit.

If the price was too good to be true, be aware that bad guys are altering the firmware on cheap thumb drives to make them look like high speed and large capacity when plugged into the computer, but they are fakes that do not work beyond a low capacity, if at all.

If it is counterfeit, there is no recourse with the maker, who packed up and is long gone. You may be able to return the drive to the seller and stick them with the responsibility.

Do not jump to conclusions. It could be legitimate but defective, or it could be formatted incorrectly for its type.
I guess I just have to see what it does on another computer. It's a SanDisk from Wal-Mart at $20.00 for 2 (on sale). I bought them about a year ago. Anything sound fishy so far? I don't know.
In my partition manager, it shows the 26GB as unallocated space, but the software only allows 2GB partitions. I'll check a Windows (11) machine and see what it has to tell me. User error on my part? I have to dig in, see what I can see.

EDIT:

I just went into my partition manager and I can format the remaining space at full capacity (26GB) as FAT32. Maybe it needs 2 partitions? At least nothing shady is going on with the drive.
 
Last edited:
I guess I just have to see what it does on another computer. It's a SanDisk from Wal-Mart at $20.00 for 2 (on sale). I bought them about a year ago. Anything sound fishy so far? I don't know.
In my partition manager, it shows the 26GB as unallocated space, but the software only allows 2GB partitions. I'll check a Windows (11) machine and see what it has to tell me. User error on my part? I have to dig in, see what I can see.
Honestly, "SanDisk from Walmart" does NOT seem fishy to me if you bought it in a regular Walmart retail store. I assume that SanDisk drives on the shelves are delivered to Walmart stores through their regular, well-understood distribution channels.

It could be fishy if you bought it online from a 3rd party seller through Walmart's website. I have seen other counterfeit items on Walmart's website sold by third-party sellers. To be honest, I have seen several dishonest patterns of behavior from third-party sellers on Walmart's website, and all we use it for is occasional grocery shopping for parking lot pickup.

Keep in mind that the drive has two "kinds" of partitioning. There is the partition table itself, which is likely to be either "MBR" or "GPT".

Beyond the partition table, there are usually one or more actual partitions on the drive. With MBR, its single partition is likely to be "FAT" or "ExFAT" as it usually is on new drives. With "GPT", the partitions themselves may be in one of many formats. "ext4" is popular with Linux, but other formats are available, such as XFS. Windows uses NTFS. Mac uses two common partition formats (APFS and the old HFS+).

I would determine whether the partition table itself can be wiped and rewritten, then configure the partitions the way you want them. If it cannot be wiped and a new partition table configured correctly, then it is broken and unrepairable or else counterfeit. (By "configured correctly", I mean to the full capacity of the drive.)

(Sorry, but I use Mac and Windows tools for partitioning drives and rarely Linux ones, so I will leave it to others to recommend the best tools for wiping and partitioning drives. I use "dd" to wipe drives, but sometimes other tools. I use different tools for different formatting tasks - no single tool of mine can yield every combination of partition table types with partition types that I need. Hopefully others here have recommended the best Linux tools for the jobs.)
 

Members online


Top