OSMC will not boot - Broken SD?

Happened last night. Was OK night before that. I see a message that it fails to load a something
.so module, but cannot see the name. SD-card opens up OK on PC. It is approx 2 years old. Could the SD-card be defect?

I installed fresh on another card, booted and restored settings from backup.

Any ideas? Is there a way to “integrity check” an SD card?

It occurs automatically on boot. No, we don’t have any ideas because you are providing almost no relevant info. Why not provide logs so we can have a look at what the system reports as a problem instead of “I see a message that it fails to load a something.so module”? We’ve made the providing of logs so simple just for this reason.


It’s a bit hard to tell without the filename or some logs, but if it won’t boot you’ll not be able to run the grab-logs command.

Do you have access to a linux machine? If you do, insert the sdcard using an sdcard reader, run df to check which device it is (probably sdb if you only have one hard drive) then run the following changing sdb to the appropriate letters:

sudo umount /dev/sdb1
sudo umount /dev/sdb2
sudo fsck -fvp -C0 /dev/sdb1
sudo fsck -fvp -C0 /dev/sdb2

This will perform a full file system check on both parts of the sdcard and should automatically correct any errors. You can then try and rebootfrom the card.

Try and keep a copy of the terminal output from the fsck commands as this could be useful if it doesn’t work.


Thanks, yes. It is completely dead, cannot get into ssh. Otherwise I would have provided logs, anyway. Put the card into an USB holder and plugged into my tvheadend box:

Disk /dev/sde: 14.9 GiB, 16009658368 bytes, 31268864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000224be

Device Boot Start End Sectors Size Id Type
/dev/sde1 2048 499711 497664 243M c W95 FAT32 (LBA)
/dev/sde2 501760 31268863 30767104 14.7G 83 Linux

tvburk:/home/dalton/Videos # sudo fsck -fvp -C0 /dev/sde1
fsck from util-linux 2.25
fsck.fat 3.0.26 (2014-03-07)
fsck.fat 3.0.26 (2014-03-07)
Checking we can access the last sector of the filesystem
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Boot sector contents:
System ID “mkdosfs”
Media byte 0xf8 (hard disk)
512 bytes per logical sector
512 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
1959936 bytes per FAT (= 3828 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3936256 (sector 7688)
489976 data clusters (250867712 bytes)
63 sectors/track, 255 heads
0 hidden sectors
497664 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
Performing changes.
/dev/sde1: 287 files, 60930/489976 clusters

tvburk:/home/dalton/Videos # sudo fsck -fvp -C0 /dev/sde2
fsck from util-linux 2.25
Error reading block 1048616 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan.

(i.e., without -a or -p options)

Shall I?

Definitely a corrupt card.

You can try running fsck manually or you can delete the partitions, format it and reinstall.

The former will teach you a lot but take 100 times as long and may not get you anywhere. The latter will get you up and running quicker but isn’t as much fun :slight_smile:

Already up and running on another card :slight_smile: Running fsck now:

Error reading block 1048616 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan. Ignore error?


If you want to use the card again you can’t ignore the errors you need to get it to fix them.

If it doesn’t give you the chance to fix some, ignore them on this pass and then after you have fixed as many as it will allow, run it again. Repeat until there are no errors.

It is quite possible that it won’t be able to fix it, in which case you’ll need to delete the partitions, create a new partition table, format the card and then it will be useable for something else or a reinstall.

If it doesn’t fix it with manual scans you can always try fsck -fa as sometimes auto mode fixes more than manual mode, but it really is a bit of black magic on sdcards anf never 100% predictable.

Ultimately you have nothing to lose, so experiment at will.

Yes, I did. Answered yes a million times. Then put the card in the Pi. It boots and I can get into ssh, but HDMI-screen is blank. Mediacenter is runing. config.txt looks fine.

I can provide logs, in case anyone is interested, but I guess I’d better just reinstall, or keep running the new card I installed and reinit this one as backup

osmc@pi:~$ service mediacenter status

  • mediacenter.service - media center application
    Loaded: loaded (/lib/systemd/system/mediacenter.service; enabled)
    Active: active (running) since Sat 2016-09-17 10:59:26 EEST; 1 weeks 6 days ago
    Main PID: 337 (mediacenter)
    CGroup: /system.slice/mediacenter.service
    |-337 /bin/bash /usr/bin/mediacenter
    |-390 sudo -u osmc /usr/lib/kodi/kodi.bin --standalone -fs --lircd…
    `-396 /usr/lib/kodi/kodi.bin --standalone -fs --lircdev /var/run/l…strong text

EDIT: Sorry, scratch that. HDMI-cable not properly seated :slight_smile:

Did you re-run fsck again and again until it reported clean?

It may be that you have a file it couldn’t recover and so you may not get it back (as I posted earlier) but I’d be happy to look at the logs and see if I can see anything.

Yes. I did. It is up and running now. Will make a backup just in case and switch to the other card.

Glad you sorted it! :slight_smile:

Book mark the thread or save the commands somewhere in case it happens again. SD cards can be all to flaky sometimes.

1 Like

Will do yes. But having a backup card will save some grief. Rest of family not that keen on troubleshooting :slight_smile:

Just adding one tidbit: As far as I know, this was not the result of a power outage or such.