partition 1(type:82 linux swap) is about 512MB
partition 4(type 83:linux) is about 1GB
i don't think D-Link firmware checks the size,
it just check the existence based on the admin data in partition 4
here's a command sequence on how to resize partition 1 and 2 while leaving 4 alone
fdisk -u /dev/sdb
The number of cylinders for this disk is set to 243201.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 63 1060289 530113+ 82 Linux swap / Solaris
/dev/sdb2 3164805 3907024064 1951929630 83 Linux
/dev/sdb4 1060290 3164804 1052257+ 83 Linux
Partition table entries are not in disk order
Command (m for help): d
Partition number (1-4): 1
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-3907029167, default 63): 64
Last sector, +sectors or +size{K,M,G} (64-1060289, default 1060289):
Using default value 1060289
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First sector (63-3907029167, default 63): 3164808
Last sector, +sectors or +size{K,M,G} (3164808-3907029167, default 3907029167):
Using default value 3907029167
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 82
Changed system type of partition 1 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 64 1060289 530113 82 Linux swap / Solaris
/dev/sdb2 3164808 3907029167 1951932180 83 Linux
/dev/sdb4 1060290 3164804 1052257+ 83 Linux
Partition table entries are not in disk order
Command (m for help): w