Ubuntu

10.04 LTS Upgrade failed - read only lock file and file system

Asked by Karin Andersen on 2010-09-10

My upgrade has failed and I cannot access anything except the command line - results below:
sudo apt-get upgrade
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: dpkg was interrupted you must manually run 'sudo dpkg --configure -a ' to correct the problem
When I do this it says
dpkg: unable to access dpkg status area: read only file system.

if I try to remove the lock using
sudo rm /var/lib/dpkg/lock
it says rm cannot remove `/var/lib/dpkg/lock': read only file system.

I can run the live CD, which I have since downloaded. I don't want to use it to install because it will overwrite my home folder, as far as I can see. I don't have the home folder on a separate /. I can't copy or back up my mail from my home folder or some of my other files, permission is denied. I can't copy them using gksu nautilus either. I am running a dual boot with windows XP. XP is still working.
Please help me to fix this and save my data.
Thank you.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
2010-09-10
Last reply:
2010-09-26
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Karin Andersen (karinandersen) said : #2

I'm disappointed that no-one could help me on Launchpad. I thought this was the official help site. So my advice to anyone looking for help is to go to the Ubuntuforums.org, which is where I get a reply every time I post a question - usually within a couple of hours, and where my problem was solved.

Use livecd to change read/write permissions by using command sudo mautilus in the terminal. Navigate to your home folder (ie the one on your pc and not the livecd one) Once you've changed permissions on the files that you still need to copy (right click on file, properties, permission, change permission) make a back up copy of your home folder on a usb stick or on your other partition... re-install using the livecd, but make a / partition for the OS, around 6 gig, and make a /home folder for your files. After reinstall copy the old home folder into the new one. Yeehah. Next time you update use livecd and only change the os, the home folder is safe. but back up before hand in case.

Karin Andersen (karinandersen) said : #3

Please mark this as solved so that other people can see the solution...

Karin Andersen (karinandersen) said : #4

Karin Andersen suggests this article as an answer to your question:
FAQ #41: “apt error: “The list of sources could not be read."".

Sergio Martinez (sermarcue) said : #5

Hi Karin:

I got the same problem. I follow your instructions but I in my case I don't have permission to entire directories which I want to recover.

How do you change the permissions in that case?

Thanks

Sergio

Sergio Martinez (sermarcue) said : #6

What is the link to the ubuntu forum that you mentioned, please?