I have a hard drive which i want to make reusable, using gparted

I had a hard-disk with me. It is not usable because I did something wrong.

What i have done up until now:

  1. I tried to verify it’s existence using gparted. It showed unallocated storage.
  2. I tried to make a partition on the storage, it asked to create a partition table first.
  3. I created a gpt type partition table from the list.
  4. The partition table was created. Now I again tried to create a new partition. I selected ext4 (default), but during the process I encountered this:

These are the contents of the .htm file.

GParted 1.5.0

configuration --enable-libparted-dmraid --enable-online-resize

libparted 3.6

========================================
Device:	/dev/nvme0n1
Model:	HFM512GDJTNG-8310A
Serial:	
Sector size:	512
Total sectors:	1000215216
 
Heads:	255
Sectors/track:	2
Cylinders:	1961206
 
Partition table:	gpt
 
Partition	Type	Start	End	Flags	Partition Name	File System	Label	Mount Point
/dev/nvme0n1p1	Primary	2048	1050623	boot, esp		fat32		/boot/efi
/dev/nvme0n1p5	Primary	1050624	1000214527			ext4		/, /var/snap/firefox/common/host-hunspell

========================================
Device:	/dev/sda
Model:	TOSHIBA External USB 3.0
Serial:	98B5T0BBT
Sector size:	512
Total sectors:	3907029164
 
Heads:	255
Sectors/track:	2
Cylinders:	7660841
 
Partition table:	gpt
 
Partition	Type	Start	End	Flags	Partition Name	File System	Label	Mount Point

========================================
Create Primary Partition #1 (ext4, 1.82 TiB) on /dev/sda  00:02:45    ( ERROR )
     	
create empty partition  00:00:13    ( SUCCESS )
     	
path: /dev/sda1 (partition)
start: 2048
end: 3907028991
size: 3907026944 (1.82 TiB)
Set partition name to "partition1" on /dev/sda1  00:00:10    ( SUCCESS )
clear old file system signatures in /dev/sda1  00:00:01    ( SUCCESS )
     	
write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 67108864  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 274877906944  00:00:00    ( SUCCESS )
write 512.00 B of zeros at byte offset 2000396214784  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 2000397271040  00:00:00    ( SUCCESS )
flush operating system cache of /dev/sda  00:00:00    ( SUCCESS )
set partition type on /dev/sda1  00:00:00    ( SUCCESS )
     	
new partition type: ext4
create new ext4 file system  00:02:21    ( ERROR )
     	
mkfs.ext4 -F -O ^64bit -L 'T2' '/dev/sda1'  00:02:21    ( ERROR )
     	
64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.
Creating filesystem with 488378368 4k blocks and 122101760 inodes
Filesystem UUID: 5b6cea69-aa8b-454c-8759-a5d25891dbff
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: 0/14905
mke2fs 1.47.0 (5-Feb-2023)
mkfs.ext4: Input/output error while writing out and closing file system

If you have used legacy boot or MBR then you can’t use a gpt style partition map.

for a gpt style partition map, you have to use UEFI boot mode

If you just want to reformat a disk for storage, that will be different than trying to install say Kali to that same disk. if you need more help, post again

Yes, I need to reformat the disk to store data. I have no intentions to make it a bootable drive as of now. Can you help with that?

Your output says it hasn’t support for 64 bit;

mkfs.ext4 -F -O ^64bit -L 'T2' '/dev/sda1'  00:02:21    ( ERROR )
     	
64-bit filesystem support is not enabled.

Which would suggest that your hard drive controller is the problem. I’m going to assume you fitted a hard drive inside a case and attached it via USB here, and I would say that the controller the case uses, only supports FAT32 format properly, a great many ‘cheap’ enclosures are limited in this way, if you use exFAT format you can use larger file sizes, and it will likely be compatible with the enclosures controller chipset.

Or you need a better enclosure with a decent controller chipset in it.

Now the disc again lists with unallocated space and asks to create a partition table again. While selecting gpt type and applying it gives an error after some time, saying can’t write to dev/sda. I think something broke during the last process from where I have posted the error message.

and yes, it is a drive with a case. and i didn’t know there was something called a controller inside it.

When you buy a case to put a hard drive in, there is a small electronic board that connects to the drive and allows it to communicate over the USB bus, this is the ‘controller’ chipset.

Basically the cheaper enclosures usually use the cheapest controllers, and some of them will only support FAT32 which was a MBR format for disks and does not support GPT