LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2014, 05:48 AM   #1
austinium
Member
 
Registered: Nov 2007
Location: India
Distribution: Debian Stable, Debian Testing
Posts: 219

Rep: Reputation: 27
Debian 6 to 7 Upgrade error, apt broken


Decided to upgrade some computers running Debian 6 a.k.a. squeeze to Debian 7 a.k.a. Wheezy today. Been having trouble with the kernel not getting upgraded.

I updated and upgraded the packages in my existing Squeeze installation before changing sources.lst file to wheezy. Then i ran
Code:
#apt-get update
#apt-get upgrade
#apt-get dist-upgrade
It went well mostly, except that i got an error related to the installation of linux-image-amd64. About some dependencies not being met.

So i went about google-ing the errors and ran the following commands:
Code:
root@Debian:~# dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 linux-image-amd64    Linux for 64-bit PCs (meta-package)

The following packages are missing the md5sums control file in the
database, they need to be reinstalled:
 gcj-4.7-jre          Java runtime environment using GIJ/classpath
 bogofilter           fast Bayesian spam filter (dummy package)
 gcj-jre-headless     Java runtime environment using GIJ/classpath (headless ve
 default-jre          Standard Java or Java compatible Runtime
Then i tried installing the kernel manually:
Code:
root@Debian:~# apt-get install linux-image-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  linux-image-3.2.0-4-amd64
Suggested packages:
  linux-doc-3.2 debian-kernel-handbook
The following NEW packages will be installed:
  linux-image-3.2.0-4-amd64 linux-image-amd64
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/23.5 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 138741 files and directories currently installed.)
Unpacking linux-image-3.2.0-4-amd64 (from .../linux-image-3.2.0-4-amd64_3.2.63-2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-4-amd64_3.2.63-2_amd64.deb (--unpack):
 cannot copy extracted data for './lib/modules/3.2.0-4-amd64/kernel/fs/ocfs2/ocfs2.ko' to '/lib/modules/3.2.0-4-amd64/kernel/fs/ocfs2/ocfs2.ko.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
Selecting previously unselected package linux-image-amd64.
Unpacking linux-image-amd64 (from .../linux-image-amd64_3.2+46_amd64.deb) ...
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.2.0-4-amd64_3.2.63-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
It says no more room left, so i checked the partitions, they seem fine to me. The error doesn't mention how much more space would be needed either.
Code:
root@Debian:~# df -h
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  323M  229M   78M  75% /
udev                                                     10M     0   10M   0% /dev
tmpfs                                                   183M  588K  182M   1% /run
/dev/disk/by-uuid/335223f0-430c-4368-a070-1cdd91c9c3f8  323M  229M   78M  75% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                   1.1G   88K  1.1G   1% /run/shm
/dev/sda6                                               2.8G  619M  2.1G  24% /home
/dev/sda8                                               369M   17M  333M   5% /tmp
/dev/sda5                                               8.3G  3.7G  4.3G  47% /usr
/dev/sda9                                               444G   77G  344G  19% /var
A little brute force
Code:
root@Debian:~# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-image-3.2.0-4-amd64
Suggested packages:
  linux-doc-3.2 debian-kernel-handbook
The following NEW packages will be installed:
  linux-image-3.2.0-4-amd64
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/23.5 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 138747 files and directories currently installed.)
Unpacking linux-image-3.2.0-4-amd64 (from .../linux-image-3.2.0-4-amd64_3.2.63-2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-4-amd64_3.2.63-2_amd64.deb (--unpack):
 cannot copy extracted data for './lib/modules/3.2.0-4-amd64/kernel/fs/ocfs2/ocfs2.ko' to '/lib/modules/3.2.0-4-amd64/kernel/fs/ocfs2/ocfs2.ko.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.2.0-4-amd64_3.2.63-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
The systems seems to have upgraded itself otherwise:
Code:
# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.7 (wheezy)
Release:	7.7
Codename:	wheezy
# cat /etc/issue
Debian GNU/Linux 7 \n \l
So i run aptitude to fix broken packages and I have a system running Wheezy with a Squeeze kernel (?).

From the looks of it i might need to repartition to make room (Squeeze squeezed in just fine, wonder why Wheezys being so touchy on this), I am hoping theres another way out, is there?
 
Old 10-21-2014, 12:15 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Try apt-get clean to remove the old archives.
How many kernel images do you have installed?
If you have 2 then remove the oldest.
Quote:
apt-get clean
apt-get update
apt-get upgrade
apt-get dist- upgrade
If that doesn't work you'll have to get a live-cd and resize /.
 
Old 10-21-2014, 08:58 PM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
The /lib/modules/3.2.0.4-amd64 for the new kernel needs 107 MB. You only have 78 MB free space.

jlinkels
 
1 members found this post helpful.
Old 10-22-2014, 02:59 AM   #4
austinium
Member
 
Registered: Nov 2007
Location: India
Distribution: Debian Stable, Debian Testing
Posts: 219

Original Poster
Rep: Reputation: 27
Thank you jlinkels & EDDY1

@EDDY1 - i have a separate / partition, its a DI suggested partitioning scheme. I did tweak it a bit, don't really remember if thats the reason i ended up with a 323MB /
I had only one kernel in the system. So i had to remove it and then install the new one.

(Risky, yes...but it worked out in the end, and i had a standby in place just in case. Boys & Girls at home - do keep a LiveCD handy and be prepared to chroot in case shit happens!)

Thanks again.

Last edited by austinium; 10-22-2014 at 03:04 AM.
 
Old 10-22-2014, 08:09 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Glad to know you got it working.
You may want to resize /.
I resized mine to 2Gig. Also your /home is quite small. You do realize that you have 344Gigs of unused space in /var.
 
  


Reply

Tags
debian squeeze, debian stable, upgrade


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
debian apt-get upgrade gone bad, missing command files, /dev error? lxa2xjj Linux - Software 3 03-05-2010 05:04 AM
apt-get upgrade left initramfs-tools config broken nbn792 Debian 6 09-06-2008 09:38 PM
debian apt-get upgrade error strattonbrazil Debian 4 11-17-2005 06:52 AM
xmms broken after apt-get dist-upgrade dbkluck Debian 3 11-04-2003 08:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration