LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Squeeze upgrade causes kernel mess (https://www.linuxquestions.org/questions/debian-26/squeeze-upgrade-causes-kernel-mess-862479/)

pljvaldez 02-13-2011 05:54 PM

Squeeze upgrade causes kernel mess
 
Finally ran the upgrade from lenny to squeeze and ran into a few issues. I have to admit this is the first dist-upgrade I've ever had go this badly (kernel issues, xorg issues, mysql transition problems, mythtv... Yikes!).

Anyway, the first problem I'm trying to fix is getting dpkg to like the new squeeze kernel. Here's the errors
Code:

                                      Errors were encountered while processing:
 linux-image-2.6.32-5-686
 mysql-server-5.1
 linux-image-2.6-686
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up linux-image-2.6.32-5-686 (2.6.32-30) ...
Running depmod.
Running update-initramfs.
Illegal option -m
Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k [version]  Specify kernel version or 'all'
 -c            Create a new initramfs
 -u            Update an existing initramfs
 -d            Remove an existing initramfs
 -t            Take over a custom initramfs with this one
 -b            Set alternate boot directory
 -v            Be verbose
 -h            This message

update-initramfs failed to create initrd image.
Failed to create initrd image.
dpkg: error processing linux-image-2.6.32-5-686 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-2.6-686:
 linux-image-2.6-686 depends on linux-image-2.6.32-5-686; however:
  Package linux-image-2.6.32-5-686 is not configured yet.
dpkg: error processing linux-image-2.6-686 (--configure):
 dependency problems - leaving unconfigured
Setting up mysql-server-5.1 (5.1.49-3) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-2.6.32-5-686
 linux-image-2.6-686
 mysql-server-5.1
                                       
Current status: 17520 new [-2].

Now, I manually ran update-initramfs with the proper options and generated an acceptable initramfs. So I can boot into the kernel just fine. But apt-get is all mangled and spits errors at me. It appears there's an invalid switch problem in the install script (at least that's how I interpret the error, especially since I could build the initramfs manually). Any ideas on how to fix this?

EDDY1 02-13-2011 10:30 PM

Maybe you can use aptitude to get apt-get dependencies
Try "aptitude update"

cynwulf 02-14-2011 07:18 AM

Did you read the release notes?

The usual procedure for Lenny -> Squeeze is:

1) change sources
2) upgrade kernel, apt, dpkg and aptitude
3) reboot into new kernel
4) upgrade using "apt-get dist-upgrade" (now the recommended upgrade method)
5) fiddle with dependencies purging troublesome or obsolete packages and doing "aptitude -f install" along the way until done.

Again... release notes.

pljvaldez 02-14-2011 11:00 AM

Quote:

Originally Posted by Caravel (Post 4257860)
Did you read the release notes?

The usual procedure for Lenny -> Squeeze is:

1) change sources
2) upgrade kernel, apt, dpkg and aptitude
3) reboot into new kernel
4) upgrade using "apt-get dist-upgrade" (now the recommended upgrade method)
5) fiddle with dependencies purging troublesome or obsolete packages and doing "aptitude -f install" along the way until done.

Again... release notes.

Yes, I read the release notes and followed them. That's why I'm asking the question. I had not thought to run aptitude because in the past I was told not to mix the two tools. I used aptitude for lenny, but obviously moved to apt-get for the dist-upgrade and figured I'd stick with it. I'll try seeing if aptitude can resolve the problem.

My concern is the error message, which seems to hint at an invalid switch being passed to initramfs. I can't imagine Debian releasing the default kernel with an error like that in the install script...

pljvaldez 02-14-2011 10:05 PM

I tried using aptitude when I got home, still no dice. The error still remains the same for both aptitude and apt-get. I'm tempted to purge both and then reinstall. Does anyone know what happens if you purge a running kernel? I don't have a separate kernel and would hate to hose up my system.

EDDY1 02-14-2011 11:27 PM

Before I would do anything else I'd probably backup whatever I have.
Are you using Aptitude GUI?
The Gui will show you all the keeps, upgrades in other words it'll make suggestions.
Gui version is also available thru consoles.

pljvaldez 02-15-2011 10:40 AM

I haven't ever used the gui, but I'll check it out when I get home. I'm skeptical that it will do anything differently since it appears to be failing at the end of the install (i.e. the package is installing fine until the point where it needs to create the initramfs).

m_yates 02-15-2011 10:52 AM

Look at /etc/kernel-img.conf

Here is what mine looks like on Debian Squeeze:
Code:

# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

According to this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528176, older versions of Debian had a line using cramfs that resulted in a similar error to what you see. If you delete that line, you may be able to re-install the kernel image through apt or aptitude.

EDDY1 02-15-2011 12:15 PM

To use aptitude just open console and enter command "aptitude"

pljvaldez 02-15-2011 10:34 PM

Quote:

Originally Posted by m_yates (Post 4259260)
Look at /etc/kernel-img.conf

Here is what mine looks like on Debian Squeeze:
Code:

# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

According to this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528176, older versions of Debian had a line using cramfs that resulted in a similar error to what you see. If you delete that line, you may be able to re-install the kernel image through apt or aptitude.

Thanks! That was it. This particular install has been dist-upgraded over the years from Woody (3.0) on up. It's even been transplanted from hardware to hardware (and transferred drives using dd) a few times and I've never had to reinstall. So that line about cramfs was still in my kernel-img.conf file.

I guess I need to work on my google skills some more... :D


All times are GMT -5. The time now is 08:48 AM.