diracsbracket
Posts: 13
Joined: Thu Jun 25, 2015 3:07 pm

No space left inside chroot of mounted Raspbian image

Thu Feb 07, 2019 1:10 pm

Hi
I am trying to setup a cross-compiling environment for the Pi3 on a Debian 9.5 build host.

After mounting the filesystem partition of the original Rasbian image and chroot-ing to it,
I tried to install some packages, but after a while, I got

Code: Select all

E: You don't have enough free space in /var/cache/apt/archives
/

So after unmounting it, I expanded the 1.8GB image to about 15GB:

Code: Select all

[email protected]:~/raspi$ sudo fdisk -l 2018-11-13-raspbian-stretch-lite.img
Disk 2018-11-13-raspbian-stretch-lite.img: 14.8 GiB, 15825108992 bytes, 30908416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf580c2b5

Device                                Boot Start      End  Sectors  Size Id Type
2018-11-13-raspbian-stretch-lite.img1       8192    98045    89854 43.9M  c W95 FAT32 (LBA)
2018-11-13-raspbian-stretch-lite.img2      98304 30859375 30761072 14.7G 83 Linux


Yet, I still get 'No space left on device' errors.

Is there anything else to do when expanding the filesystem on a mounted image partition?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5713
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: No space left inside chroot of mounted Raspbian image

Thu Feb 07, 2019 1:16 pm

You'll need to run resize2fs on the partition as well.

diracsbracket
Posts: 13
Joined: Thu Jun 25, 2015 3:07 pm

Re: No space left inside chroot of mounted Raspbian image

Thu Feb 07, 2019 2:04 pm

Ha... that was it.
Thank you!

Return to “Beginners”