hexdump
output, the partition table's first entry has 0xFF type (assuming that's a regular MBR with a partition table starting from 0x1BE (446)).000001b0 20 55 53 42 2e 00 00 00 23 7b 6a 54 00 00 81 20 | USB....#{jT... |
000001c0 21 00 [b]07[/b] fe ff ff 00 08 00 00 ae 3f e1 0e 00 00 |!..........?....|
000001c0 21 00 07 fe ff ff [b]00 08 00 00 ae 3f e1 0e[/b] 00 00
# dd if=/dev/da1 of=org.mbr bs=446 count=1
# dd of=/dev/da1 if=standard.mbr bs=446 count=1
Code:# dd if=/dev/da1 of=org.mbr bs=446 count=1 # dd of=/dev/da1 if=standard.mbr bs=446 count=1
dd: /dev/da1: Invalid argument
That's very strange!dd: /dev/da1: Invalid argument
dd
...OK,dd: /dev/da1: Invalid argument
dd
doesn't like bs=446, since the actual block size of the device is 512 (however, that's not a problem in Linux).000001B0 20 55 53 42 2E 00 00 00 [b]FF 04 35 00[/b] // your flash drive
000001B0 20 55 53 42 2E 00 00 00 [b]23 7B 6A 54[/b] // MS installer
# dd if=/dev/da1 of=org.mbr bs=512 count=1
$ cp org.mbr org.mbr.backup
$ hexedit mbr.org # change those 4 bytes
# dd of=/dev/da1 if=org.mbr bs=512 count=1
$ file -s /dev/da1
/dev/da1: DOS/MBR boot sector; partition 1 : ID=0x7, active 0x81, start-CHS (0x0,32,33), end-CHS (0x3ff,254,63), startsector 2048, 249642926 sectors
OK,dd
doesn't like bs=446, since the actual block size of the device is 512 (however, that's not a problem in Linux).
I've compared your MBR with one from the MS Windows 7 installer, the only difference is the following 4 bytes:You can do the following:Code:000001B0 20 55 53 42 2E 00 00 00 FF 04 35 00 // your flash drive 000001B0 20 55 53 42 2E 00 00 00 23 7B 6A 54 // MS installer
and re-insert your flash drive.Code:# dd if=/dev/da1 of=org.mbr bs=512 count=1 $ cp org.mbr org.mbr.backup $ hexedit mbr.org # change those 4 bytes # dd of=/dev/da1 if=org.mbr bs=512 count=1
You'll need editors/hexedit or any hex editor to replace those 4 bytes.
By the way, even with the current MBR file(1) shows the correct info, you can try:Code:$ file -s /dev/da1 /dev/da1: DOS/MBR boot sector; partition 1 : ID=0x7, active 0x81, start-CHS (0x0,32,33), end-CHS (0x3ff,254,63), startsector 2048, 249642926 sectors
gpart show
ie. no sign of da0, but it does show up under camcontrol devlist
as well as dmesg
. file -s /dev/da1
shows:-/dev/da1: DOS/MBR boot sector; partition 1 : ID=0x7, active 0x81, start-CHS (0x0,32,33), end-CHS (0x7e,254,63), startsector 2048, 2044928 sectors
dd
is slightly different, but I'll change the four bytes you mentioned and see what happens... Should I then expect the drive to show up under part show
?