How to format a FAT32 USB as EXT4
I have a USB device /dev/sda1 and I want to format it as ext4. I have tried
sudo mkfs.ext4 /dev/sda1It gives warning, goes ahead and completes formatting without error. But when I check it using sudo fdisk -l, I can see that it is still FAT32,
Device Boot Start End Sectors Size Id Type /dev/sda1 8192 62816255 62808064 30G c W95 FAT32 (LBA)I don't have any data on it and I just want to change the file system..
Please advise.
Thanks,
51 Answer
You can try to change the partition type in fdisk.
To do this, run fdisk /dev/sda with t you can change your partition type in fdisk, which will lead you through the process. Your partition number should be 1 (because of /dev/sda1) and you should choose the partition type 83 (Linux).
Then try again to run mkfs.ext4 /dev/sda1.
EDIT: To have a better check for your fs type, run df -T which shows you the correct type of each partition.