Error running updates

Hi,
So, long time lurker first time poster. This maybe the wrong place to post, but, this topic is my issue too. Except some subtle differences.

  1. Running on RPI2

  2. When I give the update command it shows “Working 0%” I left it going for some 4 hours +/- and there was no sign of progress. I’m sure that’s not normal?

  3. I’ve tried and/or checked to make sure it’s right, every thing else so far that you guys have suggested.

  4. Unlike @bytes I have a lot of data on here, and a lot of time invested…

  5. I keep getting these three errors:
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.

doing sudo journalctl | paste-log produced:

mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
-bash: $tmp: ambiguous redirect
http://paste.osmc.io/umexijiwuj

doing paste-log /var/log/apt/term.log produced:

and lastly doing paste-log /home/osmc/.kodi/temp/kodi.logpaste-log /home/osmc/.kodi/temp/kodi.log produces:

http://paste.osmc.io/iligufetuk

Any help would be great.

Thanks guys

I’ve moved your post to the Raspberry Pi section of the forum.

It seems that your file system is somehow in read only mode, it’s hard to know why though - your first debug log seems to be blank and the second one is only a kodi log, which won’t help with a system problem like read only file system or update problems.

A first suggestion - can you try booting with the shift key held down on a USB keyboard - if you have fairly recent updates already installed this should take you to the recovery console where it will first run a file system check and then give you a command prompt.

The most common cause for the system booting with a read only file system is significant file system corruption, so the fsck should at least tell us whether there is corruption, if not fix it. (If it’s not too bad)

If you are able to use the Log uploader in OSMC settings could you please upload all logs.

dsThank you for making/moving the thread.

I can’t get to the settings at all, because just like @bytes I’m stuck in the BSOD reboot loop right from the start.

It seems like this started when I created new “tab” on the Home Screen " (Aeon Nox Skin) called Music. it was fine the first few times loading up, then it wasn’t able to build the Home Screen shortcuts, and never could from then on. After failing, maybe 5 times over the course of 12 hours +/-, it crashed, and here we are. I don’t know if that helps at all, figured that if there is corruption, it could have originated from there.

I have a “full” backup that was created a while back using TotalXBMC’s Community Builds. It’s not completely up to date, but it’s something. I don’t even mind doing a re-install, if it’s possible to do it, while keeping the current files i have, sort of like merging a fresh, clean, uncorrupted fs with the current one. However, I feel like that option might not be any more of a reality for me than my wishful thinking, lol.

I only have wireless keyboards and I don’t know if it’s the reason that holding shift isn’t working, or if it’s because the updates aren’t recent enough. It seemed to have been auto updating without any issues until it crashed yesterday. So, I would imagine that it’s fairly up to date.

Although, I can’t drop into recovery console, I can SSH into it, and I also have a full (should be uncorrupted) fs installed on the microSD card. When I installed OSMC, I cloned the root partition and put it on an HDD, then I pointed the cmdline.txt to mount root from the HDD. So, the original fs install is still in tact, I can edit the cmdline.txt to point there, but no updates or anything like that would be applied to the damaged fs…

Being that you can’t get into the recovery console; do you have a computer with a card reader you can plug your SD card into?

If you do you can back up any files from the SD card, run file system checks on it, create an image of the whole card, etc.

Yeah that I can do, but my SD card just has the boot partition, The rest is on an HDD. I guess I’m trying to avoid having to back up and re-copy all the files and such again, plus I just got my skin setup how I liked it and all. If I make an image of everything say, wouldn’t that just leave me with an image of a corrupt fs, I’d be back at step 1? I’m probably missing something here though. Keep in mind I’ve been using Kodi and Linux in general for only about a year, and even though I’ve spent a good amount of time researching and trying to learn, I’m still very new to it, realistically. That’s also why I’m trying to figure this out, to hopefully have the knowledge to be able to either fix by myself or avoid this next time in the first place. I’m worried that if I back up stuff like my settings and customizations for the skin I’d run the same corruption. It’s 50+ GB or so of stuff too, so I’d hate to have to sit through all of it being copied, and organized, etc. just to be screwed again…

Filesystem Size Used Avail Use% Mounted on
/dev/root 230G 58G 160G 27% /
devtmpfs 347M 0 347M 0% /dev
tmpfs 351M 0 351M 0% /dev/shm
tmpfs 351M 4.8M 346M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 351M 0 351M 0% /sys/fs/cgroup
/dev/mmcblk0p1 240M 24M 217M 10% /boot
tmpfs 71M 0 71M 0% /run/user/1000

But if there is no other option I guess I should just suck it up. However, is there anything I can do to avoid this now and/or in the future?

Btw, thank you to everyone so far for taking the time to help me, and thank you to Sam and the rest of the team for all the hard work. I don’t think I said that earlier.

So @mcobit had solved my problem, by replying to my initial post that I had made in the wrong section of the forum. You guys tried to tell me to do this but I guess I just didn’t understand that that’s what you were telling me, mainly because I didn’t realize it was a command, or how to, much less that it existed lol. Sorry.

Thanks to everyone that helped, I really appreciate your time!!!

So how/where do you “run fsck”??

Well I SSHed in to the system and I’m guessing because of my issue I was SSHing into the recovery shell because all I did was stop the media center then

sudo fsck -y /

and it did it for me. I didn’t have to unmount it or anything.

After attempting to run it fsck again on a now working system I wasn’t able to due to a:

/dev/sda1 is mounted.
e2fsck: Cannot continue, aborting.

error message. When I went to unmount it by:

sudo umount /dev/sda1

or

sudo umount /

I got a:

umount: /: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)

so i wasn’t able to unmount it in order to run fsck…

Fsck worked the first time because the root file system was mounted read only due to the corruption.

When you tried the second time it was correctly mounted as read-write thus you can’t fsck.

You can’t unmount the root filesystem because it is in use. You would have to do a remount as read only instead however this is not generally recommended on a fully booted system. (I’m surprised osmc can boot at all with a read only filesystem)

From RC3 onwards (or if you have recent updates installed) you can hold down shift during turn on to get a recovery console which runs fsck first automatically for you.

Thanks for pointing out that it is possible to run fsck via ssh if the system has already boot read only, that hadn’t occurred to me as a simple solution until everyone has the recovery console feature in place…

I have RC3 and the latest updates, yet holding shift down while booting has no effect. I’m using a Raspberry Pi Model B+. Do I have to have something wrong for the recovery console to come up?

Try shutting right down and powering off, then hold down shift from before you reconnect the power - sometimes some USB keyboard do not do a warm boot quickly enough and aren’t ready to start sending key presses in time for when we check for shift. (Before the splash screen is displayed)

I sometimes see the same issue on a warm restart but it always works on a cold power on for me. Also is it an actual wired keyboard ? Some wireless keyboards may not be ready quickly enough either.

It’s a wireless keyboard, but holding shift down starting before plugging in power worked, with one caveat. I use an hdmi to vga converter with a vga monitor. On the startup holding shift it appeared that nothing happened, the monitor never came out of sleep mode. So I tried plugging in the analog cable to the old tv and there was the recovery console. It wasn’t very readable but it was there. It would be nice if it could come up on the monitor. Thanks for your attention.

There’s no reason why the recovery console shouldn’t appear automatically - do you normally see the OSMC graphical splash during boot or is it just blank until Kodi appears ?

HDMI to VGA adaptors can be a bit funny - sometimes you may need to have an hdmi_mode and hdmi_group option in your config.txt to force your preferred resolution in case it is defaulting to a mode your monitor can’t display:

http://elinux.org/RPiconfig#Video_mode_options

Recovery console definitely works fine on both HDMI (not using a VGA adaptor) and DVI on Pi 1/2 and Vero.

No I don’t get the splash screen on the monitor. The monitor comes out of sleep, than goes back in, then finally comes out, warms up, and the menu appears. I have hdmi_group and hdmi_mode set in /boot/config.txt just like I learned how to do with Raspian.

I do get the splash screen on analog with a tv. The splash screen disappears from the tv just about the time the monitor comes out of sleep for the last time.

What kind of monitor is it and do you know what its native resolution is ? What resolution is Kodi set to ?

Can you paste your exact config.txt ?

If the monitor goes back to sleep when the splash screen should appear them your resolution override in config.txt is not actually working properly.

The monitor is an old ViewSonic E641-2. Googleing reveals that it’s native resolution is 1024x768 at 67 Hz. I tried hdmi_mode=16, which is 1024x768 at 60Hz. This results in the first wake from sleep mode not happening. The monitor just sits in sleep mode for 20-30 seconds, then comes out of sleep mode, warms up and the OSMC menu is there. hdmi_mode=17, which is 1024x768 at 70 Hz, results in the monitor never coming out of sleep mode. I’m not sure about the Kodi resolution, but Settings->System->Video output->Resolution is set to DESKTOP.

Here’s my /boot/config.txt:

hdmi_mode=11
sdram_freq=400
core_freq=375
over_voltage=0
force_turbo=0
over_voltage_sdram=0
arm_freq=850
initial_turbo=0
start_x=1
hdmi_group=2
sdtv_aspect=1
disable_overscan=1
gpu_mem_256=112
gpu_mem_512=144
hdmi_ignore_cec_init=1

Thanks for all your help.

DESKTOP just means that Kodi will leave the screen resolution set at whatever default resolution the system boots in (on a Desktop OS, literally the desktop resolution) - which on a Pi is determined by the edid data read from the monitor or the hdmi_mode overrides in config.txt

70Hz is possibly not a good choice, for a CRT monitor at 1024x768 I’d use 60Hz. 75Hz is supported by most monitors but will not work as well for 30/60Hz video content and offers no real benefit. 72Hz will work on some but likewise will be visually worse than 60Hz for video. 70Hz doesn’t work on many CRT monitors. 67Hz is completely odd-ball :smile:

Try adding hdmi_force_hotplug=1 and changing your hdmi_mode back to 16. I think hdmi_force_hotplug=1 is required with some HDMI to VGA adaptors as they can’t always correctly report that a monitor is connected.

I agree 67Hz is strange, but that’s what the specification said.

I set hdmi_mode=16 and added hdmi_force_hotplug=1. This caused the out of sleep, back into sleep, 20-30 seconds later out of sleep, behavior I had with the original mode. As a side effect, it disabled the analog video, leaving me with no way to get to the recovery console.

You are most welcome to suggest other measures, but I fear the hdmi to vga converter is the root of my problem. Thanks for your assistance.

It does seem that way unfortunately.

You should still be able to edit config.txt either via ssh or by inserting the sd card into a PC to get your settings back to how they were.