If you can't access your HDD through LiveCD, LiveUSB, or diagnostics, it means that either it's faulty or its partition table is corrupted.
If you can see your drive through sudo fdisk -l
after booting from Live media, you may want to try to do fsck
on its filesystems.
Let's say you have 2 parititons on your drive.
sudo fsck /dev/sda1
sudo fsck /dev/sda2
Change the /dev/sda
to the block name visible through sudo fdisk -l
or list your parititons with sudo blkid
.
If fsck
can't fix your drive you may want to try use gdisk
to verify its configuration. Please refer to this answer:
If you can see the list of partitions on your drive you can proceed with this guide and try to recover grub:
If you can't see the list of partitions please use SMART monitoring tools on live cd to check your drive for errors.
sudo apt install smartmontools
sudo smartctl --all /dev/sda
You'll find more on that in this answer:
If SMART can't access your disk it's most likely faulty and you should sent it to warranty. Keep in mind that you'll lose your data.
If you don't have backup and you don't want to lose something important, you're last chance will be this guide: