RPi 2 Updating OSMC RC1 fails

I get errors on the repos for OSMC when trying to update:

sudo apt-get update
Get:1 http://ftp.debian.org jessie InRelease [128 kB]
Get:2 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:3 http://apt.osmc.tv jessie InRelease [2,871 B]
Err http://apt.osmc.tv jessie InRelease
Err http://security.debian.org jessie/updates InRelease
Get:4 http://ftp.debian.org jessie-updates InRelease [126 kB]
Err http://ftp.debian.org jessie InRelease
Err http://ftp.debian.org jessie-updates InRelease
Fetched 319 kB in 1s (204 kB/s)
Reading package lists… Error!
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.osmc.tv jessie InRelease: Could not execute ‘gpgv’ to verify signature (is gpgv installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.debian.org jessie/updates InRelease: Could not execute ‘gpgv’ to verify signature (is gpgv installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.debian.org jessie InRelease: Could not execute ‘gpgv’ to verify signature (is gpgv installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.debian.org jessie-updates InRelease: Could not execute ‘gpgv’ to verify signature (is gpgv installed?)
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie/InRelease
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/InRelease
W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease
W: Failed to fetch http://apt.osmc.tv/dists/jessie/InRelease
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Malformed Description-md5 line; includes invalid character ‘567e17f0373585if19cb6�8b7c5�80e9’
E: Malformed Description-md5 line; includes invalid character ‘a524&2?fe1a7bc6da70c1903b447187’
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/ftp.debian.org_debian_dists_jessie_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

osmc@osmc:~$ cat /etc/os-release
PRETTY_NAME=“Open Source Media Center”
NAME=“OSMC”
VERSION=“Release Candidate”
VERSION_ID=“0.9.9”
ID=osmc
ID_LIKE=debian

ANSI_COLOR=“1;31”
HOME_URL=“http://www.osmc.tv
SUPPORT_URL=“http://www.osmc.tv
BUG_REPORT_URL=“http://www.osmc.tv

Worked fine before on previous update!

Any advice appreciated. I have a number of remote pi’s and want to avoid having to re-install.

Cheers
Spart

Are you sure your Pi has a properly working internet connection ?

Is the command gpgv present at /usr/bin ?

osmc@rpi2:~$ whereis gpgv
gpgv: /usr/bin/gpgv
osmc@rpi2:~$ ls -al /usr/bin/gpgv
-rwxr-xr-x 1 root root 231648 Mar  2 19:42 /usr/bin/gpgv
osmc@rpi2:~$ dpkg -S /usr/bin/gpgv
gpgv: /usr/bin/gpgv
osmc@rpi2:~$ dpkg -l gpgv
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                              Version               Architecture          Description
+++-=================================-=====================-=====================-=======================================================================
ii  gpgv                              1.4.18-7              armhf                 GNU privacy guard - signature verification tool

From the error log you presented it seems either the Pi’s internet connection is not working, or somehow you are missing the gpgv package, which seems very unusual.

Have you manually installed or uninstalled any packages using apt-get ?

DBMandrake,

Thanks for replying. This is my test pi 2 that mirrors all the other pi’s I have. I use this to test updates before committing to update the ‘live’ pi’s. It has only had the RC1 build and then been updated once using apt-get update then apt-get upgrade which worked fine last time about 2 weeks ago. Since then not used. Only turned on today to update to the latest RC2 and test.

osmc@osmc:~$ whereis gpgv
gpgv: /usr/bin/gpgv
osmc@osmc:~$
osmc@osmc:~$ ls -al /usr/bin/gpgv
-rwxr-xr-x 1 root root 231648 Mar 2 19:42 /usr/bin/gpgv
osmc@osmc:~$ dpkg -l gpgv
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±=====================-===============-===============-===============================================
ii gpgv 1.4.18-7 armhf GNU privacy guard - signature verification tool
osmc@osmc:~$
osmc@osmc:~$ ping bbc.co.uk
PING bbc.co.uk (212.58.244.18): 56 data bytes
64 bytes from 212.58.244.18: seq=0 ttl=53 time=31.506 ms
64 bytes from 212.58.244.18: seq=1 ttl=53 time=32.445 ms
64 bytes from 212.58.244.18: seq=2 ttl=53 time=28.289 ms
^C
bbc.co.uk ping statistics —
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 28.289/30.746/32.445 ms

Cheers
Spart

You should always be using apt-get update then apt-get dist-upgrade not apt-get upgrade. Upgrade will only upgrade already installed packages, while dist-upgrade will also install new packages based on updated dependencies of existing packages.

This is important because we sometimes change dependencies or add new dependencies to our packages that cause other packages (typically debian ones) to be installed - if you don’t dist-upgrade those new packages won’t get installed which means things that rely on them may break.

Not necessarily the cause of the problem in this instance but worth checking anyway.

It looks like you do have gpgv installed, (it would have been very strange if you didn’t) which points back at the network connection. I see you can ping bbc.co.uk, but can you try using wget on the Pi to download one of the URL’s that the log says failed ? Most of them are plain text so you should be able to read the file after downloading.

Are you behind a transparent proxy by any chance ? Wifi or Ethernet ?

osmc@osmc:~$ wget http://ftp.debian.org/debian/dists/jessie/InRelease
–2015-05-03 23:15:12-- http://ftp.debian.org/debian/dists/jessie/InRelease
Resolving ftp.debian.org (ftp.debian.org)… 130.89.148.12, 2001:610:1908:b000::148:12
Connecting to ftp.debian.org (ftp.debian.org)|130.89.148.12|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 127816 (125K) [text/plain]
Saving to: ‘InRelease’

InRelease 100%[==========================================>] 124.82K 217KB/s in 0.6s

2015-05-03 23:15:13 (217 KB/s) - ‘InRelease’ saved [127816/127816]

osmc@osmc:~$
Sorry, I always use dist-upgrade. As you can see I can wget the files perfectly well. This is ethernet connected. There are not internet problems. Not behind any proxys etc. The InRelease files seems perfectly readable.

Cheers
Spart

Perhaps a temporary connection problem to the debian servers. Try apt-get update again.

I can only go by the log files presented and the original log clearly shows difficulty connecting to the servers, eg:

Err http://apt.osmc.tv jessie InRelease 
Err http://security.debian.org jessie/updates InRelease 
Get:4 http://ftp.debian.org jessie-updates InRelease [126 kB]
Err http://ftp.debian.org jessie InRelease 
Err http://ftp.debian.org jessie-updates InRelease 

The thing that made me suspect your internet connection is that there are errors for both the debian mirrors and osmc mirrors, which are hosted in completely different locations and are unrelated to each other, and yet some of the debian URL’s did download ok. That’s suggests an intermittent problem of some sort.

Another thing to check is to look for signs of eth0 going up and down in your system journal. In fact please post your system journal after a failed attempt to update:

sudo journalctl | paste-log

(Assuming that it is able to upload!)

If you see lots of log entries showing eth0 going down and up I would check the power adaptor is providing sufficient voltage. It would certainly fit the symptoms of intermittent loss of connectivity during CPU load.

Also try leaving another PC pinging the Pi when you run updates and see if pings start failing.

HI I cannot see any errors in the log regarding eth0. I can however see a lot of ext4 errors that all relate to the root partition. I have not tried to correct anything as yet with fsck.ext4 etc.

osmc@osmc:~$ sudo journalctl | grep error
May 03 23:58:09 osmc kernel: EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
May 03 23:58:12 osmc ntpd[304]: restrict: error in address ‘::’ on line 38. Ignoring…
May 03 23:58:12 osmc ntpd[304]: restrict: error in address ‘::1’ on line 42. Ignoring…
May 03 23:58:19 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #135951: comm kodi.bin: pblk 0 bad header/extent: invalid magic - magic f38a, entries 1025, max 4(0), depth 0(0)
May 03 23:58:19 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #136027: comm kodi.bin: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0)
May 03 23:58:19 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_iget:4056: inode #136256: comm kodi.bin: bad extended attribute block 134217728
May 03 23:58:19 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #136059: comm kodi.bin: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 32(32)
May 03 23:58:19 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_iget:4056: inode #136023: comm kodi.bin: bad extended attribute block 32768
May 03 23:58:19 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_iget:3921: inode #136020: comm kodi.bin: bad extra_isize (412 != 256)
May 03 23:58:22 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #132283: comm LanguageInvoker: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
May 03 23:58:22 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #132283: comm LanguageInvoker: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
May 03 23:58:22 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #132283: comm LanguageInvoker: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
May 03 23:58:22 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #132283: comm LanguageInvoker: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
May 03 23:58:51 osmc kernel: EXT4-fs error: 8 callbacks suppressed
May 03 23:58:51 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #132283: comm LanguageInvoker: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #135951: comm LanguageInvoker: pblk 0 bad header/extent: invalid magic - magic f38a, entries 1025, max 4(0), depth 0(0)
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #136027: comm LanguageInvoker: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0)
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_iget:4056: inode #136256: comm LanguageInvoker: bad extended attribute block 134217728
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_ext_check_inode:495: inode #136059: comm LanguageInvoker: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 32(32)
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_iget:4056: inode #136023: comm LanguageInvoker: bad extended attribute block 32768
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_iget:3921: inode #136020: comm LanguageInvoker: bad extra_isize (412 != 256)
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_lookup:1417: inode #132261: comm LanguageInvoker: deleted inode referenced: 132275
May 03 23:59:01 osmc kernel: EXT4-fs error (device mmcblk0p2): ext4_lookup:1417: inode #132261: comm LanguageInvoker: deleted inode referenced: 132275
osmc@osmc:~$

Can you advise the best way to try and fix this. It was working perfectly, and even now seems to run Kodi fine.

Cheers
Spart

It seems that there was a lot of fs corrruption. I can’t account for this. The pi2 was always powered up and down correctly the power supply seems very stable. 2A dedicated (not phone etc.)

Looks like no option but a clean re-install.

Cheers
Spart

What brand and model of SD card do you have ?

A long shot, but depending on your card you may be getting disk corruption due to this:

BTW if you have the most recent updates installed you can hold down shift during boot which will run fsck and then drop you to an emergency recovery console.

Hi thanks for the extra info. I tried to repair the FS in my Ubuntu box to no avail. The FS did correct on Ubuntu but would not boot OSMC on the pi2. So re-install was needed.

The SD is essentially new it a Verbatim SC Class 10 8GB card.

I re-installed using the same RC1 file. I blanked the SD using Ubuntu Disk tool then used the installer to install OSMC from the local RC1 file. All was well. I then upgraded it using the command line, again all was well no errors in the log.

There is still an issue trying to set the network manually from the installer. This results in a non working ethernet config. I had to manually create a ethernet.config file in /var/lib/connman/ to get it to work. Is this a known issue. When filling in the networking info in the installer I tried using leading zeros and also just the digits I needed. i.e. 192.168.000.011 and also 192.168.0__.11_ but neither worked. The installer is running on Ubuntu 14.04 64bit.

Are you saying that the kernel patches to prevent corruption are included in the latest RC2 OSMC and that by upgrading from RC1 I now have the patches in the kernel?

Cheers
Spart

Is there any reason you’re not using the RC2 installer ? Do you have a problem with pre-configuring static IP’s there ?

Static IP configuration was tested fairly thoroughly back around Alpha 4 and was working fine, I haven’t personally tested it since then but I’m not aware of any changes that would have broken it.

Can you provide a copy of the preseed.cfg file from the fat32 partition ?

No, I was just pointing out that there is a known compatibility problem between some models of SD card and the Pi 2 that is causing (sometimes severe) disk corruption. There isn’t a proper fix for this yet - as soon as popcornmix is happy that he has found the correct solution to the problem in the kernel we will include those fixes in the next build of OSMC.

HI,

My ubuntu 14.04 system is upto date so the installer is what it is. I wanted to start from the same RC1 base as my other pi’s and upgrade from there which is why I used the existing file from my disk. I have checked the logs for any sign of corruption on 3 other pi 2’s and all are clean so far.

Manual ethernet config has never worked for me in the installer. Preseed.cfg file:
osmc@osmc:~$ cat /boot/preseed.cfg
d-i target/storage string sd
d-i network/interface string eth
d-i network/auto boolean false
d-i network/ip string 192.168.000.006
d-i network/mask string 255.255.255.000
d-i network/dns1 string 192.168.000.100
d-i network/dns2 string 008.008.008.008
d-i network/gw string 192.168.000.001

I think the problem might be the ‘d-i network/interface string eth’ seems odd not to specify eth0 etc.
Everything else looks ok if leading zeros are correct. I did try it both ways but both resulted in a non working ethernet config.

Cheers
Spart

I think your problem is the multiple zero’s for example 192.168.000.100 instead of 192.168.0.100. Try editing the IP addresses in preseed.cfg manually then run the preseed script manually to see if it updates the settings correctly:

sudo /usr/bin/preseed

(Best to do this from a local console login as it will disrupt an ssh connection)

After running this check the system journal for any output from the preseed command:

sudo journalctl

eth is correct for interface string afaik.

As i said I tried it both ways with and without the leading zeros in the installer! So the preseed file is being created by that! Both resulted in a non working ethernet connection. The installer needs a tweak on the input field boxes for the addresses to be clear. Using the installer to configure the manual networking setup then having to hack the preseed file kind of defeats the object :slight_smile: I may as well just create the /var/lib/connman/ethernet.config file and be done with it.

Cheers
Spart

Make sure you are using the latest version of the installer - there have been some changes to the way IP addresses are handled in the input fields. If you have an old version of the installer you will still be able to install the latest OSMC releases as it checks for new images on the website but the installer itself could be out of date.

I’m a little bit puzzled why when the correct IP address didn’t work you tried entering the wrong IP on purpose…(eg 000). By the way it’s not just our installer that lets you enter multiple zeros either, try doing it in Windows 7 and it will happily let you enter multiple zeros. If your number is less than 3 digits you’ll need to either press tab or click into the next field yourself. (In windows it’s cursor right, but same idea)

I’m also not saying for sure that leading zeros is the problem - but it’s the only thing I could see wrong in the preseed.cfg that you provided that looked wrong so it was the obvious first thing to check. I can’t actually remember for sure whether leading zero’s does cause a problem or not.

I wasn’t suggesting that hacking the preseed file was an acceptable method of setting up networking, obviously. :wink: I was suggesting you try it so that we can determine whether that was the cause of the problem or not, whilst saving you from reinstalling from scratch.

So did you try running preseed manually as I asked and checking the log file for results ? Without some sort of log file showing what the problem is it’s not likely to get fixed when we can’t reproduce it…

Hi thanks for bearing with me,

Having tried the correct format 192.168.0__.6__ and that not working I then tried the leading zeros approach. The installer I am using is:
sudo apt show osmc-installer
Package: osmc-installer
Version: 111
Origin: OSMC
Maintainer: Sam G Nazarko email@samnazarko.co.uk
Installed-Size: 820 kB
Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libqt4-network (>= 4:4.5.3), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.5.3), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.1.4), parted
Recommends: gksu | kdesudo
Download-Size: 300 kB
Section: tools
Priority: optional
APT-Manual-Installed: yes
APT-Sources: Index of /repositories/home:/osmc/xUbuntu_14.04 Packages
Description: OSMC Installer allows you to install OSMC on a variety of devices.

apt shows no updates seem to be available for the above.
sudo apt-get install osmc-installer
Reading package lists… Done
Building dependency tree
Reading state information… Done
osmc-installer is already the newest version.

I will have another go at installing from scratch using the correct input and will see if we get any other result.

Cheers
Spart

Can you not just try running

sudo /usr/bin/preseed

And uploading your system journal ?

sudo journalctl | paste-log

Reinstalling from scratch again only to find it doesn’t work again seems like a waste of your time.

Preseed logs what it does to the system journal so should say exactly what it is doing in the log file.

1 Like

Hi,

Trying to run /usr/bin/preseed on the already running system didn’t work. I removed the ethernet.config file and system generated ethernet_MAC directory and all contents. Then rebooted. Once the system came back and I exited OSMC (because escape does not work on first boot) back to the command prompt it was clear that the system had defaulted to a dhcp config. At this point the pressed file was correct with no leading zeros.

Running the pressed command completed successfully and reconfigured the eth0 interface with the correct manual settings. The log showed the address re-assignment for eth0 to the manual address and dns gateway etc.

So from the preseed file correctly filled out it works. My next test will be a new fresh install and configure networking manually from the installer. There is no way to stop it from starting osmc at first boot that I know of. So it will get at least one boot cycle to configure networking.

I will post results of this test shortly. One additional feature of the installer would be a nice to have is to ask for IPv6 preference and set the IPv6.method = off or auto etc.

Cheers
Spart

Wow what an ass I feel :grimacing: :confounded: :confused: I cannot recreate the failed non working ethernet installation! I have tried twice and I get a fully working system both times.

Preseed file is correctly created and on first boot the manual config is correctly configured. I really can’t account for this. Please accept my sincere apologies for any time you have spent working on this issue with me.

I really feel a complete ass!!!

Please feel free to delete this entire thread. Donation on it’s way.

Cheers
Spart

LOL. Glad you got it working! Welcome to the club.

But I wouldn’t feel bad if I were you. Sometimes things just go wrong and it can be easier to start over than track down the culprit.

I’ve got my system working almost to perfection. Once I do I’m going to make a backup image of my SD-Card so that I can re-flash it in future if it ever stops working properly instead of starting from scratch.