which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

Message
Author
p1e
Posts: 124
Joined: Fri Apr 01, 2022 6:01 pm

which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#1 Post by p1e »

which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!? Plz lemme know

On a Linux terminal, we have several options to format a USB drive.
The choice of formatting tool and file system depends on our specific requirements. Here are some common methods and tools:
Using mkfs command: we can use the mkfs command to create a file system on our USB drive. The most common file systems used in Linux are ext4 and FAT32. Here's how we can format a USB drive with these file systems:

Format as ext4:

Code: Select all

sudo mkfs.ext4 /dev/sdX1
Replace /dev/sdX1 with the actual device path of our USB drive.

Code: Select all

Format as FAT32 (vfat):

Code: Select all

sudo mkfs.vfat /dev/sdX1
Using fdisk and mkfs together: We can use fdisk or parted to create a partition on the USB drive and then format it using mkfs. Here's a step-by-step example using fdisk:

we need to run ```sudo fdisk /dev/sdX ``` to start the partitioning tool (replace sdX with our USB drive).

first of all we need to create a new partition using the n command. Set the partition type to FAT32 using the t command (for vfat). Write the changes with the w command. Format the partition with mkfs as shown in the first method. Using gparted (GUI tool): If we prefer a graphical interface, we can install and use GParted, a popular partitioning and formatting tool on Linux. It provides a user-friendly way to format USB drives with various file systems.

Using dd command: we can also completely wipe the USB drive and create a new file system using the dd command. Be very careful with this command, as it can erase data irreversibly. For example:

Code: Select all

sudo dd if=/dev/zero of=/dev/sdX bs=1M count=1
After wiping the drive with dd, we can proceed to format it using one of the methods mentioned earlier.
we need to remember to replace /dev/sdX with the correct device path of our USB drive. we need to be extremely cautious when working with storage devices from the terminal, as selecting the wrong device can result in data loss. Double-check the device path before running any commands, and make sure we have backed up any important data on the USB drive before formatting.


so the question is: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!? Plz lemme know
p1e: interests: Linux & SBC All About Circuits - Electrical Engineering & Electronics:
https://www.allaboutcircuits.com :: new Knowledge-Base: AFFiNE: There can be more than Notion and Miro. on affine.pro :: WordPress: make.wordpress.org/core/

User avatar
timkb4cq
Developer
Posts: 3625
Joined: Wed Jul 12, 2006 4:05 pm

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#2 Post by timkb4cq »

I use the Format USB applet found in MX Tools
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
chrispop99
Global Moderator
Posts: 3393
Joined: Tue Jan 27, 2009 2:07 pm

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#3 Post by chrispop99 »

timkb4cq wrote: Mon Sep 04, 2023 1:34 pm I use the Format USB applet found in MX Tools
+1

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
wdscharff
Posts: 1136
Joined: Mon Feb 24, 2020 1:07 am

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#4 Post by wdscharff »

Application-oriented ;-}
Formerly MX-Tools Format USB. But since I only use USB sticks for snapshots/isos, I leave that to MX-Snapshot.
Honestly now, I haven't formatted a stick for years, they are too small or too slow or both for data transfer, I use an old (2015) SSD for that.
my working horse Desktop AMD Ryzen 9 3900x, 32GB Ram // SSD ... enough
mx-fluxbox, what else?

In nature there are neither rewards nor punishments.
There are consequences.


my wallpaper gallery

User avatar
j2mcgreg
Global Moderator
Posts: 7175
Joined: Tue Oct 23, 2007 12:04 pm

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#5 Post by j2mcgreg »

timkb4cq wrote: Mon Sep 04, 2023 1:34 pm I use the Format USB applet found in MX Tools
+2
HP 15; ryzen 3 5300U APU; 500 Gb SSD; 8GB ram
HP 17; ryzen 3 3200; 500 GB SSD; 12 GB ram
Idea Center 3; 12 gen i5; 256 GB ssd;

In Linux, newer isn't always better. The best solution is the one that works.

p1e
Posts: 124
Joined: Fri Apr 01, 2022 6:01 pm

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#6 Post by p1e »

hi there

many thanks for sharing your ideas, insights and knowledge.

awesome.

i am a big fan of this great forum.

greetings
p1e: interests: Linux & SBC All About Circuits - Electrical Engineering & Electronics:
https://www.allaboutcircuits.com :: new Knowledge-Base: AFFiNE: There can be more than Notion and Miro. on affine.pro :: WordPress: make.wordpress.org/core/

User avatar
darknetmatrix
Posts: 79
Joined: Mon Sep 28, 2015 2:59 am

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#7 Post by darknetmatrix »

mintstick works always for me
HP Z400 Workstation HP Z210 Workstation
Intel Xeon W3565 (4) @ 3.1GHz & Intel Xeon E31225 (4) @ 3.4Ghz

User avatar
gimcrack
Posts: 305
Joined: Fri Dec 02, 2011 5:17 pm

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#8 Post by gimcrack »

Don't have a favorite. Most the time GUI application I use gparted. CLI command application I use the most has been cfdisk.

User avatar
m_pav
Developer
Posts: 1877
Joined: Sun Aug 06, 2006 3:02 pm

Re: which is your fav option to formate an usb - flash drive: the terminal or do you use Gparted!?

#9 Post by m_pav »

I use a combination of:
1 - Format USB tool, or
2 - MX Live USB Creator and sometimes a combination of MX Live USB Maker and GParted
and sometimes
3 - just GParted

I try to avoid the terminal because I have a double opposing astigmatism which results in convergence insufficiency at the focal point. Spectacles go some way to correct this but not fully, so I can make errors in the terminal that can result in total failure if I miss a very important key, so these GUI apps are a godsend. I've already toasted my daily driver once around 2006-2007 using terminal commands when taking work home for the weekend, lucky it was my system I toasted and not the customers! That's the point at which I decided GUI based formatting tools were the only way forward for me.

1 - The Format USB tool is good for simple Flash drives where only 1 partition is desired and its drop dead simple to choose the partition table type, msdos or gpt and the partition format type.

2 - When creating a Live USB to use as a live with Persistence drive, I use USB-SSD drives for speed and reliability, however, they are a little bigger than regular flash drives. When creating the Live-USB with a 128GB SSD, I choose the advanced option and limit the Live-USB partition to 15% of the drive. When finished, I fire up Gparted and format the remaining space as exFAT so it can be used in all known OS's.

The 2 options above both share a significant feature whereby they use a few passes using a variety of tools to ensure the drive is properly erased, removing traces of prior partition table types, boot flags and pre-existing partition markers prior to writing a new partition table type. This is important when flash drives may have additional circuits similar to the nvram found on motherboards where particular elements often damaged by one means or another are cached.

3 - When I need to do more advanced things like set/unset flags, check partitions, shrink/move/copy or create a mulit-partitioned drive, GParted is my go-to.
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

Post Reply

Return to “Chat”