• runeko
      link
      fedilink
      82 days ago

      If you format them all, you make sure you got the one you wanted.

  • @9point6@lemmy.world
    link
    fedilink
    44
    edit-2
    2 days ago

    The problem you have is you care which disk gets wiped, russian roulette is the best design pattern!

    sudo dd if=/dev/zero of=$(ls /dev/sd* | shuf | head -n1)
    

    …I shouldn’t need to say, but don’t run that unless you want to make your day a bit worse

  • RedSnt 👓♂️🖥️
    link
    fedilink
    21 day ago

    Being a noob helps me there. I’ll boot into a live environment off a usb stick and use gparted if it’s local. But obviously that’s a lot harder via SSH

  • @MehBlah@lemmy.world
    link
    fedilink
    English
    82 days ago

    Somehow in thirty years I have never done that. I did however one time pull a drive that wasn’t done with its cached writes.

      • @grrgyle@slrpnk.net
        link
        fedilink
        72 days ago

        Like walking to the table with a plate full of steaming chive dumplings only to catch the corner of the plate on a wall and watch your dumps go tumblo all over and dog eats them and is definitely going to have the shits in the middle of the night

    • @Appoxo@lemmy.dbzer0.com
      link
      fedilink
      4
      edit-2
      2 days ago

      Let’s unplug the system drive while formatting the intended drive.

      You have three options:
      O1: Your OS lives basically in the RAM anyway.
      O2: Get rekt
      O3: You can’t formart your system drive because it’s mounted from /dev/nvme0p

  • Incogni
    link
    fedilink
    112 days ago

    Just use nvme drives and this will never happen to you again!

    • Lucy :3
      link
      fedilink
      112 days ago

      Except you now have 2-3 numbers to correctly remember instead of one char

    • palordrolap
      link
      fedilink
      62 days ago

      My motherboard has two NVMe slots. I imagine that if I’d had the funds and desire to populate both of them, this same issue could rear its ugly head.

      • Incogni
        link
        fedilink
        82 days ago

        No, because they aren’t mapped under /dev/sdX ( ͡° ͜ʖ ͡° )

        • @ulterno@programming.dev
          link
          fedilink
          English
          52 days ago

          Yeah!

          /dev/nvmeXnYpZ warrants another meme and is not covered by the terms of this memetic service.
          Please subscribe to the other service to fulfil your requirements.

  • ssillyssadass
    link
    fedilink
    62 days ago

    This happened when I tried to install Mint for a dual boot on my PC with two drives. It wasn’t fun.

    • funkajunk
      link
      fedilink
      English
      22 days ago

      This is why I always unplug the other drive before I install Linux, because the one time I didn’t I couldn’t boot the other OS anymore.

      I didn’t format the wrong drive, but the Linux installer automatically detected the existing EFI partition and just overwrote it. Luckily, that was the only issue and I was able to recreate the EFI partition, and it taught me a lesson that I will never forget.