Holger Wansing <hwans...@mailbox.org> writes: > Hi, > > David <bouncingc...@gmail.com> wrote (Sat, 9 Oct 2021 21:56:24 +1100): >> I see that the suggestion to use 'cat' comes >> from #604839. >> >> Yes, 'cat' will "work", however I feel there is no >> good reason to use 'cat' there. >> >> Because the purpose of 'cat' is for concatenating >> multiple files, and it also requires a shell redirection >> from stdout. Both are unnecessary here. >> >> I suggest this command should be used: >> # cp /usr/lib/syslinux/mbr.bin /dev/sdX >
Wow that's a new capability :-) IIRC cp couldn't historically write directly to block devices, and DEST had to be either a target file or directory. It makes me wonder if install(1) has also gained spooky new capabilities :-p > The documentation in the syslinux package also has > > A simple MBR, roughly on par with the one installed by DOS (but > unencumbered), is included in the SYSLINUX distribution. To install > it under Linux, simply type: > > cat mbr.bin > /dev/XXX > > ... where /dev/XXX is the device you wish to install it on. > > so I guess there is some good reason to do it this way. > Holger, do you think this could be from the days of cat bootloader.bin kernel.image userspace.bin > /block/device ? AFAICT these semantics aren't totally totally anachronistic, because of systemd-boot's "unified image" or "unified kernel image" support...but that said, I'm not sure if this is an example of simple appended/concatenated images. Best, Nicholas
signature.asc
Description: PGP signature