The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Sunday, January 17, 2016

Raspberry Pi - expanding root file system

I was playing with a Raspberry Pi 2 Model B for last couple of days. My OS installation notes are here, and after the OS I installed VNC, Samba and Apache HTTP Server. Once I finished these installations and configurations, I noticed the root file system was 98% full. I was using a 64 GB Micro SD card, but the root filesystem was created on a partition of 3.8 GB only. So I needed to expand the root file system.

I found the following tutorial quite useful, it has step-by-step instructions that worked great.

However, the "mkpart" resulted in an error:
Error: The maximum head value is 254.

In order to fix it, I had to reduce the value. Initially I was trying:

(parted) mkpart primary 6,127,57  1946,255,62

that resulted in the error. Error: The maximum head value is 254.

Then I tried reduce the head value to 254:

(parted) mkpart primary 6,127,57  1946,254,62

but still no luck.

But the following finally worked:

(parted) mkpart primary 6,127,57  1945,252,62

Rest of the tutorial worked as-is for me.

1 comment:

  1. Did you not try the raspi-config command to expand the file system?
    You could also use fstab to add partitions, format and mount them.