If someone can help me with this it would be much appreciated, cause I feel like I'm running out of options
Context: Roughly a month or so ago I built a new PC from scratch
Properties | |
---|---|
Processor | Ryzen 5 3600XT |
GPU | Nvidia GeForce GTX 1660 |
Motherboard | ASRock B450M Pro4-F |
Memory | 16GB (2x8) Kingston HyperX |
Drives:
- 250GB KINGSTON SA2000M8250G (nvme),
- 480GB ATA KINGSTON SA400S3 (scsi),
- PSU: Cooler Master MWE White 550
I installed Ubuntu 20.10 on the nvme drive with a zfs with encryption, added the SATA ssd to the pool for more storage, and had been using it without much issue. Somewhere along the line I got my main drive corrupted (I assume because of shutting down incorrectly(forced reboot)), my system sometimes wouldn't even boot, othertimes I was able to login into the system and use it normally for about 3-5 minutes before everything but the mouse froze. After trying to recover to no avail I swallowed it up, and did a fresh system installation, this time with just the regular recommended settings, all seemed to work fine.
I formatted by SATA drive to ext4, mounting to /drives/bigdrive, to hold larger files, like media and such, and made symlinks on the /home/$USER folder pointing to it, still working fine. After installing some applications, I noticed the system didn`t have swap area, since I wanted the system to be able to sleep to conserve energy I tried creating some using gparted, setting it to a partition at the end of nvme0n1 and set the system to sleep after 1 hour of inactivity. I probably had done something wrong, because after waking up the system was very slow to respond, some applications were frozen, and the desktop screen was black. So I tried rebooting from GUI power options.
After booting I was greeted with the following screen:
error: can't find command `hwmatch'.
error: failure writing sector 0xb9dd800 to hd1
Press any key to continue..._
And so:
So I tried, once again, to do a fresh installation, seeing as this time I probably wouldn't lose that much. But kept getting an I/O Error while trying to write on nvme0n1, so I did a live boot through the USB drive and opened gparted, and again, the same error, I couldn't format the drive, nor delete its partitions. I could format the SATA drive normally and create/remove partitions.
So I tried formatting the drive through the UEFI sanitization tool. Now the drive shows as unallocated, but again, same error while trying to create a partition table: I/O error.
Opening properties of the drive shows that it has an unrecognized disk label:
These are the outputs of some of the commands I tried running:
fsck:
sudo fsck.ext4 -v /dev/nvme0n1
e2fsck 1.45.6 (20-Mar-2020)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/nvme0n1
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
lsblk:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 2G 1 loop /rofs
loop1 7:1 0 62.1M 1 loop /snap/gtk-common-themes/1506
loop2 7:2 0 217.9M 1 loop /snap/gnome-3-34-1804/60
loop3 7:3 0 55.3M 1 loop /snap/core18/1885
loop4 7:4 0 50.7M 1 loop /snap/snap-store/481
loop5 7:5 0 30.9M 1 loop /snap/snapd/9721
sda 8:0 0 447.1G 0 disk
sdb 8:16 1 3.8G 0 disk
└─sdb1 8:17 1 3.8G 0 part /cdrom
nvme0n1 259:0 0 232.9G 0 disk
parted:
(parted) print all
Error: /dev/nvme0n1: unrecognised disk label
Model: KINGSTON SA2000M8250G (nvme)
Disk /dev/nvme0n1: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sda: 480GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 4028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 4028MB 4027MB primary fat16 boot, lba
(parted) rescue /dev/nvme0n1
Error: /dev/nvme0n1: unrecognised disk label
(parted) mklabel gpt
Error: Input/output error during write on /dev/nvme0n1
Retry/Ignore/Cancel? Retry
(parted) rm /dev/nvme0n1
Error: Partition doesn't exist.
(parted) mktable
New disk label type? gpt
Error: Input/output error during write on /dev/nvme0n1
Retry/Ignore/Cancel? cancel
gdisk:
sudo gdisk -l /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.5
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Disk /dev/nvme0n1: 488397168 sectors, 232.9 GiB
Model: KINGSTON SA2000M8250G
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 50E941E8-9C02-4264-99CE-C255291BC1A2
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 2048-sector boundaries
Total free space is 488397101 sectors (232.9 GiB)
Number Start (sector) End (sector) Size Code Name
sudo gdisk -l /dev/nvme0n1
– oldfred Jan 31 '21 at 18:25error: can't find command hwmatch
: it's coming from grub. It's normally exhibited by the grub-efi variant. If you are indeed booting with UEFI (and not legacy MBR), then (in normal circumstances) it can be largely ignored, and fixed for a cosmetic effect later, when you have sorted your disk out. See this thread: https://askubuntu.com/a/1301092/1157519 – Levente Jan 31 '21 at 19:01Disk /dev/nvme0n1 - 250 GB / 232 GiB - CHS 238475 64 32 Current partition structure: Partition Start End Size in sectors
Bad GPT partition, invalid signature. Trying alternate GPT Bad GPT partition, invalid signature.
` @oldfred
– embuttelli Jan 31 '21 at 20:12Disk /dev/nvme0n1 - 250 GB / 232 GiB - CHS 238475 64 32 Partition Start End Size in sectors
Keys A: add partition, L: load backup, Enter: to continue`
– embuttelli Feb 01 '21 at 01:32