[intrepid] apt-get /var/lib/apt and /var/lib/dpkg missing

Bug #283529 reported by magor
4
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

I am running Kubuntu.
Since Oct 1 I have upgraded to:

cat /etc/issue
Ubuntu intrepid (development branch)

I issue an apt-get update && apt-get dist-upgrade about twice a day. Earlier today (Oct 14, 2008) I ran the update at work, then shutdown my laptop. The shutdown hung so I had to hold the power button to kill it. At home I started the laptop and tried to do another apt-get update. However I get the following error:

E: Could not open lock file /var/lib/apt/lists/lock - open (2 No such file or direcotry)
E: Unable to lock the list directory

ls /var/lib
aptitude dictionaries-common gems initramfs-tools update-notifier urandom

I then forced a fsck check by running 'touch /forcefsck' and rebooted. (Note: My shutdown hung again and I had to hold the power button down again). The fsck didn't report anything bad with my disk.

Is my disk going bad, or did my most recent update wipe out my /var/lib/apt & dpkg directories? Or is this god punishing me for running too many updates a day :)

By the way running 'apt-cache policy packagename' as suggested in the Report a bug guideline results in:
E: Could no open file /var/lib/dpkg/status - open (2 No such file or directory)

Revision history for this message
magor (root-sweetismarvelous) wrote :

I recreated the missing dir/file by running:
mkdir /var/lib/apt
mkdir /var/lib/apt/lists
mkdir /var/lib/dpkg
touch /var/lib/apt/lists/lists
mkdir /var/lib/apt/lists/partial
touch /var/lib/dpkg/status
mkdir /var/lib/dpkg/updates
touch /var/lib/dpkg/available

It seems to be working now. I still don't show any errors with /dev/sda. Hope its not the ext3 kernel problem that lost my /var/lib directories.

Kernel: 2.6.27-7-generic x86_64
mtab: /dev/sda1 / ext3 rw,relatime,errors=remount-ro 0 0
crypttab: home /dev/sda3 none luks,tries=5
crypttab: cryptoswap /dev/sda5 /dev/urandom swap
dmesg "strange message": CE: hpet increasing min_delta_ns to 15000 nsec

Revision history for this message
Uwe L. Korn (uwelk) wrote :

As your bug report is about a developement version of intrepid: Does your problem still exist with the released version of Intrepid?

Revision history for this message
magor (root-sweetismarvelous) wrote :

After rebuilding parts of my /var directory and reinstalling most my .deb packages things have been stable. (Well most things, I have been to lazy to set the correct permissions on /var/lib/mlocate/mlocate.db)

I am guessing "something" corrupted/delete many of my /var directories/files. It hasn't happened again so I don't think it was the hard disk. My guess is this was a casualty of running beta software. Since it hasn't happened again I'd mark this issue closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.