On Linux Machine backup current data on Micro SD-Card before using fdisk. If SD-Card is located in /dev/sde use the following fdisk command:
fdisk /dev/sde
Replace /dev/sde by appropriate device name. df will help you to identify the device name and size of SD card. Use df to display all mounted storage devices:
sudo df
Depending on your demands or suggestions in manual, create the number of partitions you need
The following in the ratio 3 to 1 (e.g. 4000000 blocks):
256/2048 * 12000 = 1500 Blocks needed for Swap with size 256MB
400000
Use fdisk to create partitions:
sudo fdisk /dev/sde
After fdisk operations, format both partitions. If SD-Card is located in /dev/sde use the following commands (replace /dev/sde by appropriate device name):
# mkfs.vfat -v -n and-media -F 32 /dev/sde1 # mkfs.ext3 -v -L and-data /dev/sde2
If you are not root you add sudo in front of the command.
Disk names are useful to distinguish between the partitions from your linux desktop computer especially for storing installation images, files and folders on the correct partition (e.g. two Android partitions for media and data).
If you need a swap partition use partition type 82 for Linux Linux partition in fdisk.
-> t -> 2 -> 82 Set type 82 for Linux partition in fdisk
where 2 is the number of the swap partition (replace 2 with the appropriate partition number).