1

I'm new to Raspberry Pi.

The 8 GB SD card that came with my RPi 3 type B showed only 500 MB free, probably due to the pre-installed Mathematica (thanks WRI!).
So I moved the card image to a 32 GB SD card using Win32 Disk Imager. I decided to use fdisk to expand the root partition to the card's extents:

$ sudo fdisk /dev/mmcblk0

where I removed the root partition, re-created it with the same start sector, but using the default end sector, which is the last sector on the card. Concluded with w to save everything. When after rebooting I went to fdisk again it now shows a 29.7 GB partition, which seems correct, but File Manager PCManFM reports:

Free space: 541 MiB (Total: 7.2 GiB)

Did I miss anything? How can I fix the numbers File Manager is reporting (assuming they are wrong)?

stevenvh
  • 111
  • 4

1 Answers1

0

OK, so I forgot to let the partition manager pass the changes to the file manager.

sudo resize2fs /dev/mmcblk0p2

and everything is peachy.

stevenvh
  • 111
  • 4
  • This finishes the process because it is the last step, but it is not because you "forgot to let the partition manager pass the changes to the file manager"! You should read this. The reason you had the problem is because of the difference between a partition and a filesystem. One usually contains the other but they are not the same thing. So you had a ~30 GB partition with an 8 GB filesystem in it (hence resize2fs -- the "fs" is for filesystem; this is not a "partition manager" ...see also man resize2fs). – goldilocks Dec 28 '16 at 13:30
  • @goldilocks - Well, the file system gets updated from the partition system, doesn't it? Anyway, thanks for the clarification. – stevenvh Dec 28 '16 at 13:45
  • The point is no the filesystem does not get updated from the partition system (BTW calling the last one a "system" may add to the confusion; it's true in the sense that you can all anything a system -- "Let's get into the car system" -- but who does that?). There are tools that will do both things at once for you (e.g., presumably most fancy Windows/OSX based things), which is probably why people conflate the two. – goldilocks Dec 28 '16 at 13:49