Das hat mal vom rumspielen mit Kernels

Hi,

ich hatte vor kurzem nen Kernel gebaut, der in der Version 2.6.24.3 hieß. Jetzt kann ich Synaptic nicht mehr benutzen, weil der immer rummeckert und sagt ich soll folgendes machen:

Code:
mathias@apprentice:~$ sudo dpkg --configure -a
Password or swipe finger: 
Setting up initramfs-tools (0.85eubuntu39.2) ...
update-initramfs: deferring update (trigger activated)

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.24.3
Cannot find /lib/modules/2.6.24.3
update-initramfs: failed for /boot/initrd.img-2.6.24.3
dpkg: subprocess post-installation script returned error exit status 1
mathias@apprentice:~$


Wie kann ich das reparieren?

cu
serow
 
Original von Serow
Code:
Cannot find /lib/modules/2.6.24.3
Das ist wohl das Problem... Woher hast du den Kernel denn? Speichert der Kernel die Module vielleicht irgendwoanders, also einfach mal nach modules/2.6.24.3 suchen?
 
allgemein zum Thema "Was tun, wenn der neue Kernel nicht macht, was er soll"
wenn du schlau warst, hast du nicht gleich den anderen Kernel gelöscht... im GRUB-Bootloader sollten jetzt beide Kernel zur Verfügung stehen (wenn nicht, musst du den anderen halt per Hand wieder in die /boot/grub/menu.lst eintragen).

Starte von dem anderen Kernel, da geht dann alles wieder wie gewohnt...

speziell zu deinem Problem:
es scheint, als hättest du die Module nicht mit gebaut....

Erzähl mal, wie du der Reihe nach den Kernel gebaut hast?

Normalerweise machst du es, nachdem du mit make menuconfig deinen Kernel zusammengestellt hast entweder "the debian way" mit make-kpkg
http://www.systemengineers.de/linux/debian/kernel-backen-the-debian-way

oder eben
Code:
make
make modules
make modules_install
make install
 
So in etwa:

cd /usr/srv
tar xvf linux-source...
ln .... linux
cd linux
cp /boot/config... .config
make oldconfig
make xconfig

und dann irgendein befehl den ich mir irgendwo abgeguckt hab um direkt DEBs zu bauen.

Der Kernel lief nicht. Dann hab ich den alten gebootet und den neuen per apt-get remove entfernt. Seitdem obiger Fehler.
 
wenn du den alten Kernel bootest und den neuen entfernt hast, dann SOLLTE er auch dessen Module nur noch finden und nichts mehr von 2.6.24.3 suchen ....

poste mal die /boot/grub/menu.lst und eine Ausgabe von
Code:
ls -l /boot

evtl. ist irgendwas doch noch nicht richtig entfernt
 
Jo kein Problem:

Code:
mathias@apprentice:~$ cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=95456914-b187-41ea-9030-4066414f1ef2 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu 8.04.1, kernel 2.6.24-21-generic
root		(hd0,0)
kernel		/vmlinuz-2.6.24-21-generic root=UUID=95456914-b187-41ea-9030-4066414f1ef2 ro
initrd		/initrd.img-2.6.24-21-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.24-21-generic root=UUID=95456914-b187-41ea-9030-4066414f1ef2 ro single
initrd		/initrd.img-2.6.24-21-generic

title		Ubuntu 8.04.1, kernel 2.6.24-19-generic
root		(hd0,0)
kernel		/vmlinuz-2.6.24-19-generic root=UUID=95456914-b187-41ea-9030-4066414f1ef2 ro
initrd		/initrd.img-2.6.24-19-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.24-19-generic root=UUID=95456914-b187-41ea-9030-4066414f1ef2 ro single
initrd		/initrd.img-2.6.24-19-generic

title		Ubuntu 8.04.1, memtest86+
root		(hd0,0)
kernel		/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST
mathias@apprentice:~$

Code:
mathias@apprentice:~$ ls -l /boot
total 37758
-rw-r--r-- 1 root root  420224 2008-08-21 00:15 abi-2.6.24-19-generic
-rw-r--r-- 1 root root  420338 2008-08-25 21:39 abi-2.6.24-21-generic
-rw-r--r-- 1 root root   74164 2008-08-21 00:15 config-2.6.24-19-generic
-rw-r--r-- 1 root root   74188 2008-08-25 21:39 config-2.6.24-21-generic
drwxr-xr-x 2 root  999    1024 2008-09-29 13:23 grub
-rw-r--r-- 1 root root 7900965 2008-09-30 12:49 initrd.img-2.6.24-19-generic
-rw-r--r-- 1 root root 7736932 2008-09-26 20:23 initrd.img-2.6.24-19-generic.bak
-rw-r--r-- 1 root root 7903227 2008-09-30 12:48 initrd.img-2.6.24-21-generic
-rw-r--r-- 1 root root 7740567 2008-09-26 21:31 initrd.img-2.6.24-21-generic.bak
drwx------ 2 root root    1024 2008-09-29 15:20 lost+found
-rw-r--r-- 1 root root  103204 2007-09-28 13:03 memtest86+.bin
-rw-r--r-- 1 root root 1152364 2008-08-21 00:15 System.map-2.6.24-19-generic
-rw-r--r-- 1 root root 1152893 2008-08-25 21:39 System.map-2.6.24-21-generic
-rw-r--r-- 1 root root 1903096 2008-08-21 00:15 vmlinuz-2.6.24-19-generic
-rw-r--r-- 1 root root 1905624 2008-08-25 21:39 vmlinuz-2.6.24-21-generic
mathias@apprentice:~$
 
okay, auf den ersten Blick kann ich da nix ungewöhnliches erkennen....

versuch mal - falls das das Paketmanagement in aktuellem Zustand (zwecks teilweise unkonfigurierten Paketen und so) mit macht - folgendes:

Code:
sudo apt-get remove --purge initramfs-tools
durch --purge wird Paket incl. aller Configs entfernt

dann dein
Code:
sudo dpkg --configure -a

und dann kannst du initramfs-tools wieder installieren
Code:
sudo apt-get install initramfs-tools

wenn selbst das nicht hilft (wenn sich apt weigert), dann musst du das Paket direkt mit dpkg entfernen - da gibt es verschiedene force-Parameter, welche in den manpages oder mit sudo dpkg --force-help alle beschrieben sind...
damit kannst du dann Pakete trotz irgendwelcher nicht erfüllten Abhängigkeiten etc. installieren oder deinstallieren
Da solltest du dann aber schon wissen was du machst... also wirklich nur im Notfall mit Bedacht einsetzen!
 
Hi,

also mit apt-get gings nicht. Dann hab ich folgendes gemacht:

Code:
sudo dpkg --force depends --remove initramfs-tools
sudo dpkg --configure -a
sudo apt-get install initramfs-tools

Ergebnis:
Code:
mathias@apprentice:~$ sudo apt-get install initramfs-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libmono-cairo2.0-cil libevolution3.0-cil libsilc-1.1-2
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  initramfs-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/66.9kB of archives.
After this operation, 381kB of additional disk space will be used.
Selecting previously deselected package initramfs-tools.
(Reading database ... 96150 files and directories currently installed.)
Unpacking initramfs-tools (from .../initramfs-tools_0.85eubuntu39.2_all.deb) ...
Setting up initramfs-tools (0.85eubuntu39.2) ...
update-initramfs: deferring update (trigger activated)

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.24.3
Cannot find /lib/modules/2.6.24.3
update-initramfs: failed for /boot/initrd.img-2.6.24.3
dpkg: subprocess post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (2)
mathias@apprentice:~$

Es hat also nichts gebracht. War das das, was du von mir wolltest?

cu
serow
 
Hi,

seltsamer weise beides garnix:
Code:
mathias@apprentice:~$ sudo dpkg -l | grep "2.6.24.3"
mathias@apprentice:~$ ls -lh /boot | grep "2.6.24.3"
mathias@apprentice:~$

Wo hat er den Unfug mit dem 2.6.24.3 her??
 
Wie sieht der Inhalt von /var/lib/initramfs-tools aus? Dort liegt vermutlich noch eine Konfiguration für deinen Eigenbau-Kernel.
 
Code:
mathias@apprentice:/var/lib/initramfs-tools$ ls -l
total 12
-rw-r--r-- 1 root root 77 2008-09-30 12:49 2.6.24-19-generic
-rw-r--r-- 1 root root 77 2008-09-30 20:51 2.6.24-21-generic
-rw-r--r-- 1 root root 68 2008-09-28 18:20 2.6.24.3
mathias@apprentice:/var/lib/initramfs-tools$

Was Kernel angeht bin ich jetzt etwas vorsichtig, deshalb frag ich erstmal: Soll ich das File 2.6.24.3 löschen?
 
Kannst es ja zur Sicherheit erstmal von dort verschieben. Da aber kein Kernel dafür mehr installiert ist, kannst du sie theoretisch auch löschen.
 
Zurück
Oben