I have a 1TB external USB drive plugged into my Raspberry Pi 4 running Ubuntu Server LTS. I was attempting to partition, format and mount the drive. My plan is to ultimately use it to store PostgreSql databases on it.
Here are the steps I was taking:
sudo fdisk -l (to list the drives and get the name)
sudo fdisk /dev/sda (to run fdisk on the drive)
g (to create a new empty GPT partition table)
n (to add a new partition, with all defaults)
w (to write the table to disk and exit)
Next I wanted to create a filesystem on the partition to format it:
sudo mkfs.ext4 /dev/sda1
I keep getting the message:
Found a dos partition table in /dev/sda1
Proceed anyway? (y,N)
How come I am getting this message and what does it mean? I chose to add a gpt partition table when using fdisk, not dos. Maybe when I was learning about all of this earlier I might have made a mistake? If this is the case how can I completely wipe the drive to unpartitioned space and start from square one?
mkfs.ext4
isn't warning you that you have a dos partition in use, it's warning you that it has found one inside the space where you want to put your filesystem, you're about to obliterate it, and asking if you're sure. dos and GPT partition information is kept in different places, and typically writing a partition table doesn't disturb any of the data already elsewhere on the device. So you are seeing an artefact of some previous use of this device. – grifferz Feb 05 '21 at 22:51wipefs
if you want, certainly. Or you can just not care and pressy
. The end result will be no different. – grifferz Feb 06 '21 at 00:19