Trouble upgrading, workstation now unusable

Asked by Teunis Ott

Yesterday night (08/12/2014) I started upgrading my workstation to the latest generic. This morning I found it had failed.
Fortunately I have 3 command line terminal open. I can not create more, or open browsers, etc.
I am typing this on my laptop.
Now when I click (on my workstation) on "software up to date" I get:
Not all updates can be installed (etc)
When I click on Continue I get:
Software index is broken (etc), run "sudo apt-get install -f". When I do I get:
E: dpkg was interrupted, you must manually run "sudo dpkg --configure -a" to corect the problem.
When I do I get:
dpkg: error unable to crate new file '/var/lib/dpkg/status-new': No space left on device

I have removed several old operating systems, keeping only the last two.
I have removed the content of /boot/tmp (now there are some directories and 1 file there again)

df tells me there is plenty of space in all my file systems.

Now I got something new:

Task cannot be monitored or controlled
The connection to the daemon was lost. Most likely the background daemon crashed.

I will now click on "OK"

Back to "Not all updates can be installed". And round and round.

Help.

Teun Ott

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of :

sudo apt-get clean; df -h; lsb_release -a; uname -a; df -i; dpkg - l | grep linux-image

Thanks

Revision history for this message
Teunis Ott (teun) said :
#2

My workstation partially recovered, I think by going back to the previous
OS. I did the command you suggested. Clearly, I have too many Inodes in
use. Is that something I did, or is it the result of something that went
wrong
in the upgrade?

Here is the output of your commands:

teun@Lucas:~$ sudo apt-get clean
[sudo] password for teun:
teun@Lucas:~$ df -h
df: ‘/run/user/104/gvfs’: No such file or directory
Filesystem Size Used Avail Use% Mounted on
/dev/md0 15G 8.6G 5.4G 62% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 327M 1.2M 326M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 220K 1.6G 1% /run/shm
none 100M 64K 100M 1% /run/user
/dev/md2 129G 17G 105G 14% /home
teun@Lucas:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
teun@Lucas:~$ uname -a
Linux Lucas 3.2.0-67-generic #101-Ubuntu SMP Tue Jul 15 17:46:11 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
teun@Lucas:~$ df -i
df: ‘/run/user/104/gvfs’: No such file or directory
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md0 977280 975319 1961 100% /
none 417597 2 417595 1% /sys/fs/cgroup
udev 415274 518 414756 1% /dev
tmpfs 417597 566 417031 1% /run
none 417597 3 417594 1% /run/lock
none 417597 9 417588 1% /run/shm
none 417597 31 417566 1% /run/user
/dev/md2 8552448 61659 8490789 1% /home
teun@Lucas:~$ dpkg - l | grep linux-image
dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or
'more' !
teun@Lucas:~$

Should the last command have been dpkg - 1 | grep linux-image ?

Looking forward to hearing from you.

Best, Teun

Teunis J. Ott
<email address hidden>
908-879-5374

On 08/14/2014 02:22 AM, actionparsnip wrote:
> grep linux-image

Revision history for this message
Teunis Ott (teun) said :
#3

I did one more command:

teun@Lucas:~$ dpkg -l | grep linux-image
ii linux-image-3.13.0-33-generic
3.13.0-33.58 amd64 Linux kernel
image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.2.0-60-generic
3.2.0-60.91 amd64 Linux kernel
image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-61-generic
3.2.0-61.93 amd64 Linux kernel
image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-63-generic
3.2.0-63.95 amd64 Linux kernel
image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-64-generic
3.2.0-64.97 amd64 Linux kernel
image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-65-generic
3.2.0-65.99 amd64 Linux kernel
image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-67-generic
3.2.0-67.101 amd64 Linux kernel
image for version 3.2.0 on 64 bit x86 SMP
iU linux-image-extra-3.13.0-33-generic
3.13.0-33.58 amd64 Linux kernel
extra modules for version 3.13.0 on 64 bit x86 SMP
iU linux-image-generic
3.13.0.33.39 amd64 Generic Linux
kernel image
teun@Lucas:~$

Hope this helps.

I use thunderbird mail. Is every old piece of mail an Inode?

Best, Teun.

On 08/14/2014 02:22 AM, actionparsnip wrote:
> Your question #253056 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/253056
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> What is the output of :
>
> sudo apt-get clean; df -h; lsb_release -a; uname -a; df -i; dpkg - l |
> grep linux-image
>
> Thanks
>

Revision history for this message
Teunis Ott (teun) said :
#4

I deleted all the files in a directory that (I thought) used about 10,000
Inodes. The number of free Inodes (according to df -i ) did actually
DECREASED, by about 3. Something fishy here. Teun Ott.

On 08/14/2014 05:12 PM, Teunis Ott wrote:
> Your question #253056 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/253056
>
> You gave more information on the question:
> I did one more command:
>
> teun@Lucas:~$ dpkg -l | grep linux-image
> ii linux-image-3.13.0-33-generic
> 3.13.0-33.58 amd64 Linux kernel
> image for version 3.13.0 on 64 bit x86 SMP
> ii linux-image-3.2.0-60-generic
> 3.2.0-60.91 amd64 Linux kernel
> image for version 3.2.0 on 64 bit x86 SMP
> ii linux-image-3.2.0-61-generic
> 3.2.0-61.93 amd64 Linux kernel
> image for version 3.2.0 on 64 bit x86 SMP
> ii linux-image-3.2.0-63-generic
> 3.2.0-63.95 amd64 Linux kernel
> image for version 3.2.0 on 64 bit x86 SMP
> ii linux-image-3.2.0-64-generic
> 3.2.0-64.97 amd64 Linux kernel
> image for version 3.2.0 on 64 bit x86 SMP
> ii linux-image-3.2.0-65-generic
> 3.2.0-65.99 amd64 Linux kernel
> image for version 3.2.0 on 64 bit x86 SMP
> ii linux-image-3.2.0-67-generic
> 3.2.0-67.101 amd64 Linux kernel
> image for version 3.2.0 on 64 bit x86 SMP
> iU linux-image-extra-3.13.0-33-generic
> 3.13.0-33.58 amd64 Linux kernel
> extra modules for version 3.13.0 on 64 bit x86 SMP
> iU linux-image-generic
> 3.13.0.33.39 amd64 Generic Linux
> kernel image
> teun@Lucas:~$
>
> Hope this helps.
>
> I use thunderbird mail. Is every old piece of mail an Inode?
>
> Best, Teun.
>
> On 08/14/2014 02:22 AM, actionparsnip wrote:
>> Your question #253056 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/253056
>>
>> Status: Open => Needs information
>>
>> actionparsnip requested more information:
>> What is the output of :
>>
>> sudo apt-get clean; df -h; lsb_release -a; uname -a; df -i; dpkg - l |
>> grep linux-image
>>
>> Thanks
>>

Revision history for this message
Teunis Ott (teun) said :
#5

More information:

The directory /usr/share contains 122275 files.
The directory /usr/src contains 780131 files.

/usr/share contains files and directories with many different names.

/usr/src contains many directories named

linux-headers-3.13.0-33-generic linux-headers-3.2.0-43-generic
linux-headers-3.2.0-23 linux-headers-3.2.0-44

etc, each containing (roughly) 8000 to 13000 files.
Can I delete the older ones?

Teun Ott

On 08/14/2014 05:56 PM, Teunis Ott wrote:
> Your question #253056 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/253056
>
> You gave more information on the question:
> I deleted all the files in a directory that (I thought) used about 10,000
> Inodes. The number of free Inodes (according to df -i ) did actually
> DECREASED, by about 3. Something fishy here. Teun Ott.
>
> On 08/14/2014 05:12 PM, Teunis Ott wrote:
>> Your question #253056 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/253056
>>
>> You gave more information on the question:
>> I did one more command:
>>
>> teun@Lucas:~$ dpkg -l | grep linux-image
>> ii linux-image-3.13.0-33-generic
>> 3.13.0-33.58 amd64 Linux kernel
>> image for version 3.13.0 on 64 bit x86 SMP
>> ii linux-image-3.2.0-60-generic
>> 3.2.0-60.91 amd64 Linux kernel
>> image for version 3.2.0 on 64 bit x86 SMP
>> ii linux-image-3.2.0-61-generic
>> 3.2.0-61.93 amd64 Linux kernel
>> image for version 3.2.0 on 64 bit x86 SMP
>> ii linux-image-3.2.0-63-generic
>> 3.2.0-63.95 amd64 Linux kernel
>> image for version 3.2.0 on 64 bit x86 SMP
>> ii linux-image-3.2.0-64-generic
>> 3.2.0-64.97 amd64 Linux kernel
>> image for version 3.2.0 on 64 bit x86 SMP
>> ii linux-image-3.2.0-65-generic
>> 3.2.0-65.99 amd64 Linux kernel
>> image for version 3.2.0 on 64 bit x86 SMP
>> ii linux-image-3.2.0-67-generic
>> 3.2.0-67.101 amd64 Linux kernel
>> image for version 3.2.0 on 64 bit x86 SMP
>> iU linux-image-extra-3.13.0-33-generic
>> 3.13.0-33.58 amd64 Linux kernel
>> extra modules for version 3.13.0 on 64 bit x86 SMP
>> iU linux-image-generic
>> 3.13.0.33.39 amd64 Generic Linux
>> kernel image
>> teun@Lucas:~$
>>
>> Hope this helps.
>>
>> I use thunderbird mail. Is every old piece of mail an Inode?
>>
>> Best, Teun.
>>
>> On 08/14/2014 02:22 AM, actionparsnip wrote:
>>> Your question #253056 on Ubuntu changed:
>>> https://answers.launchpad.net/ubuntu/+question/253056
>>>
>>> Status: Open => Needs information
>>>
>>> actionparsnip requested more information:
>>> What is the output of :
>>>
>>> sudo apt-get clean; df -h; lsb_release -a; uname -a; df -i; dpkg - l |
>>> grep linux-image
>>>
>>> Thanks
>>>

Revision history for this message
Teunis Ott (teun) said :
#6

After an attempted upgrade my workstation became very ill. The problem
is the number of Inodes in use in /dev/md0 :

teun@Lucas:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md0 977280 975342 1938 100% /
none 417597 2 417595 1% /sys/fs/cgroup
udev 415274 518 414756 1% /dev
tmpfs 417597 569 417028 1% /run
none 417597 3 417594 1% /run/lock
none 417597 9 417588 1% /run/shm
none 417597 26 417571 1% /run/user
/dev/md2 8552448 51720 8500728 1% /home
teun@Lucas:~$

That partition contains (almost) all of / but /home :

teun@Lucas:/$ ls
bin etc initrd.img.old lost+found opt run sys var
boot home lib media proc sbin tmp vmlinuz
dev initrd.img lib64 mnt root srv usr vmlinuz.old
teun@Lucas:/$

Using the command

for x in *; do echo -n "$x files = " ; sudo find $x | wc -l; done

I found that in /dev/md0 the Inode hogs seem to be (the directories
that contain the very large numbers of files) /usr/share and /usr/src .

The directory /usr/share contains 122275 files.
The directory /usr/src contains 780131 files.

The content of /usr/share seems legitimate.

  /usr/src contains many directories with old (?) Linux headers.

teun@Lucas:/usr/src$ ls -lt
total 284
drwxr-xr-x 7 root root 4096 Aug 12 23:55 linux-headers-3.13.0-33-generic
drwxr-xr-x 7 root root 4096 Jul 18 08:29 linux-headers-3.2.0-67-generic
drwxr-xr-x 24 root root 4096 Jul 18 08:29 linux-headers-3.2.0-67
drwxr-xr-x 7 root root 4096 Jul 6 12:45 linux-headers-3.2.0-65-generic
drwxr-xr-x 24 root root 4096 Jul 6 12:44 linux-headers-3.2.0-65
drwxr-xr-x 7 root root 4096 Jun 6 10:46 linux-headers-3.2.0-64-generic
drwxr-xr-x 24 root root 4096 Jun 6 10:46 linux-headers-3.2.0-64
drwxr-xr-x 7 root root 4096 May 26 09:59 linux-headers-3.2.0-63-generic
drwxr-xr-x 24 root root 4096 May 26 09:59 linux-headers-3.2.0-63

etc

drwxr-xr-x 24 root root 4096 Jun 29 2012 linux-headers-3.2.0-26
drwxr-xr-x 7 root root 4096 Jun 21 2012 linux-headers-3.2.0-25-generic
drwxr-xr-x 24 root root 4096 Jun 21 2012 linux-headers-3.2.0-25
drwxr-xr-x 7 root root 4096 Jun 8 2012 linux-headers-3.2.0-24-generic
drwxr-xr-x 24 root root 4096 Jun 8 2012 linux-headers-3.2.0-24
drwxr-xr-x 7 root root 4096 Jun 8 2012 linux-headers-3.2.0-23-generic
drwxr-xr-x 24 root root 4096 Jun 8 2012 linux-headers-3.2.0-23
teun@Lucas:/usr/src$ cd

Question:

Can I throw away the older of these directories?

Question:

Why are "very old" linux headers not removed during an update or
upgrade?

Best, Teun Ott.

On 08/14/2014 06:37 PM, Teunis Ott wrote:
> The directory /usr/share contains 122275 files.
> The directory /usr/src contains 780131 files.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

you should uninstall the linux-headers packages for the old kernels. This should free space and inodes.

Try the command

sudo dpkg -P \
linux-headers-3.2.0-65-generic \
linux-headers-3.2.0-65 \
linux-headers-3.2.0-64-generic \
linux-headers-3.2.0-64 \
linux-headers-3.2.0-63-generic \
linux-headers-3.2.0-63 \
linux-headers-3.2.0-26-generic \
linux-headers-3.2.0-26 \
linux-headers-3.2.0-25-generic \
linux-headers-3.2.0-25 \
linux-headers-3.2.0-24-generic \
linux-headers-3.2.0-24 \
linux-headers-3.2.0-23-generic \
linux-headers-3.2.0-23

Generally you should always keep an eye on free space and regularly do housekeeping.
Whenever a new version of the kernel and the related kernel headers is installed, you should also remove old kernel files and kernel header packages, to have only two or maybe three of them installed.

If my command works, you should check with

dpkg -l | grep linux-image
dpkg -l | grep linux-header

the number of kernels and kernel headers installed, and remove redundant ones (with dpkg, apt-get, software-center, or synaptic, or with the janitor function of Ubuntu-tweak).

Can you help with this problem?

Provide an answer of your own, or ask Teunis Ott for more information if necessary.

To post a message you must log in.