Just to clarify from previous comments, I can confirm that the drive had finished creating the file system before unplugging it... See below for more details...
I'm using Ubuntu-Mate 24.10, and am having a very very weird problem. Of course, it's very possible that I simply just don't know entirely what I'm doing.
I'm trying to format an external USB Western Digital My Passport 2TB drive.
I followed the guide at
https://www.youtube.com/watch?v=2Z6ouBYfZr8 which is produced by a reliable source, (Learn Linux TV.)
I'm trying to do this with fdisk in the command line, as I am totally blind and just find doing it on the CLI to be easier.
So, I checked for the list of blocks on my system:
lsblk
and determined that sdb was my external disk, and specifically it had only 1 partition, sdb1.
I began by unmounting the drive sudo umount /dev/sdb1
I then ran the lsblk command again, and found that there was no longer a directory mountpoint.
I then did mount | grep 'sdb'
I got no output, which tells me it indeed isn't mnounted anymore.
I then went into fdisk sudo fdisk /dev/sdb
Once in here, I hit p to show the partition table and found that I had 1 partition, which is the one I want to wipe and also then reformat.
I typed g to create a gpt partition table.
I then checked again the table structure by typing p, and hitting enter.
Obviously, it shows no partitions due to me creating the gpt table. It asked me in doing so if I wanted to delete the current exfat signature already on the drive upon write. I told it yes.
So next, I pressed n, then hit enter to create a new partition.
I told it to make it partition 1, and I left the sector size alone, just hitting enter and accepting the default, as I wanted it to expand across the entire disk.
Finally, I wrote changes by hitting w, and then pressing enter.
Now back at my prompt, I typed sudo mkfs.ext4 /dev/sdb1
This wrote the file system.
Then, I did what was suggested in the above video... I unplugged the hard drive from my USB port, and then plugged it back in.
The problem is, after doing this, the drive isn't remounting.
So, I tried mounting it myself with
mkdir ~/disk sudo mount /dev/sdb1 ~/disk
I know normally it should automatically mount upon insertion to the /media directory, but that's not happening. That's why I manually created a mountpoint, and tried mounting it there. - That was my logic of thinking.
However, this didn't work and it basically told me sdb1 couldn't be found.
Can someone show me where I went wrong?