Hello,
I need to partition SD cards from a shell script using sfdisk, but don't know how to to that in a safe way.
No matter what the size of the SD card is, I would like to create a 128MB SWAP partition at the END of the card (i.e. as the second partition /dev/mmcda2) and the remaining space at the beginning (/dev/mmcda1) needs to be linux ext2.
I have used something like
sfdisk /dev/mmcda -uM << EOF
,128,S,
,,L,*
;
EOF
in order to achieve the opposite, i.e. 128MB swap as partition 1 and Linux ext2 as parition 2.
Any idea how to use sfdisk to achieve what I really need?
Thanks a lot!
Daniel