• RedSnt 👓♂️🖥️@feddit.dk
    link
    fedilink
    arrow-up
    2
    ·
    10 hours 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
    arrow-up
    3
    ·
    24 hours 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.

  • 9point6@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    1 day 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

  • rtxn@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    22 hours ago

    Broke: /dev/sd*
    Woke: /dev/disk/by-id/*
    Bespoke: finding the correct device’s SCSI host, detaching everything, then reattaching only the one host to make sure it’s always /dev/sda. (edit) In software. SATA devices also show up as SCSI hosts because they use the same kernel driver.

    I’ve had to use all three methods. Fucking around in /sys feels like I’m wielding a power stolen from the gods.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      I actually have multiple HDDs of the same model with only their serial numbers different.


      I usually just open partitionmanager, visually identify my required device, then go by disk/by-uuid or by disk/by-partuuid in case it doesn’t have a file system. Then I copy-paste the UUID from partitionmanager into whatever I am doing.


      Fucking around in /sys feels like I’m wielding a power stolen from the gods

      I presume you have had to run on RAM, considering you removed all drives

      • rtxn@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        I presume you have had to run on RAM, considering you removed all drives

        Yes. Mass deployment using Clonezilla in an extremely heterogenous environment. I had to make sure the OS got installed on the correct SSD, and that it was always named sda, otherwise Clonezilla would shit itself. The solution is a hack held together by spit and my own stubbornness, but it works.

    • Appoxo@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      23 hours 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

    • mmddmm@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      I’m so terrified about it that I check dozens of times before running it. So, no.

      But I’m a repeat offender with rm -rf * .o