0

Being a beginner to Linux, I've been messing with the software while my USB is not showing up after I zeroed it with the terminal. I then ran the command for making file system, but it shows me this:

mkfs.msdos

In the settings app, this is how the USB disk shows up as:

this

Could anybody tell me what's the matter and how do I fix it? I want to make it ready to boot from it.

2 Answers2

2
  • You do not want -f 32. You probably want -F 32. See man 8 mkfs.msdos for details. Remember Linux is case-sensitive in general.
  • You most likely should not create a filesystem on /dev/sdb. Create partition(s) first (with fdisk, gdisk or whatever), then create a filesystem on /dev/sdb1. Compare Uses of single-partition disk configuration.
1

The proper syntax should be: mkfs.msdos -F 32 /dev/sdb

If you wanted to add a label, mkfs.msdos -F 32 -n THISTHING /deb/sdb

It is ideal to use all caps when naming FAT filesystems. However, it is uncommon to create a filesystem prior to making a table as the other answer has said. There are tools such as fatresize you can use to make separate partitions if you wanted to if you choose to create the partition table first. If you wanted instructions on that:

# parted -a optimal /dev/sdb # IF it is still /dev/sdb
    mktable msdos # msdos or gpt are options, I am assuming msdos because of your FAT selection
    mkpart # here you can choose anything for name and filesystem, 
           # it won't matter since you'll be making a new file system

When it prompts you for partition size, enter -1 for the ending sector to get the partition to span the entire disk.

Then you will now have /dev/sdb1 to run mkfs.msdos -F 32 /dev/sdb on.

Note: if you wanted FAT for compatibility between operating systems, you should look into exFAT. It is similar to FAT, except there is no 4GB restriction. You may run into a 4GB filesize problem if customizing a Windows .wim or with media.