Yesterday I did something stupid. I accidentally unplugged my RPi3 which was running OSMC. Now it will not boot. I can’t ssh into my Pi, but the micro SD card seems to work. I can mount it and copy files on and of of it. A ran fsck /dev/sdc and got
fsck iz util-linux 2.31.1
e2fsck 1.43.8 (1-Jan-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks…
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768
Yes, I do have two partitions, one FAT and one EXT4. I thought I could repair both of them in one go. Now a ran separate commands for separate partitions and this is what I got (I ran both command as sudo)
If I am not mistaken this means that all is ok. So I thought that something might be wrong with my pi… A did a clean install on second sd card and all went without any problems (OSMC booted).
Perhaps a file on the /boot partition has been corrupted. If you were on the December (ie latest) version of OSMC, please post the output from md5sum /boot/*
Unfortunately, if the md5sum doesn’t show anything, I think you’re probably looking at a reinstall.
I’m not exactly sour, but I presume that I must mount my card and navigate to / folder of OSCM an then execute the command.
This is the outpute:
md5sum: /boot/grub: Is a directory
md5sum: /boot/grub.bak: Is a directory
0bb7dde12d66d81801266e7216baebb4 /boot/initramfs-linux-fallback.img
61fee3d6481877e5ab7bb60c2b682c29 /boot/initramfs-linux.img
md5sum: /boot/lost+found: Permission denied
md5sum: /boot/syslinux: Is a directory
f5ce4ab46ced762d98f8aec2a2d3e4f7 /boot/vmlinuz-linux
OK, that make’s sense. In my previous post I posted output when I mounted the second partition /dev/sdc2.
Here is the output when I mount the first partition, /dev/sdc1, and run the command:
md5sum: /boot/grub: Is a directory
md5sum: /boot/grub.bak: Is a directory
0bb7dde12d66d81801266e7216baebb4 /boot/initramfs-linux-fallback.img
61fee3d6481877e5ab7bb60c2b682c29 /boot/initramfs-linux.img
md5sum: /boot/lost+found: Permission denied
md5sum: /boot/syslinux: Is a directory
f5ce4ab46ced762d98f8aec2a2d3e4f7 /boot/vmlinuz-linux
What is your operating system? If it’s auto-mounted the partition it’ll possibly be at a place like /media/<username>/mmcblk0p1. Run df to see what partitions are mounted.
When I navigate to the sdc1 folder and run the command md5sum /boot/* I got:
blaz@blaz: CFA4-7A16 → md5sum /boot/*
md5sum: /boot/grub: Is a directory
md5sum: /boot/grub.bak: Is a directory
0bb7dde12d66d81801266e7216baebb4 /boot/initramfs-linux-fallback.img
61fee3d6481877e5ab7bb60c2b682c29 /boot/initramfs-linux.img
md5sum: /boot/lost+found: Permission denied
md5sum: /boot/syslinux: Is a directory
f5ce4ab46ced762d98f8aec2a2d3e4f7 /boot/vmlinuz-linux
Unless someone else can suggest something, I think a reinstall is the next logical step.
I don’t know how much configuration you’ve done to your system but, as a minimum you’ll probably want to copy the .kodi directory with all your Kodi settings. You’ll probably find it in /run/media/blaz/701987f5-4826-4894-9c6f-ddba3f/home/osmc. (It’s a hidden name, so ensure that you can see hidden files and folders if you’re using a file browser.)
Thank you for all your help. I’ll wait till tomorrow if anyone else comes up with any ideas. If not, I’ll try the reinstall and copy the .kodi directory.
OK, I got around the problem. Previously I sad, that made a fresh install on a second sd card. I copied .kodi folder from the old card to the new one, like dillthedog suggested. I had a cupel of issues with addons I had installed, but I reinstalled them and now all seems to work. Now the first thing I am going to do is a full backup of my OSMC img.