Crash on startup since Dec update

Hi,

I applied the Dec update last night and the process seemed to run as normal until it got towards the end. Now the system boots to show a frown. After a while it automatically reboots but then returns to the frown.

I believe I saw an error message flash in which it reported problems with samba.

http://paste.osmc.io/orejawakun.dos

Overall, I have to say that OSMC / KODI is unbelievably good. Thank you for all of your efforts with keeping this going!

Paul

Your upgrade didn’t succeed completely
Error: Sub-process /usr/bin/dpkg returned an error code (1)

I suggest you login via SSH and execute:
sudo apt-get update
sudo apt-get dist-upgrade
and report any errors shown.

Hi fzinken,
Definitely getting an error with samba. The first command ran without any errors. Here’s the messages I get when apply the second command:

osmc@blu:~$ sudo apt-get dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages were automatically installed and are no longer required:
armv7-libcrossguid-osmc bluez libapt-inst1.5 libasn1-8-heimdal libass5
libbind9-90 libdbus-1-dev libdns100 libdpkg-perl libgif4 libgnutls-deb0-28
libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libhogweed2
libhx509-5-heimdal libicu52 libisc95 libisccc90 libisccfg90 libjasper1
libkrb5-26-heimdal liblwres90 libmicrohttpd10 libmysqlclient18 libnettle4
libntdb1 libplist2 libpng12-0 libpsl0 libroken18-heimdal libssl1.0.0
libwebp5 libwebpdemux1 libwebpmux1 libwind0-heimdal libxtables10 pkg-config
python-dbus-dev python-ntdb
Use ‘sudo apt autoremove’ to remove them.
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 samba (2:4.5.12+dfsg-2+deb9u1) …
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
insserv: warning: current start runlevel(s) (empty) of script smbd' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script smbd’ overrides LSB defaults (0 1 6).
Job for smbd.service failed because the control process exited with error code.
See “systemctl status smbd.service” and “journalctl -xe” for details.
invoke-rc.d: initscript smbd, action “start” failed.

  • smbd.service - Samba SMB Daemon
    Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-01-13 08:24:56 EST; 32ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 1639 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=127)
    Main PID: 1639 (code=exited, status=127)

Jan 13 08:24:56 blu systemd[1]: Starting Samba SMB Daemon…
Jan 13 08:24:56 blu smbd[1639]: /usr/sbin/smbd: error while loading shared …tory
Jan 13 08:24:56 blu systemd[1]: smbd.service: Main process exited, code=exi…/n/a
Jan 13 08:24:56 blu systemd[1]: Failed to start Samba SMB Daemon.
Jan 13 08:24:56 blu systemd[1]: smbd.service: Unit entered failed state.
Jan 13 08:24:56 blu systemd[1]: smbd.service: Failed with result ‘exit-code’.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package samba (–configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u1) …
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thanks again for your help.

Paul

Try sudo apt-get install --reinstall samba-libs
and then run sudo apt-get dist-upgrade

It failed on the first command:

osmc@blu:~$ sudo apt-get install --reinstall samba-libs
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
armv7-libcrossguid-osmc bluez libapt-inst1.5 libasn1-8-heimdal libass5
libbind9-90 libdbus-1-dev libdns100 libdpkg-perl libgif4 libgnutls-deb0-28
libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libhogweed2
libhx509-5-heimdal libicu52 libisc95 libisccc90 libisccfg90 libjasper1
libkrb5-26-heimdal liblwres90 libmicrohttpd10 libmysqlclient18 libnettle4
libntdb1 libplist2 libpng12-0 libpsl0 libroken18-heimdal libssl1.0.0
libwebp5 libwebpdemux1 libwebpmux1 libwind0-heimdal libxtables10 pkg-config
python-dbus-dev python-ntdb
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/4504 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:
unable to open files list file for package ‘dialog’: Structure needs cleaning
E: Sub-process /usr/bin/dpkg returned an error code (2)

And thanks again for your quick replies!

Paul

Could be a fatal SD card issue.
Try sudo apt-get clean

I ran that command and it did not report anything back. I then reran:

sudo apt-get install --reinstall samba-libs

and it gives the same errors. So you think my SD card is dead/dying? It’s been running for < 1.5 years.

If I do need to get a new SD card, what’s the safest way to install OSMC on the new card and then bring over my settings? Do I copy /home/osmc/.kodi onto a fresh install?

Paul

osmc@blu:~$ sudo apt-get clean
osmc@blu:~$ sudo apt-get install --reinstall samba-libs
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
armv7-libcrossguid-osmc bluez libapt-inst1.5 libasn1-8-heimdal libass5
libbind9-90 libdbus-1-dev libdns100 libdpkg-perl libgif4 libgnutls-deb0-28
libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libhogweed2
libhx509-5-heimdal libicu52 libisc95 libisccc90 libisccfg90 libjasper1
libkrb5-26-heimdal liblwres90 libmicrohttpd10 libmysqlclient18 libnettle4
libntdb1 libplist2 libpng12-0 libpsl0 libroken18-heimdal libssl1.0.0
libwebp5 libwebpdemux1 libwebpmux1 libwind0-heimdal libxtables10 pkg-config
python-dbus-dev python-ntdb
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 4504 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 Index of /debian stretch/main armhf samba-libs armhf 2:4.5.12+dfsg-2+deb9u1 [4504 kB]
Fetched 4504 kB in 2s (1859 kB/s)
dpkg: unrecoverable fatal error, aborting:
unable to open files list file for package ‘dialog’: Structure needs cleaning
E: Sub-process /usr/bin/dpkg returned an error code (2)

I would say so, but maybe @dillthedog has more ideas

that would work

It doesn’t look good.

If you run

md5sum /var/lib/dpkg/info/dialog.list

the md5 should be c36cc7cdc895e66a5454dc9b4673bd97 (though I doubt it is).

You could try a reinstall of dialog:

sudo apt-get install --reinstall dialog

but I’m guessing there will be other problems… :frowning: A purge/install won’t be possible.

This command fails with:

md5sum: /var/lib/dpkg/info/dialog.list: Structure needs cleaning

Trying to reinstall dialog also fails with the “structure needs cleaning” message. It sounds like it’s the end of the road for my SD card.

With regards to the .kodi folder, I’m thinking it might be best to bring over as little as possible: I’m concerned about bringing over potentially corrupt data to a new card/install.

Can I bring over just .kodi/userdata? (From userdata I would want *.xml, the keymaps folder. [The library can be rebuilt; I don’t care about the add-ons (I can reinstall) or play lists/counts.] Are there any other settings that I would be missing?

Paul

If you bring across *.xml and keymaps, you should also have a chance to correct any minor character corruptions, that’s assuming you can read the files in the first place.

I think *.xml and keymaps should be sufficient, though I’m happy to be corrected.

sorry… linux user here… and soon vero 4k too

launching apt-get install -f should fix “1 not fully installed or removed.”

BHH

All,

Thanks for the help. I am back operational.

Unfortunately, I tried the "sudo apt-get install -f " but that failed for me too.

So my fix was a new SD card. Actually installing OSMC on the card proved difficult as I believe Win 10 was getting in the way somehow. The install log said ~ “Could not trash the MBR”.

In case someone else has the same issue, this is what I had to do to enable the OSMC installer to write to the new SD card:

  • Tap Windows Key, type Computer Management to start Computer Management
  • Under Storage in the list to the left, click on Disk Management
  • Right click on the Disk that is your SD card (BE EXTREMELY CAREFUL HERE, DON’T SELECT ANOTHER DISK OR YOU COULD ROYALLY SCREW UP YOUR COMPUTER!)
  • After the right click, from the drop down menu click “Change Driver Letter and Paths…”
  • Click the Remove button (and I forget if you also need to confirm)
  • Go back to the Computer management | Storage | Disk Management screen
  • Right click on the same drive
  • Choose “Change Driver Letter and Paths…” again
  • I then chose to assign the same drive letter that it was before
  • Confirm and exit from Computer Management

I then re-ran the OSMC installer and it was then able to write the new MBR and disk image successfully. Hopefully this helps someone else

Thanks again guys…your response time and support is totally amazing.

Paul