Other OS

Resize SD Card Partitions

25 33646
Anyone know how we can increase the partition of the sd card, knowing you cannot use the option in expand_rootfs Raspi-config?

My Sd CARD:16go
you can use the gparted tool to resize sd card

I tried but I failed, can you give me the procedure please.

Reply 3# Spylei

I didn't do the work to expand the SD card. Did you insert your SD card to PC to use the gparted tool? I think you may google the solution through "how to expand the SD card  raspberry" or "how to resize the SD card  raspberry"

You must do it from within linux. Insert the SD card in your computer.  Open a terminal and run : sudo gparted /dev/mmcblk0

In the new window you can select the partition , use the sliders to increase or decrease the size. And when you are happy with the results, go to the menu : Edit -> Apply All operations.

Reply 5# Salvo

Thanks for Salvo

You must do it from within linux. Insert the SD card in your computer.  Open a terminal and run : su ...
Salvo Posted at 2014-5-30 01:09

I wished that had worked for me, but it fails.  Also tried Acronis Disk Director on Windows and it cannot see how the partition is formatted and won't allow for resize either.

This ended up working for me:

From the command line or a terminal window enter the following

sudo fdisk /dev/mmcblk0
then type p to list the partition table

you should see two partitions. if you look in the last column labeled System you should have


make a note of the start number for partiton 2, you will need this later. though it will likely still be on the screen (just in case).

next type d to delete a partition.

You will then be prompted for the number of the partition you want to delete. In the case above you want to delete both the Linux and Linux swap partitions.

So type 2

Now you can resize the main partition.

type n to create a new partition.

This new partition needs to be a primary partition so type p.

Next enter 2 when prompted for a partition number.

You will now be prompted for the first sector for the new partition. Enter the start number from the earlier step (the Linux partition)

Next you will be prompted for the last sector you can just hit enter to accept the default which will utilize the remaining disk space.

Type w to save the changes you have made.

Next reboot the system with the following command:

sudo reboot
once the system has reboot and you are back at the commandline enter the following command:

sudo resize2fs /dev/mmcblk0p2

Reply 8# Xaneth

Is this work well?? yes?

I have just extended the primary partition of a SD card from the Banana PI itself using Xaneth instructions and I can confirm it worked(Lubuntu 3.0).
When running fdisk, I had two partitions - both system. First one is small one, like 50-60MB.
The second one was about 3.6GB.

What I did in fdisk was:
1. Deleted the second partition
2. Created new partition - fdisk correctly suggested all values(partitioned number:2; start block, same as start block of the old partition).
3. Issued the w command to write it.

The board has booted up just fine after a reboot and after doing resize2fs I have ~15GB partition.

You have to log in before you can reply Login | Sign Up

Points Rules