Antsle Forum

Welcome to our Antsle community! This forum is to connect all Antsle users to post experiences, make user-generated content available for the entire community and more. 

Please note: This forum is about discussing one specific issue at a time. No generalizations. No judgments. Please check the Forum Rules before posting. If you have specific questions about your Antsle and expect a response from our team directly, please continue to use the appropriate channels (email: [email protected]) so every inquiry is tracked. 

Please or Register to create posts and topics.

Upgrade fails with Raspbian LXC

Just received my new Nano and attempting to get up and working with the provided Raspbian LXC template.  I've given it 2 cores and 2GB RAM.  Upon performing a standard upgrade command, I'm seeing the following...

pi@PiHole:~ $ sudo apt update

Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease

Hit:2 http://archive.raspberrypi.org/debian buster InRelease

Reading package lists... Done

Building dependency tree       

Reading state information... Done

All packages are up to date.

pi@PiHole:~ $ sudo apt full-upgrade

Reading package lists... Done

Building dependency tree       

Reading state information... Done

Calculating upgrade... Done

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

Do you want to continue? [Y/n] Y

Setting up dphys-swapfile (20100506-5+rpt2) ...

Job for dphys-swapfile.service failed because the control process exited with error code.

See "systemctl status dphys-swapfile.service" and "journalctl -xe" for details.

invoke-rc.d: initscript dphys-swapfile, action "restart" failed.

dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file

   Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; enabled; vendor preset: enabled)

   Active: failed (Result: exit-code) since Fri 2021-04-02 00:57:27 EDT; 24ms ago

     Docs: man:dphys-swapfile(8)

  Process: 718 ExecStart=/sbin/dphys-swapfile setup (code=exited, status=0/SUCCESS)

  Process: 741 ExecStart=/sbin/dphys-swapfile swapon (code=exited, status=255/EXCEPTION)

Main PID: 741 (code=exited, status=255/EXCEPTION)

Apr 02 00:57:27 PiHole systemd[1]: Starting dphys-swapfile - set up, mount/unmount, and delete a swap file...

Apr 02 00:57:27 PiHole dphys-swapfile[718]: want /var/swap=100MByte, checking existing: keeping it

Apr 02 00:57:27 PiHole dphys-swapfile[741]: swapon: /var/swap: swapon failed: Invalid argument

Apr 02 00:57:27 PiHole systemd[1]: dphys-swapfile.service: Main process exited, code=exited, status=255/EXCEPTION

Apr 02 00:57:27 PiHole systemd[1]: dphys-swapfile.service: Failed with result 'exit-code'.

Apr 02 00:57:27 PiHole systemd[1]: Failed to start dphys-swapfile - set up, mount/unmount, and delete a swap file.

dpkg: error processing package dphys-swapfile (--configure):

installed dphys-swapfile package post-installation script subprocess returned error exit status 1

Errors were encountered while processing:

dphys-swapfile

E: Sub-process /usr/bin/dpkg returned an error code (1)

pi@PiHole:~ $

Any suggestions?

What is displayed when you enter:

systemctl status dphys-swapfile.service

root@PiHole:~# systemctl status dphys-swapfile.service

dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file

   Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; enabled; vendor preset: enabled)

   Active: failed (Result: exit-code) since Mon 2021-04-05 10:15:30 EDT; 20s ago

     Docs: man:dphys-swapfile(8)

  Process: 99 ExecStart=/sbin/dphys-swapfile setup (code=exited, status=0/SUCCESS)

  Process: 146 ExecStart=/sbin/dphys-swapfile swapon (code=exited, status=255/EXCEPTION)

Main PID: 146 (code=exited, status=255/EXCEPTION)

Apr 05 10:15:30 PiHole systemd[1]: Starting dphys-swapfile - set up, mount/unmount, and delete a swap file...

Apr 05 10:15:30 PiHole dphys-swapfile[99]: want /var/swap=100MByte, checking existing: keeping it

Apr 05 10:15:30 PiHole dphys-swapfile[146]: swapon: /var/swap: swapon failed: Invalid argument

Apr 05 10:15:30 PiHole systemd[1]: dphys-swapfile.service: Main process exited, code=exited, status=255/EXCEPTION

Apr 05 10:15:30 PiHole systemd[1]: dphys-swapfile.service: Failed with result 'exit-code'.

Apr 05 10:15:30 PiHole systemd[1]: Failed to start dphys-swapfile - set up, mount/unmount, and delete a swap file.

I've also tried disabling/re-enabling it temporarily.

FWIW, this is the same response I receive on ANY newly deployed Raspbian LXC.

root@raspberrypi:~# systemctl status dphys-swapfile.service

dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file

   Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; enabled; vendor preset: enabled)

   Active: failed (Result: exit-code) since Mon 2021-04-05 18:37:10 BST; 1min 43s ago

     Docs: man:dphys-swapfile(8)

  Process: 93 ExecStart=/sbin/dphys-swapfile setup (code=exited, status=0/SUCCESS)

  Process: 154 ExecStart=/sbin/dphys-swapfile swapon (code=exited, status=255/EXCEPTION)

Main PID: 154 (code=exited, status=255/EXCEPTION)

Apr 05 18:37:09 raspberrypi systemd[1]: Starting dphys-swapfile - set up, mount/unmount, and delete a swap file...

Apr 05 18:37:10 raspberrypi dphys-swapfile[93]: want /var/swap=100MByte, checking existing: keeping it

Apr 05 18:37:10 raspberrypi dphys-swapfile[154]: swapon: /var/swap: swapon failed: Invalid argument

Apr 05 18:37:10 raspberrypi systemd[1]: dphys-swapfile.service: Main process exited, code=exited, status=255/EXCEPTION

Apr 05 18:37:10 raspberrypi systemd[1]: dphys-swapfile.service: Failed with result 'exit-code'.

Apr 05 18:37:10 raspberrypi systemd[1]: Failed to start dphys-swapfile - set up, mount/unmount, and delete a swap file.

root@raspberrypi:~#