¿ªÔÆÌåÓý

Re: UNIX files and dd, Re: [HP-Agilent-Keysight-equipment] Agilent 54831M


 

Hi, Dave.

You "mini-tutorial" on UNIX is much appreciated! I've dabbled a bit in that world (just enough to get myself into real trouble!).

For sure the Linux version of fdisk is light years ahead of that lame DOS fdisk! The Linux fdisk "knows" all the partitions out there; this one is FAT32, this one is NTFS, etc. The dumb DOS one just says Duh, there's something else out there, but I don't have a clue what its format is. Not to mention that every time you touch it, DOS fdisk goes and checks the hard drive! Maybe back when hdds only held 10 MB that was OK, but in the TB era, it takes a huge amount of time unnecessarily. You just checked it 10 seconds ago!

So a few years ago a friend told me about wubi, an installer for the Ubuntu distribution of Linux that runs turn-key on Windows systems.
Ubuntu had the GUI to make it Windows-user-friendly, and indeed, it was a snap to install, it made it a no-brainer to have a dual-boot system, and all was well. I used the thunderbird email client; I wasn't a big fan of thunderbird, but it did work well enough. But then one day my computer refused to boot to Linux. I looked for wubi online, but it was gone, and I don't remember all the details, but I think there was a .iso in it's place, and I never could figure out what to do with that. So I gave up and went back to Windows. For my purposes it works. Maybe some day I will go back to Linux, but I'd need a lot of time on my hands to ascend the learning curve.

I think of computers sort of like I think of cars and trucks. Just another tool that I'd just as soon not have to know how it works. Some people like to know all about them and get "under the hood" so to speak. Not me, I'm an analog/RF/microwave guy who would rather spend his time digging into radios and test equipment. To each his own.

Jim Ford

------ Original Message ------
From: "Dave McGuire" <mcguire@...>
To: [email protected]
Sent: 10/12/2020 9:06:44 PM
Subject: UNIX files and dd, Re: [HP-Agilent-Keysight-equipment] Agilent 54831M

On 10/12/20 11:12 PM, Bostonman wrote:
I apologize ahead of time, but I lack experience with Linux, so these commands are confusing me.

The file was downloaded as a .zip, but it contains a file with the extension of .dd. Any 'dd' commands I find seem geared towards using a .iso file to make a bootable drive.

Currently I'm using a Raspberry Pi with a SSD drive connected through a USB adapter.

I looked at the link above, but it doesn't make sense to me. One article stated I need to set the block size, and others have extensively long command lines.

So I remain baffled at how to handle this.
First, it's important not to overcomplicate things. From your statements I assume you're coming from the Windows world. In the Windows world, it's common to have one or more programs designed to accomplish a specific task and those programs store data in closed, proprietary formats, creating files that will only work with that specific program. If you've got a dozen programs that all accomplish the same task, they'll each use their own format.

The UNIX world is much, much simpler than that. Sure, locked-in file formats do exist, but they are not the norm with common UNIX utilities.

The "dd" program does not have a file format. It copies bytes from one place to another. If you tell it to move bytes from a hard disk drive (not a FILE on a hard disk drive, but from the drive itself), and put them into a file on another hard disk drive, the resultant file will contain a byte-for-byte copy of whatever was on the source hard disk. This is commonly referred to as a "disk image".

The .ISO file format is poorly-named and largely misunderstood. There is no such thing as "an ISO file". ISO refers to the ISO-9660 file format, which is an on-disk filesystem layout intended for use with optical media. There are many such filesystems, but ISO-9660 is very common on optical media. When you make a disk image file (see paragraph above) of a CD-ROM drive, that would be considered to "be an ISO"...whether that CD-ROM originally contained an ISO-9660 filesystem or not. This is typical American terminological laziness at work, and it leads to confusion.

Next, file naming...Another important thing to understand about the UNIX world is that file extensions have no meaning to the system, only to humans. Windows makes a lot of assumptions about the contents of a file based on its extension, but in a UNIX-based OS, there's nothing special about the "." character, and there's nothing special about what may or may not come after it in a filename. Someone having called your file "<filename>.dd" means nothing to the system, and is not used by the system in any way, but it gives me (and soon, you) a clue as to how the file was created if the guy you got it from didn't tell you.

It would be useful for you to learn what the "dd" program does and what it's all about. If you understood it, you would see the "instructions" you found online and immediately see how they would apply to your situation, although they were (poorly) written to focus on "ISOs" of CD-ROM disks. The "dd" program copies bytes between sources and destinations. Sources and destinations can be hard disk drives, CD-ROM drives, floppies, USB thumb drives, files on a disk...anything.

The "dd" program has a lot of options to manipulate data in different ways. Sometimes the block size is important, but a lot of the time it isn't. Most of the time (but not all) it just tells dd to "read or write the data in chunks this big". For some types of devices it's important, for most it isn't, and for files on a drive it means nothing at all...EXCEPT things generally go a whole lot slower if you use a block size of 1 byte, which is the default unless you tell dd otherwise.

I realize learning this is actual work, but this is a give a man a fish/teach a man to fish situation. If you do any amount of "real" computing, you will use this information over and over again. The whole world works this way. The important thing to keep in mind is that UNIX is nothing at all like Windows...do not make any assumptions based on your Windows experience.

-Dave

-- Dave McGuire, AK4HZ
New Kensington, PA




Join [email protected] to automatically receive all group messages.