usb bootable stick

Tim ignored_mailbox at yahoo.com.au
Fri Oct 16 12:56:03 UTC 2015


Tim:
>> Why would anyone think that a command like:
>> 
>>   dd  if=boot.iso  of=/dev/sdb  bs=8M
>> 
>> Is going to write to anywhere else than /dev/sdb?

Ranjan Maitra sent:
> No, I would not think so. But if the device is not mounted, would it
> not write to the mount point, especially because you are doing so as
> root (so nothing to stop you). This logic seems to make sense to me,
> and indeed is what happens when I have done it accidentally (without
> mounting the USB drive).

There's nothing logical about what you've said.

The example command line does not mention a mount point, only devices.
The "if=" is where it gets its input from, and "of=" is where it goes to
("input" and "output" "files," even though the output is not exactly a
file, in this case).  That example's output is to /dev/sdb.  It'll
either output to /dev/sdb, or fail if there isn't a /dev/sdb device
available.

Being root isn't magical, it won't suddenly make the command do
something that you didn't type into it.

There is only one way you could write to the mount point, and that's by
mentioning a mount point in the "of=" parameters.

e.g.  dd if=sample.iso of=/mnt/drivename

But that's not how you'd use "dd" in this kind of situation - where you
were wanting to write to the underlying device, from the beginning of
its storage, not just copy a file into its filesystem.

I can't help think but you're doing it wrong if you get those kind of
results.

-- 
[tim at localhost ~]$ uname -rsvp
Linux 3.9.10-100.fc17.x86_64 #1 SMP Sun Jul 14 01:31:27 UTC 2013 x86_64

All mail to my mailbox is automatically deleted, there is no point
trying to privately email me, I will only read messages posted to the
public lists.

ZNQR LBH YBBX!





More information about the users mailing list