mkfs - Format USB Stick / Hard Drive - Linux CLI

preview_player
Показать описание
commands used:

to find out your device location/letter:
sudo fdisk -l

example: /dev/sdX

to format to fat filesystem:
note: -I = that is a capital i not l

for ext2:

--------------------

NAME
mkfs - build a Linux filesystem

DESCRIPTION
mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The device argument is either the device name (e.g. /dev/hda1,
/dev/sdb2), or a regular file that shall contain the filesystem. The size argument is the number of blocks to be used for the filesystem.

The exit code returned by mkfs is 0 on success and 1 on failure.

searched for in a number of directories, like perhaps /sbin, /sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise list is defined at compile time but at least
contains /sbin and /sbin/fs), and finally in the directories listed in the PATH environment variable. Please see the filesystem-specific builder manual
pages for further details.
Рекомендации по теме
Комментарии
Автор

Yes we do. ExFAT however is not included in kernel by default. Am guessing the reason for this are patents. Old FAT, other than being terrible file system prone to breaking, loosing free space and worst fragmentation in history of computing, also had a limit of 32GB for partition size. ExFAT is suppose to solve some of these problems. It's mainly designed for external drives. Personally I just use ext file systems and waiting for btrfs to become more usable and mainstream. :D

MladenMijatov
Автор

Thank you. Great video, and very clear. Nice job.

And you're right about deleting the porn lol

rfrancoi
Автор

They are all the same. Naming comes from mount._fstype_ convention. Both commands are symlinks to mkdosfs which supports FAT12, 14, 16 and 32. All of which are terrible. :)

MladenMijatov
Автор

cool, ill try to use that from now on then

gotbletu
Автор

Could also use the GUI 'Disk Utility', for formatting, which comes installed on Ubuntu 12.04 as version 3.0.2.


technoboi
Автор

I need help w this. If you can help me out it would be greatly appreciated

brealz_csrt
Автор

I had a question mkfs.ext4, if you unplug the USB during mkfs, the mkfs process gets stuck due to I/O error and am not able to kill it without a reboot. Hence if I plugin the USB again the /dev/mapper resource is busy and am not able to mkfs again. How do you suggest the best way to kill mkfs on a USB removal if its ongoing or what is the right way to safely quit mkfs if the USB was removed?

jayaramsachin
Автор

heard we got exFat filesystem now too, lols too much junk

gotbletu
Автор

Nice review although i was a little surprised that you didn't back up your porn...lol

OmenX
join shbcf.ru