I have been trying to partition this SSD (Samsung 840) nicely for a while now. I want to make sure the pages line up with the SSD pages to limit the amount of writes. I found this site which recommends using 224 heads and 56 sectors.
I already have an sfdisk dump that I want to replicate, but move the starting partition up a bit (I think). It's measured in sectors and I am getting quite confused moving between sectors, heads, cylinders and everything (my mate gave me the 2048 starting number):
# partition table of /dev/sdb unit: sectors /dev/sdb1 : start= 2048, size= 995329, Id=83, bootable /dev/sdb2 : start= 997377, size= 10242047, Id=83 /dev/sdb3 : start= 11239424, size= 24611328, Id=83 /dev/sdb4 : start= 35850752, size= 67223296, Id= 5 /dev/sdb5 : start= 35850808, size= 10235848, Id=83 /dev/sdb6 : start= 46086712, size= 56987336, Id=83
So I've been throwing that layout at the disk using
sudo sfdisk -H224 -S56 /dev/sdb < sfdisk.dump. But in the aforementioned link the guy says that he makes sure his partition starts on cylinder 2 to ensure it's on a cylinder boundary.
I tried to check my starting cylinder and it is on 0 :(
$ sudo sfdisk -l -uC /dev/sdb Disk /dev/sdb: 18689 cylinders, 224 heads, 56 sectors/track Units = cylinders of 6422528 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 * 0+ 79- 80- 497664+ 83 Linux /dev/sdb2 79+ 895 817- 5121023+ 83 Linux /dev/sdb3 896 2857 1962 12305664 83 Linux /dev/sdb4 2858 8216 5359 33611648 5 Extended /dev/sdb5 2858+ 3673 816- 5117924 83 Linux /dev/sdb6 3674+ 8216 4543- 28493668 83 Linux
I also want to resize some of the partitions but converting between cylinders, heads, sectors and megabytes seems inconsistent and is doing my head in. I've done a load of googling but still cannot make sense of how to construct the partitions or calculate the geometries.
I also tried the other way to configure sfdisk:
echo "2,512,83,* ,5000,83 ,10000,83 ,,5 ,6000,83 ,6000,83 "|sudo sfdisk -uM -H224 -S56 /dev/sdb
And tried upping the megabytes for - and checking the - starting cylinder position but can only get to 6 megabytes before it has a shitfit (
Warning: given size (5005) exceeds max allowable size (6)) and I'm still on cylinder zero.
Disk geometry man! How does it work!?
Is there an easier way? Does anyone have any formulas for calculating between the geometry types? Anyone know a good tutorial to link me to? Has anyone done this before for their SSD?