Lines 36-43
parted -m -s $dev u s p || fail=1
Link Here
|
36 |
|
36 |
|
37 |
# Write non-NUL bytes all over the MBR, so we're likely to see any change. |
37 |
# Write non-NUL bytes all over the MBR, so we're likely to see any change. |
38 |
# However, be careful to leave the type of the first partition, 0xEE, |
38 |
# However, be careful to leave the type of the first partition, 0xEE, |
39 |
# as well as the final two magic bytes. |
39 |
# as well as the final two magic bytes, 0x55 0xAA. |
40 |
printf '%0450d\xee%059d\x55\xaa' 0 0 | dd of=$dev count=1 conv=notrunc || fail=1 |
40 |
printf '%0450d\356%059d\125\252' 0 0 | dd of=$dev count=1 conv=notrunc || fail=1 |
41 |
|
41 |
|
42 |
dd if=$dev of=before count=1 || fail=1 |
42 |
dd if=$dev of=before count=1 || fail=1 |
43 |
|
43 |
|