Piaware-config no space left on device


#1

When trying to set Configuration i end up with the following errors:


pi@piaware:~$ piaware-config wireless-ssid Manifest
Set wireless-ssid to Manifest in /boot/piaware-config.txt:56
could not write new config files: cat: write error: No space left on device
child process 11127 exited with status 1
pi@piaware:~$ sudo piaware-config wireless-ssid Manifest
Set wireless-ssid to Manifest in /boot/piaware-config.txt:56
could not write new config files: error flushing "file5": no space left on device
pi@piaware:~$

It seems that my /boot/ is full


pi@piaware:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             10M     0   10M   0% /dev
tmpfs           185M  4.5M  181M   3% /run
/dev/mmcblk0p2   15G  1.5G   13G  11% /
tmpfs           463M  4.0K  463M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
tmpfs           463M   12K  463M   1% /tmp
/dev/mmcblk0p1  128M  128M     0 100% /boot
tmpfs            93M     0   93M   0% /run/user/1000

Is there any way to safely overcome this when I at the moment only have remote access?

Could I for instance delete initrd.img-4.9.0-2-rpi2.dpkg-bak?


pi@piaware:~$ ls -al /boot/
total 130476
drwxr-xr-x  4 root root    16384 Aug  1 19:22 .
drwxr-xr-x 21 root root     4096 Jul 31 05:41 ..
-rwxr-xr-x  1 root root    15656 Jun  5 05:57 bcm2708-rpi-0-w.dtb
-rwxr-xr-x  1 root root    15193 Jun  5 05:57 bcm2708-rpi-b.dtb
-rwxr-xr-x  1 root root    15452 Jun  5 05:57 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x  1 root root    14912 Jun  5 05:57 bcm2708-rpi-cm.dtb
-rwxr-xr-x  1 root root    16519 Jun  5 05:57 bcm2709-rpi-2-b.dtb
-rwxr-xr-x  1 root root    17632 Jun  5 05:57 bcm2710-rpi-3-b.dtb
-rwxr-xr-x  1 root root    16388 Jun  5 05:57 bcm2710-rpi-cm3.dtb
-rwxr-xr-x  1 root root    50268 Jun  5 05:58 bootcode.bin
-rwxr-xr-x  1 root root        0 Jul 31 05:41 cmdline.txt
-rwxr-xr-x  1 root root   132685 Sep 23  2016 config-4.4.0-1-rpi
-rwxr-xr-x  1 root root   132692 Sep 23  2016 config-4.4.0-1-rpi2
-rwxr-xr-x  1 root root   175626 Jul 31 05:40 config-4.9.0-2-rpi
-rwxr-xr-x  1 root root   193019 Jul 31 05:41 config-4.9.0-2-rpi2
-rwxr-xr-x  1 root root      556 May 22 05:43 config.txt
-rwxr-xr-x  1 root root     2578 Jun  5 05:58 fixup_cd.dat
-rwxr-xr-x  1 root root     6660 Jun  5 05:58 fixup.dat
-rwxr-xr-x  1 root root     9799 Jun  5 05:58 fixup_db.dat
-rwxr-xr-x  1 root root     9795 Jun  5 05:58 fixup_x.dat
-rwxr-xr-x  1 root root     2048 Jan  1  1980 FSCK0000.REC
-rwxr-xr-x  1 root root 10410308 Jul 31 05:17 initrd.img-4.4.0-1-rpi
-rwxr-xr-x  1 root root 10494498 Jul 31 05:17 initrd.img-4.4.0-1-rpi2
-rwxr-xr-x  1 root root 19314730 Jul 31 05:41 initrd.img-4.9.0-2-rpi
-rwxr-xr-x  1 root root 20727035 Jul 31 05:41 initrd.img-4.9.0-2-rpi2
-rwxr-xr-x  1 root root 19927040 Aug  1 19:22 initrd.img-4.9.0-2-rpi2.dpkg-bak
-rwxr-xr-x  1 root root  4514168 Sep 23  2016 kernel7.img
-rwxr-xr-x  1 root root  4316272 Sep 23  2016 kernel.img
-rwxr-xr-x  1 root root     1494 Jun  5 05:58 LICENCE.broadcom
drwxr-xr-x  2 root root    10240 Jun  5 05:58 overlays
-rwxr-xr-x  1 root root     3766 Apr 27 16:31 piaware-config.txt
-rwxr-xr-x  1 root root     2534 Apr  3 17:29 piaware-config.txt.dpkg-dist
-rwxr-xr-x  1 root root   656868 Jun  5 05:57 start_cd.elf
-rwxr-xr-x  1 root root  4989092 Jun  5 05:57 start_db.elf
-rwxr-xr-x  1 root root  2851012 Jun  5 05:57 start.elf
-rwxr-xr-x  1 root root  3934596 Jun  5 05:57 start_x.elf
-rwxr-xr-x  1 root root  2115508 Sep 23  2016 System.map-4.4.0-1-rpi
-rwxr-xr-x  1 root root  2177376 Sep 23  2016 System.map-4.4.0-1-rpi2
-rwxr-xr-x  1 root root  2600314 Jul 31 05:40 System.map-4.9.0-2-rpi
-rwxr-xr-x  1 root root  3214969 Jul 31 05:41 System.map-4.9.0-2-rpi2
drwxr-xr-x  2 root root     2048 Jan  7  2017 System Volume Information
-rwxr-xr-x  1 root root  4316272 Sep 23  2016 vmlinuz-4.4.0-1-rpi
-rwxr-xr-x  1 root root  4514168 Sep 23  2016 vmlinuz-4.4.0-1-rpi2
-rwxr-xr-x  1 root root  5293628 Jul 31 05:40 vmlinuz-4.9.0-2-rpi
-rwxr-xr-x  1 root root  6329432 Jul 31 05:41 vmlinuz-4.9.0-2-rpi2


#2

Don’t know if helps, this is mine:


pi@raspberrypi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  4.2G  9.8G  31% /
devtmpfs        458M     0  458M   0% /dev
tmpfs           462M  4.0K  462M   1% /dev/shm
tmpfs           462M  9.2M  453M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           462M     0  462M   0% /sys/fs/cgroup
/dev/mmcblk0p1   42M   21M   21M  51% /boot
tmpfs            93M     0   93M   0% /run/user/1000


pi@raspberrypi:~ $ ls -al /boot/
total 21156
drwxr-xr-x  4 root root    2560 Dec 31  1969 .
drwxr-xr-x 22 root root    4096 Jul 30 20:58 ..
-rwxr-xr-x  1 root root   15660 May 15 15:09 bcm2708-rpi-0-w.dtb
-rwxr-xr-x  1 root root   15197 May 15 15:09 bcm2708-rpi-b.dtb
-rwxr-xr-x  1 root root   15456 May 15 15:09 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x  1 root root   14916 May 15 15:09 bcm2708-rpi-cm.dtb
-rwxr-xr-x  1 root root   16523 May 15 15:09 bcm2709-rpi-2-b.dtb
-rwxr-xr-x  1 root root   17624 May 15 15:09 bcm2710-rpi-3-b.dtb
-rwxr-xr-x  1 root root   16380 May 15 15:09 bcm2710-rpi-cm3.dtb
-rwxr-xr-x  1 root root   50248 Jul  3 06:07 bootcode.bin
-rwxr-xr-x  1 root root     142 Jul 30 20:47 cmdline.txt
-rwxr-xr-x  1 root root    1590 Jul  5 06:53 config.txt
-rwxr-xr-x  1 root root   18693 Aug 21  2015 COPYING.linux
-rwxr-xr-x  1 root root    2583 Jul  3 10:07 fixup_cd.dat
-rwxr-xr-x  1 root root    6674 Jul  3 10:07 fixup.dat
-rwxr-xr-x  1 root root    9813 Jul  3 10:07 fixup_db.dat
-rwxr-xr-x  1 root root    9813 Jul  3 10:07 fixup_x.dat
-rwxr-xr-x  1 root root     145 Jul  5 08:01 issue.txt
-rwxr-xr-x  1 root root 4579248 Jul  3 06:07 kernel7.img
-rwxr-xr-x  1 root root 4379032 Jul  3 06:07 kernel.img
-rwxr-xr-x  1 root root    1494 Nov 18  2015 LICENCE.broadcom
-rwxr-xr-x  1 root root   18974 Jul  5 08:01 LICENSE.oracle
drwxr-xr-x  2 root root   10240 Jul  5 06:40 overlays
-rwxr-xr-x  1 root root  659492 Jul  3 10:07 start_cd.elf
-rwxr-xr-x  1 root root 4993604 Jul  3 10:07 start_db.elf
-rwxr-xr-x  1 root root 2855556 Jul  3 10:07 start.elf
-rwxr-xr-x  1 root root 3939492 Jul  3 10:07 start_x.elf
drwxr-xr-x  2 root root     512 Jul 30 16:35 System Volume Information



#3

sudo raspi-config

Advance options >> Expand file system >> Reboot


#4

That doesn’t expand mmcblk0p1. Isn’t that the VFAT partition?


pi@raspberrypi:~ $ df -T
Filesystem     Type     1K-blocks    Used Available Use% Mounted on
/dev/root      ext4      15284364 4389312  10213308  31% /
devtmpfs       devtmpfs    468148       0    468148   0% /dev
tmpfs          tmpfs       472756       4    472752   1% /dev/shm
tmpfs          tmpfs       472756    9512    463244   3% /run
tmpfs          tmpfs         5120       4      5116   1% /run/lock
tmpfs          tmpfs       472756       0    472756   0% /sys/fs/cgroup
/dev/mmcblk0p1 vfat         42030   21419     20611  51% /boot
tmpfs          tmpfs        94552       0     94552   0% /run/user/1000


I would take out the SD card, move the files that don’t exist in my BOOT somewhere else (HDD) and then boot up again without them. If it starts, then they can be deleted.


#5

Yes. It is the VFAT partition:


pi@piaware:~$ df -T
Filesystem     Type     1K-blocks    Used Available Use% Mounted on
udev           devtmpfs     10240       0     10240   0% /dev
tmpfs          tmpfs       189420    4556    184864   3% /run
/dev/mmcblk0p2 ext4      15313784 1510720  13150136  11% /
tmpfs          tmpfs       473544       4    473540   1% /dev/shm
tmpfs          tmpfs         5120       0      5120   0% /run/lock
tmpfs          tmpfs       473544       0    473544   0% /sys/fs/cgroup
tmpfs          tmpfs       473544      12    473532   1% /tmp
/dev/mmcblk0p1 vfat        130798  130798         0 100% /boot
tmpfs          tmpfs        94712       0     94712   0% /run/user/100

My issue is I only have remote access at the moment.
And probably will only have for the next months/half year, (I recently left it at the skydiving club we go to about 4 times a year).


#6

I figured it out.

Running these commands:


sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

resulted in “apt-get autoremove cp: failed to extend /boot: No space left on device”

I removed unused kernels with this command:


sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

More information:
whenever i use sudo apt-get remove/install, reply is Error
How do I free up more space in /boot?
HowTo: Linux Maintenance and Filesystem Hygiene


#7

Thanks for posting back, who knows when I will need it :smiley:


#8

If you installed a full Jessie OS, you may want to remove all the junk (GUI and others). See:
https://www.reddit.com/r/raspberry_pi/comments/3n2gee/guide_removing_desktop_to_run_headless_raspbian/
It will free up a huge amount of space. It will become a Jessie Lite install.


#9

I like my junk on my 16GB microSD card that I had laying around :slight_smile: Never know when you need the graphical interface.
Anyway the OP was having issues with the boot VFAT partition, different animal.


#10

Did you try to update the kernel on an version of PiAware prior to 3.5? (sudo apt-get upgrade) Those images don’t have enough space on /boot to do that.
There was a post a little while about from OBJ about this, but many of us fell into this hole anyway. Not mentioning any names, but I see him each morning when i look in the mirror. :smiley:

Cleanest solution is to start anew with the 3.5 image, although if you are a Linux guru you could move the partitions around and expand /boot.


#11

to avoid running out of space what I do after expanding the image on SD, I mount the SD to a linux system or linux VM
and using gparted I resize the partitions. usually I give ~512mb to the boot (fat32) partition. not sure what is max for fat though
but must be < 512mb.
just an idea.


#12

Hi again

I have more of the same issue again. With a different device this time. It has been running for a while, and may have updated a version of PiAware prior to 3.5. Do you have a link for post a from OBJ about this @Jranderson777?

Issue:
apt install/purge tells me:
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f install -y tells me:
cannot copy extracted data for './boot/piaware-config.txt' to '/boot/piaware-config.txt.dpkg-new': failed to write (No space left on device)

Full output:
pi@piaware:~$ sudo apt-get -f install -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  piaware-support
The following packages will be upgraded:
  piaware-support
1 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
2 not fully installed or removed.
Need to get 0 B/20.2 kB of archives.
After this operation, 9,216 B of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 71099 files and directories currently installed.)
Preparing to unpack .../piaware-support_3.5.3_all.deb ...
Unpacking piaware-support (3.5.3) over (3.5.0) ...
dpkg: error processing archive /var/cache/apt/archives/piaware-support_3.5.3_all.deb (--unpack):
 cannot copy extracted data for './boot/piaware-config.txt' to '/boot/piaware-config.txt.dpkg-new': failed to write (No space left on device)
Errors were encountered while processing:
 /var/cache/apt/archives/piaware-support_3.5.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Cleanup:
Following me previous procedure (autoclean, clean & autoremove) results in more of the same:

Details here
pi@piaware:~$ sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
pi@piaware:~$ sudo apt-get clean
pi@piaware:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 piaware-release : Depends: piaware-support (= 3.5.3) but 3.5.0 is installed
E: Unmet dependencies. Try using -f.
pi@piaware:~$ sudo apt-get -f autoremove
#... output suppressed 
Preparing to unpack .../piaware-support_3.5.3_all.deb ...
Unpacking piaware-support (3.5.3) over (3.5.0) ...
dpkg: error processing archive /var/cache/apt/archives/piaware-support_3.5.3_all.deb (--unpack):
 cannot copy extracted data for './boot/piaware-config.txt' to '/boot/piaware-config.txt.dpkg-new': failed to write (No space left on device)
Errors were encountered while processing:
 /var/cache/apt/archives/piaware-support_3.5.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Removing unused kernels:
Sends me back to
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Details removing kernel
pi@piaware:~$ sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
dpkg-query: no packages found matching linux-headers-[0-9]*
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-image-rpi-rpfv : Depends: linux-image-4.9.0-2-rpi but it is not going to be installed
 linux-image-rpi2-rpfv : Depends: linux-image-4.9.0-2-rpi2 but it is not going to be installed
 piaware-release : Depends: piaware-support (= 3.5.3) but 3.5.0 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Report file system disk space usage:

df -T output:
pi@piaware:~$ df -T
Filesystem     Type     1K-blocks    Used Available Use% Mounted on
udev           devtmpfs     10240       0     10240   0% /dev
tmpfs          tmpfs       189420    4844    184576   3% /run
/dev/mmcblk0p2 ext4     122864676 2243376 115602188   2% /
tmpfs          tmpfs       473544       4    473540   1% /dev/shm
tmpfs          tmpfs         5120       0      5120   0% /run/lock
tmpfs          tmpfs       473544       0    473544   0% /sys/fs/cgroup
tmpfs          tmpfs       473544      12    473532   1% /tmp
/dev/mmcblk0p1 vfat        130798  130798         0 100% /boot
tmpfs          tmpfs        94712       0     94712   0% /run/user/1000

/boot/ files:

Summary
pi@piaware:~$ ls -al /boot/
total 130476
drwxr-xr-x  4 root root    16384 Nov 16 12:01 .
drwxr-xr-x 21 root root     4096 Nov 16 11:19 ..
-rwxr-xr-x  1 root root    15656 Jun  5 05:56 bcm2708-rpi-0-w.dtb
-rwxr-xr-x  1 root root    15193 Jun  5 05:56 bcm2708-rpi-b.dtb
-rwxr-xr-x  1 root root    15452 Jun  5 05:56 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x  1 root root    14912 Jun  5 05:56 bcm2708-rpi-cm.dtb
-rwxr-xr-x  1 root root    16519 Jun  5 05:57 bcm2709-rpi-2-b.dtb
-rwxr-xr-x  1 root root    17632 Jun  5 05:57 bcm2710-rpi-3-b.dtb
-rwxr-xr-x  1 root root    16388 Jun  5 05:57 bcm2710-rpi-cm3.dtb
-rwxr-xr-x  1 root root    50268 Jun  5 06:04 bootcode.bin
-rwxr-xr-x  1 root root      253 Feb 24  2017 cmdline.txt
-rwxr-xr-x  1 root root   132685 Sep 23  2016 config-4.4.0-1-rpi
-rwxr-xr-x  1 root root   132692 Sep 23  2016 config-4.4.0-1-rpi2
-rwxr-xr-x  1 root root   175626 Jun 12 05:33 config-4.9.0-2-rpi
-rwxr-xr-x  1 root root   193019 Jun 12 05:34 config-4.9.0-2-rpi2
-rwxr-xr-x  1 root root      556 Mar 20  2017 config.txt
-rwxr-xr-x  1 root root     2578 Jun  5 06:04 fixup_cd.dat
-rwxr-xr-x  1 root root     6660 Jun  5 06:04 fixup.dat
-rwxr-xr-x  1 root root     9799 Jun  5 06:04 fixup_db.dat
-rwxr-xr-x  1 root root     9795 Jun  5 06:04 fixup_x.dat
-rwxr-xr-x  1 root root 10436888 May 15  2017 initrd.img-4.4.0-1-rpi
-rwxr-xr-x  1 root root 10519906 May 15  2017 initrd.img-4.4.0-1-rpi2
-rwxr-xr-x  1 root root 19322891 Jun 12 05:34 initrd.img-4.9.0-2-rpi
-rwxr-xr-x  1 root root 20735796 Jun 12 05:35 initrd.img-4.9.0-2-rpi2
-rwxr-xr-x  1 root root 19861504 Nov 16 11:11 initrd.img-4.9.0-2-rpi2.dpkg-bak
-rwxr-xr-x  1 root root  4514168 Sep 23  2016 kernel7.img
-rwxr-xr-x  1 root root  4316272 Sep 23  2016 kernel.img
-rwxr-xr-x  1 root root     1494 Jun  5 06:04 LICENCE.broadcom
drwxr-xr-x  2 root root    10240 Jun  5 06:03 overlays
-rwxr-xr-x  1 root root      219 Jun 23 15:41 piaware-config.txt
-rwxr-xr-x  1 root root     2534 Jan 18  2017 piaware-config.txt.dpkg-dist
-rwxr-xr-x  1 root root        0 Nov 16 09:40 piaware-config.txt.new
-rwxr-xr-x  1 root root   656868 Jun  5 05:56 start_cd.elf
-rwxr-xr-x  1 root root  4989092 Jun  5 05:56 start_db.elf
-rwxr-xr-x  1 root root  2851012 Jun  5 05:56 start.elf
-rwxr-xr-x  1 root root  3934596 Jun  5 05:56 start_x.elf
-rwxr-xr-x  1 root root  2115508 Sep 23  2016 System.map-4.4.0-1-rpi
-rwxr-xr-x  1 root root  2177376 Sep 23  2016 System.map-4.4.0-1-rpi2
-rwxr-xr-x  1 root root  2600314 Jun 12 05:33 System.map-4.9.0-2-rpi
-rwxr-xr-x  1 root root  3214969 Jun 12 05:34 System.map-4.9.0-2-rpi2
drwxr-xr-x  2 root root     2048 Nov 22  2016 System Volume Information
-rwxr-xr-x  1 root root  4316272 Sep 23  2016 vmlinuz-4.4.0-1-rpi
-rwxr-xr-x  1 root root  4514168 Sep 23  2016 vmlinuz-4.4.0-1-rpi2
-rwxr-xr-x  1 root root  5293628 Jun 12 05:33 vmlinuz-4.9.0-2-rpi
-rwxr-xr-x  1 root root  6329432 Jun 12 05:34 vmlinuz-4.9.0-2-rpi2

Any advice is welcomed! :smiley:

This device is only a 15 minutes drive away so it’s not really the biggest of concerns if I bork it.