Can't create SD Card image
Posted: Wed Aug 16, 2023 11:29 am
I'm currently trying to create an SD Card image in Linux, using fdisk and mkfs.vfat.
I have something that mounts and looks identical to the image from the x16emu package, but when listing the content with DOS"$" in r43 I either get garbled data or the emulator prints an error along with garbled data.
My approach for creating the image is to make an empty file of zeros, 100MB using
I then open the file in fdisk and create a DOS MBR partition table with the "o" option.
Then I create a primary partition at 2048 sectors using "n" then "p" and the default values.
Then I change the type to Fat32 using "t" and then "c" and "w" to write the changes to the file.
Then I run:
I can now mount the image and "fdisk -l" shows the exact same info as the image from x16emu, yet it can't list the files and folder I copy onto the image in x16emu.
Can anyone spot anything I'm doing wrong?
I have something that mounts and looks identical to the image from the x16emu package, but when listing the content with DOS"$" in r43 I either get garbled data or the emulator prints an error along with garbled data.
My approach for creating the image is to make an empty file of zeros, 100MB using
Code: Select all
dd if=/dev/zero of=test.img count=100 bs=1M
Then I create a primary partition at 2048 sectors using "n" then "p" and the default values.
Then I change the type to Fat32 using "t" and then "c" and "w" to write the changes to the file.
Then I run:
Code: Select all
mkfs.vfat --mbr=y --offset 2048 test.img
Can anyone spot anything I'm doing wrong?