2

I have a hard drive (/dev/sda) that is visible when I run sudo lsblk -f, but not when I run sudo fdisk -l.

What could be causing this?

All the google results I could find were about drives that were not listed with either lsblk nor fdisk.

edit to add:

When I run sudo fdisk /dev/sda, I get the error

fdisk: cannot open /dev/sda: Input/output error

7
  • are you running fdisk as root or with sudo?
    – Alex
    Commented Aug 30, 2022 at 7:48
  • Does sudo fdisk /dev/sda -> p > Enter work? Commented Aug 30, 2022 at 8:59
  • I am running sudo lsblk -f and sudo fdisk -l
    – PortMan
    Commented Aug 30, 2022 at 15:55
  • 1
    When I try running sudo fdisk /dev/sda, I get the error fdisk: cannot open /dev/sda: Input/output error.
    – PortMan
    Commented Aug 30, 2022 at 15:59
  • 4
    lsblk is simply interrogating the drive identify, while fdisk actually needs to read from disk. The error you're seeing suggests that your drive may be bad.
    – larsks
    Commented Aug 30, 2022 at 20:44

1 Answer 1

-1

Use gdisk. It should work. This means either the disk is physically damaged, but to the extent that is it sill recognised or that partition table has been damaged in a way that fdisk is not able to recognize. fdisk will not let you in, but gdisk will.

1
  • 1
    How should gdisk work if the drive is damaged?
    – stoney
    Commented Jan 13, 2023 at 7:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .