3 ms·
It's really unfortunate how tutorials still spell out all the basics to keep the beginners with them, but then rely on the old-fashioned device names when it co
by jeroenhd 6y ago
It's really unfortunate how tutorials still spell out all the basics to keep the beginners with them, but then rely on the old-fashioned device names when it comes to writing images. Using sda is fine if you're experienced and know what drive has what name, but technical references should stop relying on them already. It's not like you're getting some useful cross-platform compatibility out of old-fashioned commands or anything, every modern Unix has its own way to specify disk names.
- csydas 6y agoI think the simplest explanation is that the authors themselves never considered the other options or were even aware of them -- they simply are sharing some historical knowledge they had. Very kind and good behavior! But I would imagine it's something rote and probably just a shortcoming in collective knowledge. In short, I think ignorance is the simpler answer ;)
- simonmales 6y agoYep, every couple of years I need to use dd. Never knew of an alternative to sda.
- nitrogen 6y agoWhen I was first learning Linux it was pretty helpful to look at a few random things in /dev and /bin and /etc and learn what they did, whenever I had a few spare minutes.
- micro-ram 6y agoZFS has open my eyes to /dev/disk/by-id/. It's the only way when you have many of the exact same make/model/size drives per machine. You will learn by fire the first time you need to determine which drive you need to replace.
- alex_smart 6y ago>Using sda is fine if you're experienced and know what drive has what name Not even then. The prospect of making an occasional mistake, while low, is clearly much higher than when you are selecting the disk using its name. Being experienced doesn't excuse you from the responsibility of using a less risky tool.
- codetrotter 6y agoTo avoid mistakes I always do “lsblk” (on Linux) or “diskutil list” (on macOS) or “gpart show” (on FreeBSD) and carefully read the output before I do the dd to something. Usually on Linux I only use /dev/disk/by-id/foo in scripts and config files. But using it when doing routine stuff with dd is a pretty good idea too. It’s too bad that macOS and FreeBSD hasn’t anything similar to my knowledge. And since I use both of these operating systems so much, and so often for things involving dd, I think in my case I don’t gain much from doing by-id for dd on Linux unfortunately.
- alex_smart 6y ago>To avoid mistakes I always do “lsblk” Even this is faulty solution. By default, it only lists the devices with their "/dev/sd*" names.