Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Unusable system during dd to USB block device
On Tue, 29 Dec 2020, Thomas Mueller wrote:
What is the raw device in the case of a USB stick or USB hard drive?
On NetBSD, typically:
/dev/rsd0
Raw devices have a "r" prefix.
dd to /dev/da2 (or whatever the number was) worked in FreeBSD.
On FreeBSD, there are only raw devices now:
https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html
On Linux, there are no raw devices, so you need a "direct" in {i,o}flag=
to prevent dd from clobbering the buffer/page cache.
In each case, I used bs=1m ; otherwise it uses something like 1024 or 512
bytes and is excruciatingly slow.
Yes, you would need a large block size for efficiency, otherwise for a
1GB file you would have 1GB/512 = 2M syscalls being made.
There needs to be better documentation on how to write using dd to a USB
stick from NetBSD, distinction between raw device and block device.
The examples in the NetBSD install docs only show raw devices being used,
but, perhaps a mention of the difference between raw/block devices might
be useful also.
-RVP
Home |
Main Index |
Thread Index |
Old Index