fix for usb flash memory

I am trying to dd a windows-11 iso to a 32 Gb USB flash drive. I am getting this error:


Code:
# dd of=/dev/da0  bs=4M conv=sync status=progress if=/home/byrnejb_hll/Downloads/MS-Windows/Win11_22H2_English_x64v1.iso of=/dev/da0  bs=1M conv=sync
dd: of: illegal argument combination or already set

dmesg shows this:
Code:
ugen0.2: <Generic Mass Storage> at usbus0
umass0 on uhub1
umass0: <Generic Mass Storage, class 0/0, rev 2.00/1.00, addr 12> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4101
umass0:9:0: Attached to scbus9
da0 at umass-sim0 bus 0 scbus9 target 0 lun 0
da0: <Generic Flash Disk 8.07> Removable Direct Access SPC-2 SCSI device
da0: Serial Number 5A897DA9
da0: 40.000MB/s transfers
da0: 30500MB (62464000 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

gpart list da0 shows this:
Code:
# !gpart
gpart list da0
gpart: Class 'PART' does not have an instance named 'da0'

The usb key was previously used on a Windows 7 system at some unknown date.

Is there a way to repair this device so that the iso can be loaded onto it?
 
dd of=/dev/da0 bs=4M conv=sync status=progress if=/home/byrnejb_hll/Downloads/MS-Windows/Win11_22H2_English_x64v1.iso of=/dev/da0 bs=1M conv=sync

If that is really the command you are entering:
you have "of=/dev/da0" twice, you have bs and conv=sync twice.

I typically use bs and conv on the of, I think if it doesn't matter.
 
Also consider that Windows ISOs used to be not directly USB bootable. At least until 10, didn't try Windows 11 yet.

Most people use Rufus for making the image USB bootable. But this requires having a working Windows machine.
So you might like to use Geteltorito instead, a Perl script.
 
If that is really the command you are entering:
you have "of=/dev/da0" twice, you have bs and conv=sync twice.
Thanks. That was the problem.

Also consider that Windows ISOs used to be not directly USB bootable. At least until 10, didn't try Windows 11 yet.
We shall see. I used an ISO to boot Windows-10 into Parallels on OSX. If this direct approach does not work then I will try something else. Thanks.
 
Cool. I'm guessing it was a cut and paste error somewhere. In theory I think one can specify bs on both the of and if parameters, but it makes more sense to me specifying only on of because if is pretty much stream of bytes.
man dd talks about conv parameter in good detail.
 
Back
Top