Problem upgrading kernel on debian 3.1
- by exhuma
Hi, I have a quite old box in a remote server farm. So I have no direct access. Only remote SSH (and via SSH to a serial console). I haven't updated this box in ages. Now, whenever I want to install a new package, a dependency to glibc appears. Unfortunately, the install of glibc depends on a 2.6 kernel and I am running a venerable 2.4 kernel (one more reason to upgrade).
The problem is, that the install of a new kernel has an indirect (over locales) dependency to glibc. So, to install glibc, I need a new kernel. For a new kernel, I need to upgrade glibc. Essentially I am blocked. What's the best way to proceed considering I have no "hardware" access?
Here's a quick transcript of the upgrade process:
[green:~]% sudo aptitude install linux-image-686
Reading Package Lists... Done
Building Dependency Tree
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages are unused and will be REMOVED:
gcc-4.3-base
The following NEW packages will be automatically installed:
dash libc6-i686 libparse-recdescent-perl linux-image-2.6-686
linux-image-2.6.18-6-686 module-init-tools yaird
The following packages have been kept back:
adduser apache2 apache2-mpm-prefork apache2-utils apache2.2-common apt
apt-utils aptitude autoconf autotools-dev awstats base-files base-passwd
[...snip...]
util-linux vacation vim vim-common wamerican wbritish wget whiptail whois
wwwconfig-common zlib1g
The following NEW packages will be installed:
dash libc6-i686 libparse-recdescent-perl linux-image-2.6-686
linux-image-2.6.18-6-686 linux-image-686 module-init-tools yaird
The following packages will be upgraded:
hotplug libc6
2 packages upgraded, 8 newly installed, 1 to remove and 277 not upgraded.
Need to get 0B/22.7MB of archives. After unpacking 52.1MB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Preconfiguring packages ...
(Reading database ... 34065 files and directories currently installed.)
Preparing to replace libc6 2.3.6.ds1-13 (using .../libc6_2.7-18lenny2_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: init script for postgresql not found.
[ --- libc6 config screen appears here --- ]
WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.
The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18lenny2_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18lenny2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ack! Something bad happened while installing packages. Trying to recover:
dpkg: dependency problems prevent configuration of locales:
locales depends on glibc-2.7-1; however:
Package glibc-2.7-1 is not installed.
dpkg: error processing locales (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
locales
Reading Package Lists... Done
Building Dependency Tree
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Now, if I follow the instrunctions as promted I get the following. Note that I am using aptitude instead of apt-get to benefit from the better dependency tracking. I did try with apt-get first. But that let me to the same problem.
[green:~]% sudo aptitude install -t etch linux-image-2.6.26-2-686
Reading Package Lists... Done
Building Dependency Tree
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
E: Unable to correct problems, you have held broken packages.
E: Unable to correct dependencies, some packages cannot be installed
E: Unable to resolve some dependencies!
Some packages had unmet dependencies. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following packages have unmet dependencies:
linux-image-2.6.26-2-686: Depends: initramfs-tools (>= 0.55) but it is not installable or
yaird (>= 0.0.13) but it is not installable or
linux-initramfs-tool which is a virtual package.
Any ideas?