Sample Header Ad - 728x90

Error Formatting Disk - Drive Missing

0 votes
1 answer
198 views
So I had a somewhat faulty HDD (missed partition table) and plugged it in my linux in the SATA port. It was only showing as /dev/sda , no /sda1 whatsoever. In order to reformat its partition table I was following a tutorial and using gdisk, and I did this
Command (? for help): n 
Partition number (1-128, default 1): 1 
First sector (34-1953525134, default = 2048) or {+-}size{KMGTP}: 4096 
Last sector (4096-1953525134, default = 1953523711) or {+-}size{KMGTP}: 1953523711
Current type is 8300 (Linux filesystem) 
Hex code or GUID (L to show codes, Enter = 8300):
  Changed type of partition to 'Linux filesystem'
Afterwards I did v then w. And in lsblk /dev/sda started showing 0B instead of the expected 1Tb. gdisk said it had no space left on device. I restarted to see if that would work and then it was gone from the lsblk output. And now it doesn't appear in anything else (tried gdisk, fdisk, smartctl and dmesg). No sd* letter assigned to it. Is there any way for me to get it back or now it's gone for good? I really don't know my way around filesystems and whatnot.
Asked by Yuri Teixeira Mendes (1 rep)
Jan 10, 2024, 12:22 AM
Last activity: Jan 10, 2024, 01:03 AM