Formating External Drive to Ext4

How did you format it? Did you do it from the command line?


Moved your post to a new topic, being as you had responded to a 3 year old post. If I’m correct you would like to know know how to format an external drive to ext4? The best way to do that depends on the os you are running,Windows, Linux or Mac?


Thanks for opening a new topic. I wanted to format the drive from OSMC using commands line.

I used this to find the name of my drive:

fdisk -l | grep '^Disk'

My drive was names /dev/sda2 so I ran this to format it to ext4:

sudo mkfs -t ext4 /dev/sda2

Then I unmounted with
sudo umount /dev/sda2

Then I renamed it with:
sudo e2label /dev/sda2 myname

Then I ran this but I can’t remember why:
sudo blkid

Finally, I ran:
mount /dev/sda2

I think I couldn’t mount it so I might have manually unplugged it and plugged it back in.

1 Like

Just some help for the future:

/dev/sda2 is a partition (the second one) on the the drive not the drive itself
instead of using e2label separately you can already give the label while formatting sudo mkfs.ext4 -L myname /dev/sda2
Instead of using mount/umount either just unplug/replug the disk or just initiate reboot to allow the automounter to mount the disk.