When I use a GUI environment, I have there only ext4, NTFS, FAT and other, but I need to type their name. I tried one time to type there ext2, but it seems it gets stuck. I was waiting a lot and it still did not format.
My OS Debian, using Gnome 3.
- 66,199
- 35
- 114
- 250
- 29
- 1
- 1
- 2
-
1What are you using in `GUI`? Are you using `disks`? – Prvt_Yadav Jul 24 '18 at 16:59
-
@Debian_yadav Yes – user302100 Jul 24 '18 at 17:04
3 Answers
There are two steps. First you have to create the partition, then you have to build the filesystem on it. From the CLI as root, the following commands will format, and build a ext2 filesystem on a USB stick.
Stick the disk in. Run dmesg and note the new drive added.
As root:
fdisk /dev/sdX # the drive letter only without a number
d (delete existing partitions.)
n (create new partition)
use the default start and end blocks.
l (list the available partition types)
t (I think? I'm working from memory here)
type the number "83" to set the partition to linux.
w (writes the partition)
mkfs -t ext2 /dev/sdX1 # the drive letter and partition number of the flash disk
Pull the disk out, stick it back in and mount it the way your normally would.
- 27,586
- 56
- 179
- 309
- 161
- 2
-
Note that if the drive is already mounted, you will need to `umount` it first. – Dvd848 Jul 02 '21 at 18:33
You can [install if necessary and] use gparted to create an ext2 file system in a partition.
sudo apt install gparted
gpartedhas a graphical user interface and is quite intuitive, I would say it is easier to use than Disks aliasgnome-disks.
When you have selected the operations, please click on the tick icon (create partitions, create file systems, add flags and labels ...).
- 6,071
- 14
- 27
You need to enter the file system type manually.
Choose : Custom (Enter file system type) , under Filesystem type ext2
- 63,407
- 31
- 131
- 192
