I want to change my partition table (using openWRT Linux OS) due to a new flash memory card - 1GB instead of 256MB.

For this, I've installed gdisk tool, and ran it using 'gdisk /dev/mmcblk0' command.

We can see that memory size is identified as 1GB -

Command (? for help): p
Disk /dev/mmcblk0: 1902592 sectors, 929.0 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 36D7FD70-2E07-43B1-91A9-98DC373314FD
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 462814
Partitions will be aligned on 256-sector boundaries
Total free space is 1469 sectors (734.5 KiB)

But from some reason, the new flash size if not expressed in the avaiable space - and I cannot use the full flash size.

Can someone please explain what is the procedure needed, in order to make 'gdisk' recalculate available memory in flash?

Thank you


The preferred method to handle this is to start a completely new partition table by typing -

Choose 'o'option
Verify with 'Y'

Afterwards - The new partition table will be created with the correct size and you can continue and create the new table


x = expert mode e = move backup data to new end of disk m = main menu

then delete / add partitions as you wish d,n,p

w = save

it's not about re-calculating, but about where the backup data exists, partitions can't exist past the location of the backup data, migrating the backup data allows partitions to use the space that currently can't be allocated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.