This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
size_in_mib=32 | |
bytes=$((2 ** 20 * $size_in_mib)) | |
sectors=$(($bytes / 512)) | |
heads=16 | |
cylinders=$(($sectors / $heads / 63)) | |
dd if=/dev/zero of=baremetal.img bs=512 count=$sectors | |
dd if=fat16mbr.bin of=baremetal.img conv=notrunc |
OlderNewer