Am Di., 22. Apr. 2025 um 19:17 Uhr schrieb Sean Snell <ssn...@lakecs.net>:

> *> which I encountered during copying this ISO image over.*
>
> If you were trying to write the ISO as-is for bootable reuse wouldn't you
> use DD to write the image as it stands? Otherwise if keeping the ISO as an
> ISO was your goal wouldn't you need to create a basic partition table,
> mount the partition (ie /dev/sda1 to /mnt) then *cp archlinux.iso /mnt* ?
>

I was providing an USB pen drive with the current version of the Arch Linux
bootable ISO image. cp archlinux.iso /mnt/ would be pretty useless, as it
would just copy the ISO file into the directory /mnt. Instead, I copied
over the ISO "in raw" directly to the special device file /dev/sda, s.t. it
becomes the content of the corresponding device (the pen drive here)
directly, so it can be booted later on. In fact, it doesn't matter which
program opens that device file /dev/sda. All the translation to the raw
memory of the device is done by the kernel. So it doesn't matter if dd or cp
is used. In this respect, the *work is not done by* dd. It is not even much
faster. For both programs, /dev/sda is used as a file lying around in /dev/,
which is opened in writing mode, and whose content is overwritten.


> Apologies if I've misread, you've sparked my genuine curiosity with the
> path you've chosen.
>

At this point, the ingenuity of "device files" becomes apparent. I always
find it a pretty genious way of exposing devices in a filesystem tree.

Best,
Friedrich

Reply via email to