In very short, I have a NixOS install with an /etc/fstab using UUIDs. However, my bulk drive died. I have backups, the data is not the problem.

But I can’t boot NixOS without the drive. It throws me into an emergency shell, in which I can’t edit /etc/fstab (read-only FS) and since I’m in emergeny mode, nixos rebuild doesn’t work either (seems to be mostly a network issue).

So, what’s the best, non-reinstalling way to fix that?

  • @[email protected]
    link
    fedilink
    English
    21 month ago

    Can I ask what kind of drive the failed drive is?

    If by chance it’s a Western Digital or Seagate spinning hard drive, I recommend to take the controller board off the drive and clean the contact traces with a pencil eraser.

    You’d be surprised how many of those drives I’ve fixed that way. It’s like they didn’t even properly finish the manufacturing process, and those contact points corrode over time. Hitachi did their drives right though, they put solder beads on those contact points to prevent corrosion.

    • @[email protected]OP
      link
      fedilink
      English
      11 month ago

      It’s a Seagate, yes. And that might actually do work, but currently it looks more like about 2 bazillions bad sectors.

      • @[email protected]
        link
        fedilink
        English
        11 month ago

        I can’t speak for whether those existing bad sectors can or can’t be recovered, but yeah, when there’s bad connections between the controller board and the drive, then the actuator heads will have a less than stable current going to them and won’t be able to reliably align over the tracks.

        It still might be enough to get you back up and running long enough to change your fstab file to make appropriate changes to remove the failing drive from the configuration.