8

I have a 4 GB SD card with only two partitions

/boot ~50 Mb
/ (root) ~3900 Mb ext4

and I need to shrink the root partition to about 3 GB to use the following schema

/boot ~50 Mb
/ (root) ~3000 Mb ext4
/var ~900 Mb ext4

Then I want to mount / read only and /var/ read-write.

I'm no expert in using parted or modifying /etc/fstab I'm looking for some directions on how to resize the partitions and add the correct entries. I'm running Raspbian wheezy, already backupped everything with dd on my macbook laptop.
Thank you.

edit: I forgot I have no GUI running on the Pi

Alessandro Da Rugna
  • 1,176
  • 3
  • 12
  • 17

1 Answers1

2

it's very unlikely you'll be able to resize the partition using RasPi without any other linux-running computer. basically you have to issue:

resize2fs /dev/sdX1 900M

however, your volume should not be mounted at that moment, and there are plenty of other details you may check in this tutorial

also, i'd recommend to get another SD card and create the necessary partitions there, with the data migration afterwards, because it's very easy to damage the original during the process.

lenik
  • 11,503
  • 1
  • 29
  • 37