1

I'm having a headless debian Raspberry PI which runs an Owncloud server.

The apt owncloud installation files used to be located here:

http://download.owncloud.org/download/repositories/stable/Debian_8.0/

so I created a file called owncloud.list in my /etc/apt/sources.list directory with this in it:

deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /

The corresponding key was installed in apt and everything worked fine.

Now owncloud has changed the location of the installation files to this:

http://download.owncloud.org/download/repositories/production/Debian_8.0/

and I have changed the contents of the owncloud.list to this:

deb http://download.owncloud.org/download/repositories/production/Debian_8.0/ /

and added the corresponding key to apt.

Everything again works fine, Owncloud gets updated, except when I boot the system. Then the old content of the owncloud.list file turns up again and the old key.

So I have to manually change the owncloud.list and import the new key again.

What is happening here?

I did follow the instructions mentioned below. The state of the system is just after a boot. Note the date of the owncloud.list file. I edited it 2 days ago following the instructions. So here we go:

root@RAPI2-V2:/etc/apt/sources.list.d# ls -l
total 8
-rw-r--r-- 1 root root  76 Apr 18  2016 owncloud.list
-rw-r--r-- 1 root root 193 Nov 21  2015 raspi.list
root@RAPI2-V2:/etc/apt/sources.list.d# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   2048R/90FDDD2E 2012-04-01
uid                  Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <mpthompson@gmail.com>
sub   2048R/5373DC6C 2012-04-01

pub   2048R/7FA3303E 2012-06-17
uid                  Raspberry Pi Archive Signing Key
sub   2048R/EDD83D6C 2012-06-17

pub   2048R/5180350A 2015-10-08 [expired: 2017-12-16]
uid                  ce OBS Project <ce@s2.owncloud.com>

pub   2048R/479BC94B 2013-08-26 [expired: 2018-08-25]
uid                  ownCloud build service <obsrun@localhost>

pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>

pub   4096R/2B90D010 2014-11-21 [expires: 2022-11-19]
uid                  Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>

root@RAPI2-V2:/etc/apt/sources.list.d# cat /etc/apt/sources.list && cat /etc/apt/sources.list.d/*
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://ftp.debian.org/debian jessie-backports main
deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui

An apt-get update errors:

root@RAPI2-V2:/etc/apt/sources.list.d# apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Get:1 http://ftp.debian.org jessie-backports InRelease [166 kB]
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://ftp.debian.org jessie-backports/main armhf Packages
Get:2 http://download.owncloud.org  InRelease [145 B]
Ign http://download.owncloud.org  InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Get:3 http://download.owncloud.org  Release.gpg [481 B]
Hit http://ftp.debian.org jessie-backports/main Translation-en
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Get:4 http://download.owncloud.org  Release [981 B]
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Err http://download.owncloud.org  Release

Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 168 kB in 15s (11.1 kB/s)
W: An error occurred during the signature verification. 

The repository is not updated and the previous index files will be used. GPG error: http://download.owncloud.org Release: The following signatures were invalid: KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163644 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163644

W: Failed to fetch http://download.owncloud.org/download/repositories/stable/Debian_8.0/Release

W: Some index files failed to download. They have been ignored, or old ones used instead.
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

I have tried the dpkg --configure -a but that does not work.

Now if I update the owncloud.list and add the key according to the instructions the error disapears:

root@RAPI2-V2:/etc/apt/sources.list.d# cat owncloud.list
deb http://download.owncloud.org/download/repositories/production/Debian_8.0/ /
root@RAPI2-V2:/etc/apt/sources.list.d# apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://ftp.debian.org jessie-backports InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://ftp.debian.org jessie-backports/main armhf Packages
Get:1 http://download.owncloud.org  InRelease [145 B]
Ign http://download.owncloud.org  InRelease
Get:2 http://download.owncloud.org  Release.gpg [481 B]
Hit http://ftp.debian.org jessie-backports/main Translation-en
Get:3 http://download.owncloud.org  Release [981 B]
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Get:4 http://download.owncloud.org  Packages [739 B]
Get:5 http://download.owncloud.org  Translation-en_GB [145 B]
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Get:6 http://download.owncloud.org  Translation-en [145 B]
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Get:7 http://download.owncloud.org  Translation-en_GB [145 B]
Get:8 http://download.owncloud.org  Translation-en [145 B]
Get:9 http://download.owncloud.org  Translation-en_GB [145 B]
Get:10 http://download.owncloud.org  Translation-en [145 B]
Get:11 http://download.owncloud.org  Translation-en_GB [145 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Get:12 http://download.owncloud.org  Translation-en [145 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Get:13 http://download.owncloud.org  Translation-en_GB [145 B]
Ign http://download.owncloud.org  Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Get:14 http://download.owncloud.org  Translation-en [145 B]
Ign http://download.owncloud.org  Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 2,201 B in 14s (146 B/s)
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

Running the dpkg --configure -a removes the last error and the apt-get update is errorfree.

This is the key contents after the update:

root@RAPI2-V2:/etc/apt/sources.list.d# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   2048R/90FDDD2E 2012-04-01
uid                  Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <mpthompson@gmail.com>


sub   2048R/5373DC6C 2012-04-01

pub   2048R/7FA3303E 2012-06-17
uid                  Raspberry Pi Archive Signing Key
sub   2048R/EDD83D6C 2012-06-17

pub   2048R/5180350A 2015-10-08 [expired: 2017-12-16]
uid                  ce OBS Project <ce@s2.owncloud.com>

pub   2048R/479BC94B 2013-08-26 [expires: 2023-08-23]
uid                  ownCloud build service <obsrun@localhost>
sub   2048R/8DE365D9 2013-08-26 [expires: 2023-08-23]
sub   2048D/86EB6027 2013-08-26 [expires: 2023-08-23]

pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>

pub   4096R/2B90D010 2014-11-21 [expires: 2022-11-19]
uid                  Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>

Now if I reboot. The owncloud.list file reverts to the old version and the new key is gone.

New update:

Did a reboot. When it came up I did:

remove key

add key

change owncloud.list

apt-get update

Got the Error:

E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

Ran a dpkg --configure -a then

apt-get update

No errors.

New reboot.

The owncloud.list file has reverted again

And now I discovered that the problem is not only related to apt/dpkg files the root home directory looked like this before the reboot:

root@RAPI2-V2:/etc/apt/sources.list.d# ls -ltr ~
total 3376
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Videos
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Templates
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Public
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Pictures
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Music
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Downloads
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Documents
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Desktop
-rw-r--r-- 1 root     root      355681 Dec 15  2015 installed.txt
-rw-r--r-- 1 root     root       36430 Jan 27  2016 installed-programs.txt
-rwxr-xr-x 1 root     root       24994 Mar  4  2016 speedtest-cli
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.2
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.1
-rw-r--r-- 1 root     root      509192 Mar 24  2016 contacts.tar.gz
-rw-r--r-- 1 root     root      185921 Apr 14  2016 packages.txt
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages2.txt
-rwxr-xr-- 1 root     root         105 Apr 14  2016 disable-updatechecker.config.php
-rw-r--r-- 1 www-data www-data      20 Apr 14  2016 phpinfo.php
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages3.txt
-rw-r--r-- 1 root     root      253800 Apr 16  2016 speetest-servers.txt
-rw-r--r-- 1 root     root      179471 Apr 16  2016 packages4.txt
-rw-r--r-- 1 root     root     1193779 Apr 17  2016 calendar.tar.gz
-rw-r--r-- 1 root     root       68857 Apr 19  2016 owncloud.tar.gz
-rw-r--r-- 1 root     root      185696 Nov 20  2017 inst.txt
-rwxr-xr-x 1 root     root         175 May 21  2018 Backup-to-TorFtp.cmd
-rw-r--r-- 1 root     root        4485 Sep 18 11:39 Release-new.key

Note that I have deleted the Release.key file. I downloaded it to the Release-new.key file. Now after the reboot the home directory looks like this:

root@RAPI2-V2:~# ls -ltr ~
total 3372
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Videos
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Templates
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Public
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Pictures
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Music
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Downloads
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Documents
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Desktop
-rw-r--r-- 1 root     root      355681 Dec 15  2015 installed.txt
-rw-r--r-- 1 root     root       36430 Jan 27  2016 installed-programs.txt
-rwxr-xr-x 1 root     root       24994 Mar  4  2016 speedtest-cli
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.2
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.1
-rw-r--r-- 1 root     root      509192 Mar 24  2016 contacts.tar.gz
-rw-r--r-- 1 root     root        1358 Apr  7  2016 Release.key
-rw-r--r-- 1 root     root      185921 Apr 14  2016 packages.txt
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages2.txt
-rwxr-xr-- 1 root     root         105 Apr 14  2016 disable-updatechecker.config.php
-rw-r--r-- 1 www-data www-data      20 Apr 14  2016 phpinfo.php
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages3.txt
-rw-r--r-- 1 root     root      253800 Apr 16  2016 speetest-servers.txt
-rw-r--r-- 1 root     root      179471 Apr 16  2016 packages4.txt
-rw-r--r-- 1 root     root     1193779 Apr 17  2016 calendar.tar.gz
-rw-r--r-- 1 root     root       68857 Apr 19  2016 owncloud.tar.gz
-rw-r--r-- 1 root     root      185696 Nov 20  2017 inst.txt
-rwxr-xr-x 1 root     root         175 May 21  2018 Backup-to-TorFtp.cmd

Now the Release-new.key has gone and the Release.key file has reapered.

What on earth is going on? It seems like the SD-card is not updated, but how can that happen without any errors in syslog or kern.log? Every time it boots it also think that it is the 17 sep. The only suspicious message:

Sep 17 19:17:09 RAPI2-V2 kernel: [    5.785232] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Sep 17 19:17:09 RAPI2-V2 kernel: [    8.230865]  sda: sda1

I have run fsck. No complaints.

  • 1
    Did you follow these instructions ? ... If so, when you reboot and have a problem what is the output of apt-key list and cat /etc/apt/sources.list && cat /etc/apt/sources.list.d/* – RubberStamp Nov 20 '18 at 13:54
  • The state of the system is just after a reboot: – Thomas D Nov 20 '18 at 15:30
  • Your comment is not helpful... posting the actual output of the commands I listed above may be quite helpful to solving your problem. – RubberStamp Nov 20 '18 at 15:50
  • I updated the question. – Thomas D Nov 20 '18 at 16:18
  • OK... what happens if you delete the old Owncloud public key and then add the new one ... before any other operations? ... The following command should do that: apt-key del 47AE7F72479BC94B && curl -s https://download.owncloud.org/download/repositories/production/Debian_8.0/Release.key |apt-key add - – RubberStamp Nov 20 '18 at 17:22
0

The problem is not apt/dpkg related it is about I/O not written to the SD-card. Without any error messages. Apparently the SD-card reports successfull I/O status even when nothing has been written to the card. I will raise an issue on the RaPi forum.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.