Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

How do I expand my filesystem? I have Ubuntu MATE on a Raspberry Pi 2

Writer Matthew Barrera

I have Ubuntu MATE on my 32gb micro SD card using a Raspberry Pi 2. I really need to know how to expand my file system. I looked it up, but all I got was an error (value out of range). I will list what read in the terminal at the bottom. I really would like to have more than 6mb on my system. Lol.

Terminal:

michael@SilverPi2:~$ sudo fdisk /dev/mmcblk0
[sudo] password for michael:
Welcome to fdisk (util-linux 2.26.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (133120-62521343, default 133120): w
Value out of range.
First sector (133120-62521343, default 133120): 
1

1 Answer

First of all: Backup your data if you didn't do it yet. If gparted is installed on your Raspberry pi I would recommend you using gparted. It's graphic design is easier to use if you are not used to fdisk.

If you want to do it with fdisk: In order to create a partition you have to set the physical borders for the partition.

First sector (133120-62521343, default 133120): w

Value out of range

Hit enter instead of w and hit enter once again when the program asks you for the last sector. Then you can write the partition table with w.

Explanation: The program asked you for the physical beginning of the partition. You entered wbecause you wanted to write the partition table but fdisk asked for a value. First you have to enter the size of your partition. The program tries to help you by printing the range of unused blocks: 133120 to 62521343. You have to use a block in this range as a physical beginning of the partition.

The program recommends you to use the block that follows to the last block of your first partition in order to use your hard drive space effectively. If you hit enter the program will use this block by default. For the last block it will recommend you the last free block on your hard drive. After doing that all space that was left on your hard drive will be one partition.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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