Some crazy thing is happening with fdisk, or I should learn a bit more about it. I can create the same sized partition, with 3 different result.
I have a 16 Gb USB stick, with these parameters:
Code:
Disk /dev/sdb: 16 GB, 16047521280 bytes
255 heads, 63 sectors/track, 1951 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
I deleted all partition and then created one, from cylinder:0 to cyl:382 (about the size of 3 Gb).
First try:
Then created a new partition from cyl:383 to cyl:512.
This has resulted the warning message:
Code:
Device Boot Start End Blocks Id System
/dev/sdb1 1 382 3068383 83 Linux
/dev/sdb2 383 513 1044225 83 Linux
Warning: Partition 2 does not end on cylinder boundary.
Notice that I started the 2nd partition at the first's end+1. The important factor is that I manually entered the parameter to 'fdisk'.
Second try:
Deleted the 2nd partition.
Then created a new one from fdisk's default offer (it was cyl:382) to cyl:512. The difference here that I didn't enter any data, simply pressed Enter on the empty field (at the starting cylinder)
Result? Everything is fine:
Code:
Device Boot Start End Blocks Id System
/dev/sdb1 1 382 3068383 83 Linux
/dev/sdb2 383 512 1036192 83 Linux
...it is strange that fdisk suggested '382' what I accepted, but the 2nd partition still starts from cyl:383 which caused Warning, when entered manually.
Third try (the most interesting):
Deleted the 2nd partition.
Then created a new one. Fdisk suggested cyl:382, but I didn't hit Enter this time, but manually entered "382". The result is:
Code:
Command (m for help): n
Partition
type
e extended
p primary partition (1-4)
p
First cylinder (default 382cyl):382
Last cylinder or +size or +sizeMB or +sizeKB (default 1950cyl): 511
Warning: You requested a partition from 382cyl to 511cyl.
The closest location we can manage is 382cyl to 510cyl. Is this still acceptable to you?
y Yes
n No