Boot services failed, boot slow but still successful

  • My LibreELEC kodi is running on Raspi 5. It is LibreElec 12.0.2.

    On the boot screen is reads 30+ errors, starting with:

    LibreELEC (official):12.0.2
    [FAILED] Failed to start systemd-modules-load.service.
    [FAILED] Failed to start systend-hwdb-update.service.
    [FAILED] Failed to start rpcbind.service.
    [FAILED] Failed to start lwd.service.

    The full list here:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
    (link to expire 2026/01/14)

    It does eventually boot, but takes 70+ minutes to finally get there.

    Here is the link generated by pastekodi: https://paste.libreelec.tv/adapted-wombat.log

    I haven't found a repair tool inside the kodi interface ... is there an easy way to fix these errors?

  • During boot the filesystem is checked and fsck is reporting a load of I/O errors. As a result some data isn't readable and a whole list of services are failing to start. The normal cause is a dying SD card. Make a backup of Kodi data that you care about if/while you still can, then (the easy fix) replace the SD card and start over, copying Kodi data back if anything was copyable.

  • Oh wow. This system has been running for only about 6 months, on a new Samsung A2 EVO sd card. Is there a way to increase the lifespan of the card? That's a hefty price to shell out on this frequent basis if this is normal for a card to die this fast.

  • I think you are just very unfortunate. I have used many different raspberry pis and sd cards for 10+ years and I have had this happen only once in all that time. I have heard an argument that sd cards in raspberry pis are actually not ideal, because the read/write of the pi will wear out the sd cards' internal nand flash.

    If you want to boot from a more robust media, there is a config that lets you use an external ssd. Nvme should be more suited for the r/w load.

  • I have used ssd's instead of SDcards on more than half a dozen Pi's for several years now, no corruption or failed drives yet.

    And its faster, more responsive.

  • Oh wow. This system has been running for only about 6 months, on a new Samsung A2 EVO sd card. Is there a way to increase the lifespan of the card? That's a hefty price to shell out on this frequent basis if this is normal for a card to die this fast.

    First and the easiest is to check the SD-card. "Make a backup of Kodi data that you care about if/while you still can" and you could verify the card in a card reader and PC. If you able to format it and to copy data to it with a resonable speed, should be OK. Reinstall the LE, try to boot it, and if working, restore the backup.

  • I did make a backup using the tool in settings on the last boot. I copied all the contents of the sd card to my laptop, but I don't see any file or folder clearly labelled as backup. There are kernel.img, kernel.img.md5, SYSTEM.md5 files... are any of these relevant here?

    Or should I be doing a full clone of the drive with usbimager or something like this?

  • It's possible something like unplanned power off (or repeated power pulls to reboot) have simply screwed the filesystems up but those issues are normally resolved with the automated fsck on boot while presence of I/O errors normally indicates a dying card. It happens and the lottery these days is normally whether the 'name' brand card you buy from e.g. Amazon is a real 'name' card or a Chinese knock-off that's so accurately reproduced that nobody can tell. RPi boards are no better/worse than any other LE device in respect to read/write "wear" on the card and LE runs the core OS from a virtual filesystem in RAM on anything with 1GB or more so it's really only Kodi related read/write to /storage that is being made. TL/DR; LE should be lighter on the SD card than conventional distros that read/write to the full medium more frequently.

    The backup folder will be (by default) /storage/backup which is in the second (STORAGE) partition of the SD card which is EXT4 format and thus not visible to Windows or macOS devices that cannot understand EXT4 filesystems. You will need to copy the backup from the \\LIBREELEC\Backup SMB share or use an SFTP client to copy the file off.

    Once you have a copy of the file you can try reimaging the card and restoring the backup. If it was just screwed up filesystems you should be running again quickly. If it was a dying card you should quickly find similar issues.

    I would avoid attempting to clone the card as if the card is truly dying it's going to fail, and either way it's a long process. It's also unnecessary if you backed up the data on the card.

  • I copied all the contents of the sd card to my laptop, but I don't see any file or folder clearly labelled as backup

    It's a second partition with linux filesystem (ext4) on the SDcard. You could use a live linux on a USB stick to boot your pc with linux (no need to install anything), then you will able to "see" that partition and copy the backup somewhere. Or... Use the LE file manager (setting - file manager) "add source" the "root" and you will be able to find the "storage/backup". After that the backup file can be copied to USB drive connected to RPi.

    As it's suspected to have a dying SDcard, and the backup is on that card, you should use the pc - live linux version and copy somewhere the all data from that second "storage" partition.

  • Ok, I put a live linux on a usb drive (using Rufus), and booted ubuntu on my windows laptop. Copied the backup file over, then put a new LE install on the SD card. It booted super fast, no errors, and I have reconnected my bluetooth keyboard.

    I know that I had pulled the power cable pretty often on the old install - so I am guessing that was most of the cause for corrupted files and the boot problems. I didn't see proper options to power it down before (on 12.0.2), but now that I have 12.2.1 installed, there is a power down option in the power menu.

    Now that it is running again, I want to put the backup file I made back on the sd card. But the backup folder (the entire STORAGE drive) is read-only. How can I put my backup file back into this folder? Or should I put it in the LIBREELEC part of the drive, and just locate it from there when restoring it in Kodi?

    Thanks for all your help so far, it feels like I am getting close to having a smooth system again!

  • How can I put my backup file back into this folder?

    It's many way to do that:

    With the same "live linux" method you can access the "Backup" folder and to copy back the backup package (.tar file).

    Windows - Samba connection (explorer - network -> you should see the "LibreELEC" device)

    Windows - FileZilla and SFTP connection ("/storage/backup", use the SSH user/password)

    Can't be excluded your backup to contain some "insane" files and to get the issue back after restore... in that case open that ".tar" file (ex. with 7zip) and copy back only the most important files (use the "live linux" method).

  • It's many way to do that:

    With the same "live linux" method you can access the "Backup" folder and to copy back the backup package (.tar file).

    Sorry, when I say the /storage is read-only, I mean that the live linux does not have permission to move files here. Is there a setting in LE that I need to toggle so other OS has permissions to add files here?

  • In LE everything runs as "root" so everything created/copied/stored on /storage is owned by root so if mounting the filesystem from the 'Live' OS you will need to have root permissions to move files there. The easiest way to do that is 'sudo -i' in the Live terminal and then use cp commands to move the files.

    Or just boot the clean install and copy files to the 'backup' SMB share over the network, or enable SSH and use WinSFTP/Filezilla/etc. to move the file to /storage over the network.

  • Ok - that worked! LE is running and booting fast, and my backup has been restored! Everything is there except for the saved connection to my bluetooth keyboard, but that was easy enough to add back in. I'll call this fully resolved now. Thanks again for the help!