Update error on Pi

Hi guys.

First post :smile:

I’ve tried updating OSMC on my two Pi’s. One is working fine, but the other comes up with an error under the installation, reboots and says: “Error installing: mediacenter-skin-osmc (3.0.5-1)”. Any suggestions on fixing this?

Thanks!

Logs would be good.

But if you have a keyboard attached to the problematic Pi, then reboot and hold down SHIFT and CTRL. This should force an external upgrade. If no keyboard, then use SSH to enter then commands instead (as shown here: Wiki - OSMC).

Yeah, sorry. Logs are here http://paste.osmc.io/udalequjon

I do not have a keyboard attached to the Pi, so I’ll do it by ssh, if that is what it takes?

Thanks!!

Let us know how it goes.

You are using a USB install and you have some problem with the USB drive that you have installed on as it is reporting a lot of errors:

    Jun 29 10:48:05 osmc kernel: EXT4-fs error (device sda1): ext4_iget:4056: inode #859: comm chown: bad extended attribute block 1073741824
    Jun 29 10:48:05 osmc kernel: EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #857: comm chown: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
    Jun 29 10:48:05 osmc kernel: EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #860: comm chown: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0)
    Jun 29 10:48:48 osmc kernel: EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #857: comm dpkg: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
    Jun 29 10:48:49 osmc kernel: EXT4-fs error (device sda1): ext4_iget:4056: inode #859: comm chown: bad extended attribute block 1073741824
    Jun 29 10:48:49 osmc kernel: EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #857: comm chown: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
    Jun 29 10:48:49 osmc kernel: EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #860: comm chown: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0)


    Jun 29 10:49:27 osmc kernel: EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
    Jun 29 10:49:27 osmc kernel: EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
    Jun 29 10:49:42 osmc mediacenter[551]: dpkg-query: no packages found matching rbp-mediacenter-osmc
    Jun 29 10:49:52 osmc kernel: EXT4-fs (sda1): error count since last fsck: 367
    Jun 29 10:49:52 osmc kernel: EXT4-fs (sda1): initial error at time 1429463500: ext4_ext_remove_space:2961: inode 6767
    Jun 29 10:49:52 osmc kernel: EXT4-fs (sda1): last error at time 1435567767: ext4_find_extent:900: inode 4749

[   21.949220] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.951104] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.951771] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.952451] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.953058] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.953649] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.954258] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.954863] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.955452] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   21.959935] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[   86.985930] EXT4-fs error (device sda1): ext4_mb_generate_buddy:757: group 7, block bitmap and bg descriptor inconsistent: 22164 vs 22290 free clusters
[   87.991036] JBD2: Spotted dirty metadata buffer (dev = sda1, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
[   87.996219] JBD2: Spotted dirty metadata buffer (dev = sda1, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
[  196.628078] Console: switching to colour frame buffer device 240x67
[  197.139612] EXT4-fs error (device sda1): ext4_iget:4056: inode #859: comm chown: bad extended attribute block 1073741824
[  197.142658] EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #857: comm chown: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
[  197.144485] EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #860: comm chown: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0)
[  240.265071] EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #857: comm dpkg: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
[  240.872810] EXT4-fs error (device sda1): ext4_iget:4056: inode #859: comm chown: bad extended attribute block 1073741824
[  240.876325] EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #857: comm chown: pblk 0 bad header/extent: invalid eh_entries - magic f30a, entries 65, max 4(4), depth 0(0)
[  240.878659] EXT4-fs error (device sda1): ext4_ext_check_inode:495: inode #860: comm chown: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0)
[  278.035588] Console: switching to colour dummy device 80x30
[  278.949029] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[  278.955192] EXT4-fs error (device sda1): ext4_find_extent:900: inode #4749: comm kodi.bin: pblk 97509 bad header/extent: invalid magic - magic 5625, entries 63474, max 3115(0), depth 64902(0)
[  303.902089] EXT4-fs (sda1): error count since last fsck: 367
[  303.902125] EXT4-fs (sda1): initial error at time 1429463500: ext4_ext_remove_space:2961: inode 6767
[  303.902145] EXT4-fs (sda1): last error at time 1435567767: ext4_find_extent:900: inode 4749

It’s difficult to tell if you just have file system corruption or whether the hardware of the drive is failing. You could try running a file system check by booting while holding down SHIFT but I suspect that it may be too corrupted for that to repair everything and/or the drive itself is faulty. Give it a try though.

Is it a thumb drive or a spinning drive ? If the latter how is it powered ? Have you had any previous unexplained crashes ? Do you always shut down properly or does it get the power pulled ?

Updating won’t have caused these errors however if there was a pre-existing hardware fault with the drive or the file system was already badly corrupted this would cause the update process to fail as lots of critical system files get written to disk during an update - and if they can’t be written correctly bad things will happen…

Thanks for the response.

Can I run the file system check via ssh? I do not have a keyboard attached to the Pi.

The usb is a usb stick, and no, I have not noticed problems with this Pi/OSMC before. Usually I power off properly, but I have pulled the power if it was freezing or something.

Do you too, think I should try what Narnage suggested?

If the file system is not already in read only mode then it’s difficult to run fsck via ssh, (and likely to go wrong) so I wouldn’t suggest that.

Do you not have a USB keyboard that you can plug in temporarily ?

Karnage’s suggestion would re-run the update but if you have file system corruption you need to solve that first, then try an update afterwards to see if it will finish re-installing what it couldn’t before.

No, actually not. I only have the Apple Wireless Keyboard as external keyboard and a USB mouse. I must try to borrow one, one day I guess then.
No other way to run the file system check than with a USB keyboard?

Not really.

When linux first starts booting the root file system is mounted read only, and a file system check (fsck) can be run at that time. During boot the file system then gets remounted read/write. Once programs are running that have files open for writing you can no longer remount the root file system as read only to run a file system check.

(Not without shutting those programs down, but they will be core system services like systemd that will cause you to lose your SSH connection if you tried)

Holding down SHIFT when booting is something we added that interrupts the boot process VERY early while the file system is still read only and we do an automatic file system scan at that point before dropping you to a recovery console command prompt.

I can’t think of a way off hand to do it via SSH - the shutdown command on some Linux distributions has a -F option to force a file system scan on next boot but ours doesn’t appear to have that…

Edit: you could try the following via SSH but I don’t know if it will work:

sudo -s
echo y > /forcefsck
reboot

Okay. I tried the SSH you suggested, but it just seemed like it rebooted regularly. I tried updating OSMC again, but same error comes up.

Where can I see the outcome of the file system check?

I ended up just backing up my OSMC via myOSMC and installed a fresh version on a new usb stick. Thanks for the responses anyway :slight_smile: