• ZeroOne@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 day ago

    We seriously need a series of DD-Command 4 Dummies guides<br> Also you guys have USB drives with lights ???

  • debil@lemmy.world
    link
    fedilink
    arrow-up
    39
    ·
    2 days ago

    Commands like dd are the best. Good ole greybeard-era spells with arcane syntax and the power to casually wipe out the whole universe (from their perspective ofc) if used haphazardly or not in respectful manner.

    • ftbd@feddit.org
      link
      fedilink
      arrow-up
      18
      ·
      2 days ago

      What do you mean? Explicitly having to set if= and of= is way harder to screw up than mixing up the order of arguments for e.g. cp.

      • debil@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        2 days ago

        Unless you forget what if and of mean. With cp it’s simply “cp what where”. Never had problems remembering that.

          • debil@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            2 days ago

            No, but you’re just typing if and of, not infile and outfile, and the letters are right next to each other on a qwerty kbd. One can haphazardly misuse a lot of commands, it’s just that some commands may lead to nastier outcomes than others.

        • ftbd@feddit.org
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          I never had any problems with cp either. But the post makes it seem like dd is somehow more error prone, which makes no sense to me

          • debil@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            2 days ago

            Well, usually dd is not used as often as cp, so there’s a bigger chance of messing up the parameters, unless you’re careful and rtfm first.

  • waigl@lemmy.world
    link
    fedilink
    arrow-up
    76
    ·
    3 days ago

    IMHO, it was a mistake to make USB block storage use the same line of names also used for local hard disks. Sure, the block device drivers for USB mass storage internally hook into the SCSI subsystem to provide block level access, and that’s why the drives are called sd[something], but why should I as an end user have to care about that? A USB drive is very much not the same thing for me as a SCSI harddisk. A NVMe drive on the other hand, kinda sorta is, at least from a practical purpose point of view, yet NVMe drives get a completely different naming scheme.

    That aside, suggest you use lsblk before dd.

    • BCsven@lemmy.ca
      link
      fedilink
      arrow-up
      18
      ·
      3 days ago

      Yeah lsblk, lsscsi, fdsik -l , go have a coffee, come back later and hit enter on dd

      • Cenzorrll@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        2 days ago

        Yeah lsblk, lsscsi, fdsik -l , go have a coffee, come back later and hit enter on dd

        Then realize you typed the command wrong and panic when you don’t get an error.

    • naeap@sopuli.xyz
      link
      fedilink
      arrow-up
      10
      ·
      3 days ago

      I still made the mistake, when I sleep deprived switched if and of somehow
      My then girlfriend wasn’t exactly happy, that all here photos and music, which we just moved off old CDs, that couldn’t be read correctly anymore, and I spent quite some time to finally move them

      Obviously the old CDs and the backup image were thrown out/deleted just a few days earlier, because I proudly had saved the bulk of it - and being poor students having loads of storage for multiple backups wasn’t in reach.
      Backing them up again to fresh CDs was on the plan, but I quickly needed a live USB stick to restore my work laptop…

      Since then I’m always anxious, when working with dd. Still years later I triple check and already think through my backup restoration plan
      Which is a good thing in itself, but my heart rate spikes can’t be healthy

    • grue@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 days ago

      While we’re at it, can we also rename the hard drive block devices back to hd instead of sd again? SATA might use the SCSI subsystem, but SATA ain’t SCSI.

    • Redjard@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      2 days ago

      At least sata is well on its way towards dying, so the problem will solve itself in some more years.
      My machines all have nvme exclusively now, only some servers are left using sata. And I would say the type of user at risk of fucking up a dd command (which 95% of the time should be a cp command) doesn’t deal with servers. Those are also not machines you plug thumb drives into commonly.

      In 5-10 years we will think of sda as the usb drive, and it’ll be a fun-fact that sda used to be the boot drive.

        • Redjard@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          2 days ago

          I have a nas with 32TB. My main pc has 2TB and my laptop 512GB. I expected to need to upgrade especially the laptop at some point, but haven’t gotten anywhere near using up that local storage without even trying.
          I don’t have anything huge I couldn’t put on the nas.

          At this point I could easily go 4TB on the laptop and 8TB the desktop if I needed to.
          Spinning rust is comparable in speed to networking anyway, so as long as noone invents a 20TB 2.5’’ hdd that fits my laptop for otg storage, there would be no reason something would benefit from an hdd in my systems over in my nas.

          Edit:
          Anything affordable in ssd storage has similar prices in M.2-nvme and 2.5’'-sata format. So unless you have old hardware, I see the remaining use for sata as hdd-only.

      • waigl@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        2 days ago

        S-ATA still is the only way to have more than two drives in the system.

        • Redjard@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          My motherboard has 3 nvme bays.
          If I saw the need, there are cheap pcie to nvme cards, since (non-sata) nvme is just directing pcie lanes to the ssd anyway.

          But like I said below, I don’t even have the need to get a single ssd at the currently maximum price-effective size of 4TB, no less two or three.
          In my observation putting mass storage into your pc is dying in favor of either not needing that much storage, or putting it in a nas or other internet-accessible device.

          Even my non-IT friends do things like put their hdd in a usb enclosure and attach it to their (internet accessible) router.

  • muhyb@programming.dev
    link
    fedilink
    arrow-up
    54
    ·
    3 days ago

    Always lsblk before dd. The order of /sdX might change from boot to boot. Only /nvme doesn’t change.

  • LostXOR@fedia.io
    link
    fedilink
    arrow-up
    51
    ·
    3 days ago

    “/dev/sdb? It’s sdb? With a B? Yep that’s the flash drive. Just type it in… of=/dev/sd what was the letter again? B? Alright, /dev/sdb. Double check with lsblk, yep that’s the small disk. Are my backups working properly? Alright here goes nothing… <enter>”

  • ѕєχυαℓ ρσℓутσρє@lemmy.sdf.org
    link
    fedilink
    arrow-up
    27
    ·
    edit-2
    3 days ago

    This is the only reason why I still use GUI for making Linux USBs. Can’t trust my ADHD ass to write the correct drive name. Also, none of my USB drives have a light.

    Popsicle is pretty nice, it doesn’t let you choose the internal drives afaik.

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      2 days ago

      Luckily, this problem will disappear soon as we’re moving to systems with only nvme drives. Kinda hard to mistake /dev/nvmexny for /dev/sdx.

    • Hellfire103@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      1
      ·
      3 days ago

      Yep! I just installed Void about ten minutes ago off a 2GB stick from the mid-2000s. Somehow, those little sticks just keep going!

      • ma1w4re@lemm.ee
        link
        fedilink
        arrow-up
        6
        ·
        3 days ago

        Same! I have a 4gb white SanDisk stick, from like 12-14 years ago and is still working 💀💀 it even died on me once, and started working again after a few days 😳😳

      • f4f4f4f4f4f4f4f4@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        Keep them around. I was playing with and testing some ~15 years old mobos for work, and they would not boot from any USB3.0 stick I tried. Same images on an 8GB USB2.0 stick booted with no problem.

        Name and shame: Biostar motherboard

        • boonhet@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          Don’t worry, you can still buy USB 2.0 sticks nowadays.

          They’re priced almost the same as USB 3.whatever sticks. Literally. Add an euro or 2 and double the capacity and go to usb 3.0

      • kekmacska@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        for an usb, it might work. For such an old hard drive, it won’t. Linux will refuse to boot

          • kekmacska@lemmy.zip
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 days ago

            i know it from experience. When i wanted to install a modern Linux on a 2009 hdd, it installed, but simply refused to boot, even though hdsentinel said the hdd is 100℅ healthy

    • BCsven@lemmy.ca
      link
      fedilink
      arrow-up
      8
      ·
      3 days ago

      I buy them specifically with LED. It s helpful for data transfer, but also helpful for doing a flash of new OS to old nas hardware… You have to hold reset button in on nas until you see it start to read USB (by LED) then you know you can release the reset button.