View Single Post
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#49
Hi Jim

I understood you - the wiki page you followed is using a 2GB card and the figures it proposes for the partitions will create a 0.5GB FAT partition #1 (15000 cylinders * 32768 per cylinder is roughly 468MB), and all of the remaining space (~1.5GB) is allocated to partition #2, which is where the cloned OS resides. Essentially, the wiki page partition sizes are overkill as I don't think anyone really needs more than 0.5GB for the cloned OS partition (IMHO), and the wiki page doesn't allow for any variance in card size.

If you follow my instructions above, you should be able to calculate the correct figures to enter into sfdisk and create more appropriately sized partitions for your needs.

By far the easiest way to create the partitions will be to specify the partition size in MB, and assuming you only want one large FAT partition and the remaining space to be used for the cloned OS I would suggest you use one of the following examples as input to sfdisk (it should be fairly obvious how to adjust the figures to suit your tastes should you want a smaller OS partition - just increase the size of the first partition! ):

1GB Card (~0.8GB real size - partition 1: 0.3GB, partition 2: ~0.5GB):
Code:
#sfdisk /dev/mmcblk0 -uM

/dev/mmcblk0p1: 0,300,06
/dev/mmcblk0p2: ,,,
/dev/mmcblk0p3:
/dev/mmcblk0p4:
2GB Card (~1.8GB real size - partition 1: 1.3GB, partition 2: ~0.5GB):
Code:
#sfdisk /dev/mmcblk0 -uM

/dev/mmcblk0p1: 0,1300,06
/dev/mmcblk0p2: ,,,
/dev/mmcblk0p3:
/dev/mmcblk0p4:
4GB Card (~3.8GB real size - partition 1: 3.3GB, partition 2: ~0.5GB):
Code:
#sfdisk /dev/mmcblk0 -uM

/dev/mmcblk0p1: 0,3300,0C
/dev/mmcblk0p2: ,,,
/dev/mmcblk0p3:
/dev/mmcblk0p4:
8GB Card (~7.8GB real size - partition 1: 7.3GB, partition 2: ~0.5GB):
Code:
#sfdisk /dev/mmcblk0 -uM

/dev/mmcblk0p1: 0,7300,0C
/dev/mmcblk0p2: ,,,
/dev/mmcblk0p3:
/dev/mmcblk0p4:
Note that by specifying ",,," for the second partition, the second partition is created immediately following the previous first partition, uses all remaining space and defaults to the Linux partition type.
 

The Following 9 Users Say Thank You to Milhouse For This Useful Post: