• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[Gelöst] Kernel panic - not syncing: VFS: Cannot open root d

gehrke

Administrator
Teammitglied
Moin *

Evtl. nach einem Kernel-Update (OpenSUSE 12.3) via 'Apper' gestern startet meine Büchse heute nicht mehr:
Code:
[    0.2I8... ] Initramfs unpacking failed: read error
[    0.492... ] Kernel panic - not syncing: VFS: Cannot open root device "mapper/system-os2" or unknown-block(0,0)
Eigentlich sah die Planung der Regierung für den heutigen Samstag etwas anderes vor. Au weia, das gibt wieder Mecker!

Ich versuche mal, mit 'nem Live-Stick mehr heraus zu finden...
 

RME

Advanced Hacker
Hallo,

Hast Du womöglich zuwenig Platz in "/boot"?

Versuch:
Code:
/sbin/mkinitrd -k /boot/vmlinuz-3.7.10-1.11-desktop -i /boot/initrd-3.7.10-1.11-desktop
("3.7.10-1.11-desktop" für Deine Situation anpassen)

Du musst dann vermutlich alte Kernel de-installieren...?

Gruss,
Roland
 
OP
gehrke

gehrke

Administrator
Teammitglied
RME schrieb:
Hast Du womöglich zuwenig Platz in "/boot"?
Exakt.

Bin jetzt mit einem Live-Stick drauf:
Code:
user@debian:~$ sudo passwd root
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

user@debian:~$ su
Password: 

root@debian:/home/user# mount /dev/sda1 sda1

root@debian:/home/user# ls -ltar sda1
total 139508
drwx------  2 root root    12288 Aug 29  2011 lost+found
-rw-r--r--  1 root root     1484 Feb 26 14:34 boot.readme
-rw-r--r--  1 root root   131335 Feb 27 13:59 config-3.4.33-2.24-desktop
-rw-r--r--  1 root root  2490431 Feb 27 14:58 System.map-3.4.33-2.24-desktop
-rw-r--r--  1 root root  4924144 Feb 27 14:58 vmlinuz-3.4.33-2.24-desktop
-rw-r--r--  1 root root  5725835 Feb 27 15:09 vmlinux-3.4.33-2.24-desktop.gz
-rw-r--r--  1 root root      516 Feb 27 15:09 sysctl.conf-3.4.33-2.24-desktop
-rw-r--r--  1 root root   222481 Feb 27 15:09 symvers-3.4.33-2.24-desktop.gz
lrwxrwxrwx  1 root root        5 Mar  6 11:41 grub2-efi -> grub2
drwxr-xr-x  2 root root     1024 Mar 17 14:08 grub
lrwxrwxrwx  1 root root        1 Mar 17 14:08 boot -> .
-rw-------  1 root root      512 Mar 17 14:12 backup_mbr
-rw-r--r--  1 root root   136057 Apr 19 13:43 config-3.7.10-1.4-desktop
-rw-r--r--  1 root root  2532324 Apr 19 14:25 System.map-3.7.10-1.4-desktop
-rw-r--r--  1 root root  5815095 Apr 19 14:32 vmlinux-3.7.10-1.4-desktop.gz
-rw-r--r--  1 root root      516 Apr 19 14:32 sysctl.conf-3.7.10-1.4-desktop
-rw-r--r--  1 root root   241474 Apr 19 14:32 symvers-3.7.10-1.4-desktop.gz
-rw-r--r--  1 root root  4999736 Apr 19 15:41 vmlinuz-3.7.10-1.4-desktop
-rw-r--r--  1 root root   136018 May 25 07:05 config-3.7.10-1.11-desktop
-rw-r--r--  1 root root  2531845 May 25 07:48 System.map-3.7.10-1.11-desktop
-rw-r--r--  1 root root  5814310 May 25 07:57 vmlinux-3.7.10-1.11-desktop.gz
-rw-r--r--  1 root root      516 May 25 07:58 sysctl.conf-3.7.10-1.11-desktop
-rw-r--r--  1 root root   241451 May 25 07:58 symvers-3.7.10-1.11-desktop.gz
-rw-r--r--  1 root root  4998808 May 25 09:33 vmlinuz-3.7.10-1.11-desktop
-rw-r--r--  1 root root   136018 Jun  7 09:12 config-3.7.10-1.16-desktop
-rw-r--r--  1 root root  2531845 Jun  7 10:17 System.map-3.7.10-1.16-desktop
-rw-r--r--  1 root root  5813683 Jun  7 10:28 vmlinux-3.7.10-1.16-desktop.gz
-rw-r--r--  1 root root      516 Jun  7 10:28 sysctl.conf-3.7.10-1.16-desktop
-rw-r--r--  1 root root   241451 Jun  7 10:28 symvers-3.7.10-1.16-desktop.gz
-rw-r--r--  1 root root  4998200 Jun  7 11:48 vmlinuz-3.7.10-1.16-desktop
-rw-r--r--  1 root root   621056 Jun  8 11:33 message
lrwxrwxrwx  1 root root       27 Jun 21 17:05 vmlinuz -> vmlinuz-3.7.10-1.16-desktop
lrwxrwxrwx  1 root root       26 Jun 21 17:05 initrd -> initrd-3.7.10-1.16-desktop
-rw-r--r--  1 root root        0 Jun 21 17:05 do_purge_kernels
drwxr-xr-x  5 root root     3072 Jun 21 17:05 .
drwxr-xr-x  7 root root     1024 Jun 21 17:07 grub2
-rw-r--r--  1 root root 33464320 Jun 21 17:08 initrd-3.7.10-1.11-desktop
-rw-r--r--  1 root root 20606976 Jun 21 17:08 initrd-3.7.10-1.16-desktop
-rw-r--r--  1 root root 33464320 Jun 21 17:08 initrd-3.7.10-1.4-desktop
drwxr-xr-x 11 user user      380 Jun 22 08:34 ..

root@debian:/home/user# df -h
Filesystem      Size  Used Avail Use% Mounted on                                                                                   
rootfs          1.4G  366M  1.1G  27% /                                                                                            
udev             10M     0   10M   0% /dev                                                                                         
tmpfs           279M  776K  278M   1% /run                                                                                         
/dev/sdb1       1.3G  1.3G     0 100% /lib/live/mount/medium                                                                       
/dev/loop0      1.1G  1.1G     0 100% /lib/live/mount/rootfs/filesystem.squashfs                                                   
tmpfs           1.4G     0  1.4G   0% /lib/live/mount/overlay                                                                      
tmpfs           1.4G     0  1.4G   0% /lib/live/mount/overlay                                                                      
aufs            1.4G  366M  1.1G  27% /                                                                                            
tmpfs           5.0M     0  5.0M   0% /run/lock                                                                                    
tmpfs           558M   80K  558M   1% /run/shm                                                                                     
/dev/sda1       152M  152M     0 100% /home/user/sda1

RME schrieb:
Du musst dann vermutlich alte Kernel de-installieren...?

Backup:
Code:
root@debian:/home/user# mkdir backup-boot; mount /dev/sdc1 backup-boot; tar -cf backup-boot/boot-20130622.tar sda1/*; umount /dev/sdc1

Ich versuche es mal mit Löschen und Reboot:
Code:
root@debian:/home/user# rm sda1/*3.7.10-1.4*
root@debian:/home/user# umount /dev/sda1
...
 

josef-wien

Ultimate Guru
Du bist jetzt in zwei Tagen der Zweite mit einer sehr großen initrd (siehe http://www.linux-club.de/viewtopic.php?f=3&t=118014). Beim Installieren des neuen Kernel hast Du offenbar die Fehlermeldung beim Erstellen der initrd nicht beachtet.

Der Kernel 3.7.10-1.11-desktop sollte nach Deiner Lösch-Aktion noch vorhanden sein, starte diesen und führe dann im laufenden System mkinitrd aus. Alternativ kannst Du vom Live-System mittels chroot in das auf der Festplatte befindliche System "wechseln" und dort mkinitrd ausführen, Anleitungen findet Du hier im Forum.
 
OP
gehrke

gehrke

Administrator
Teammitglied
josef-wien schrieb:
Beim Installieren des neuen Kernel hast Du offenbar die Fehlermeldung beim Erstellen der initrd nicht beachtet.
Hhmm, ich habe keine Fehlermeldung gesehen. AFAIR war alles grün.

josef-wien schrieb:
Der Kernel 3.7.10-1.11-desktop sollte nach Deiner Lösch-Aktion noch vorhanden sein, starte diesen und führe dann im laufenden System mkinitrd aus.
Keiner der Einträge im grub-Menü funktioniert mehr. Alle enden mit obiger Fehlermeldung.

josef-wien schrieb:
Alternativ kannst Du vom Live-System mittels chroot in das auf der Festplatte befindliche System "wechseln" und dort mkinitrd ausführen, Anleitungen findet Du hier im Forum.
Hier scheiterte mein erster Versuch leider auch. Für das chroot brauche ich - wenn ich das richtig verstanden habe - das gemountete /-Dateisystem des Zielsystems. Hierfür brauche ich in meinem Kontext sowohl LVM als auch dm-crypt. Auf der Live-Version von Wheezy ist zumindest LVM scheinbar nicht enthalten, zumindest gibt es 'pvdisplay' schon mal nicht.

Da muss ich mir wohl erst mal anderes Werkzeug besorgen. Aber jetzt soll ich gefälligst erst mal Rasen mähen, hat Mama gesagt...
 

RME

Advanced Hacker
Ich würde mit der Boot Option
Code:
init=/bin/sh
booten (da bist Du dann als root), dann

in "sda1" Platz machen (3.7.10-1.16 deinstallieren bzw. löschen),

und dann
Code:
/sbin/mkinitrd -k /boot/vmlinuz-3.7.10-1.11-desktop -i /boot/initrd-3.7.10-1.11-desktop
ausführen.

-/-
 
OP
gehrke

gehrke

Administrator
Teammitglied
RME schrieb:
Ich würde mit der Boot Option
Code:
init=/bin/sh
booten (da bist Du dann als root),

Langsam wird's peinlich. Ich habe obigen Text in dem Eintrag von '3.7.10.11-desktop' (und versuchsweise auch anderen) hinzugefügt - am Anfang und auch am Ende - aber jeder Versuch schlug mit 'kernel panic' fehl.

Vorgehensweise: Grub - Advanced options for openSUSE - Selektion - <E> - Eintrag - F10
 
OP
gehrke

gehrke

Administrator
Teammitglied
gehrke schrieb:
Hierfür brauche ich in meinem Kontext sowohl LVM als auch dm-crypt. Auf der Live-Version von Wheezy ist zumindest LVM scheinbar nicht enthalten, zumindest gibt es 'pvdisplay' schon mal nicht.

Da muss ich mir wohl erst mal anderes Werkzeug besorgen.

So, mit dem Live-Stick von OpenSUSE 12.3 geht das Einbinden problemlos (mit debian bin ich noch nicht so vertraut, wahrscheinlich wäre es damit auch irgendwie gegangen):
Code:
linux:/home/linux # cryptsetup luksOpen /dev/sda2 sda2-crypted
Enter passphrase for /dev/sda2: 

linux:/home/linux # vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "system" using metadata type lvm2

linux:/home/linux # vgchange -a y
  4 logical volume(s) in volume group "system" now active

linux:/home/linux # mkdir os2; mount /dev/system/os2 os2/
linux:/home/linux # mount /dev/sda1 os2/boot/

Jetzt kommt der spannende Teil:
Code:
linux:/home/linux # chroot os2/

linux:/> mkinitrd -k /boot/vmlinuz-3.7.10-1.11-desktop -i /boot/initrd-3.7.10-1.11-desktop 
Kernel image:   /boot/vmlinuz-3.7.10-1.11-desktop
Initrd image:   /boot/initrd-3.7.10-1.11-desktop
KMS drivers:     nouveau
device node not found
root device (/dev/dm-4) not found
umount: /sys: umount failed: No such file or directory
There was an error generating the initrd (1)

linux:/> mkinitrd -k /boot/vmlinuz-3.7.10-1.16-desktop -i /boot/initrd-3.7.10-1.16-desktop 
Kernel image:   /boot/vmlinuz-3.7.10-1.16-desktop
Initrd image:   /boot/initrd-3.7.10-1.16-desktop
KMS drivers:     nouveau
device node not found
root device (/dev/dm-4) not found
There was an error generating the initrd (1)

Bei beiden Versuchen traten Fehler auf, aber irgendwas hat er dann doch produziert:
Code:
linux:/> ls -ltar /boot/
total 93426
drwx------  2 root root    12288 Aug 30  2011 lost+found
-rw-r--r--  1 root root     1484 Feb 26 15:34 boot.readme
-rw-r--r--  1 root root   131335 Feb 27 14:59 config-3.4.33-2.24-desktop
-rw-r--r--  1 root root  2490431 Feb 27 15:58 System.map-3.4.33-2.24-desktop
-rw-r--r--  1 root root  4924144 Feb 27 15:58 vmlinuz-3.4.33-2.24-desktop
-rw-r--r--  1 root root  5725835 Feb 27 16:09 vmlinux-3.4.33-2.24-desktop.gz
-rw-r--r--  1 root root      516 Feb 27 16:09 sysctl.conf-3.4.33-2.24-desktop
-rw-r--r--  1 root root   222481 Feb 27 16:09 symvers-3.4.33-2.24-desktop.gz
lrwxrwxrwx  1 root root        5 Mar  6 12:41 grub2-efi -> grub2
drwxr-xr-x  2 root root     1024 Mar 17 15:08 grub
lrwxrwxrwx  1 root root        1 Mar 17 15:08 boot -> .
-rw-------  1 root root      512 Mar 17 15:12 backup_mbr
-rw-r--r--  1 root root   136018 May 25 09:05 config-3.7.10-1.11-desktop
-rw-r--r--  1 root root  2531845 May 25 09:48 System.map-3.7.10-1.11-desktop
-rw-r--r--  1 root root  5814310 May 25 09:57 vmlinux-3.7.10-1.11-desktop.gz
-rw-r--r--  1 root root      516 May 25 09:58 sysctl.conf-3.7.10-1.11-desktop
-rw-r--r--  1 root root   241451 May 25 09:58 symvers-3.7.10-1.11-desktop.gz
-rw-r--r--  1 root root  4998808 May 25 11:33 vmlinuz-3.7.10-1.11-desktop
-rw-r--r--  1 root root   136018 Jun  7 11:12 config-3.7.10-1.16-desktop
-rw-r--r--  1 root root  2531845 Jun  7 12:17 System.map-3.7.10-1.16-desktop
-rw-r--r--  1 root root  5813683 Jun  7 12:28 vmlinux-3.7.10-1.16-desktop.gz
-rw-r--r--  1 root root      516 Jun  7 12:28 sysctl.conf-3.7.10-1.16-desktop
-rw-r--r--  1 root root   241451 Jun  7 12:28 symvers-3.7.10-1.16-desktop.gz
-rw-r--r--  1 root root  4998200 Jun  7 13:48 vmlinuz-3.7.10-1.16-desktop
-rw-r--r--  1 root root   621056 Jun  8 13:33 message
drwxr-xr-x 24 root root     4096 Jun 21 18:49 ..
lrwxrwxrwx  1 root root       27 Jun 21 19:05 vmlinuz -> vmlinuz-3.7.10-1.16-desktop
lrwxrwxrwx  1 root root       26 Jun 21 19:05 initrd -> initrd-3.7.10-1.16-desktop
-rw-r--r--  1 root root        0 Jun 21 19:05 do_purge_kernels
drwxr-xr-x  7 root root     1024 Jun 21 19:07 grub2
-rw-r--r--  1 root root 33464320 Jun 21 19:08 initrd-3.7.10-1.11-desktop
-rw-r--r--  1 root root 20606976 Jun 21 19:08 initrd-3.7.10-1.16-desktop
drwxr-xr-x  5 root root     3072 Jun 22 11:04 .

linux:/> exit
Die beiden symlinks zeigen auf '3.7.10-1.16-desktop', daher hoffe ich jetzt, dass die Dreckskiste jetzt endlich bootet. Ich versuche das jetzt, Daumen drücken...
 
OP
gehrke

gehrke

Administrator
Teammitglied
gehrke schrieb:
Bei beiden Versuchen traten Fehler auf, aber irgendwas hat er dann doch produziert:
Code:
-rw-r--r--  1 root root 33464320 Jun 21 19:08 initrd-3.7.10-1.11-desktop
-rw-r--r--  1 root root 20606976 Jun 21 19:08 initrd-3.7.10-1.16-desktop
Nein, hat er nicht. Heute ist ja schon der 22.06. Also muss ich mich wohl doch um die Fehler kümmern...
 
OP
gehrke

gehrke

Administrator
Teammitglied
josef-wien schrieb:
gehrke schrieb:
Die Suche im Forum/Wiki scheint kaputt zu sein
Ich merke nichts davon.
Diese URL ist für mich weiterhin nicht aufrufbar:
http://yacy.linupedia.org/yacysearch.html?query=mkinitrd&verify=true&maximumRecords=10&resource=local&urlmaskfilter=.*&prefermaskfilter=&display=2&nav=all&Enter=Suchen!
 
OP
gehrke

gehrke

Administrator
Teammitglied
josef-wien schrieb:
Das ist zu wenig: http://www.linux-club.de/viewtopic.php?f=41&t=113071&#p708726

Nächster Versuch:
Code:
linux:/home/linux # mkdir os2; mount /dev/system/os2 os2/
linux:/home/linux # mount /dev/sda1 os2/boot/
linux:/home/linux # mount --bind /dev/ os2/dev/
linux:/home/linux # mount --bind /sys/ os2/sys
linux:/home/linux # mount --bind /proc/ os2/proc/
linux:/home/linux # chroot os2/
linux:/home/linux # chroot os2/
linux:/ # mkinitrd -k /boot/vmlinuz-3.7.10-1.11-desktop -i /boot/initrd-3.7.10-1.11-desktop 

Kernel image:   /boot/vmlinuz-3.7.10-1.11-desktop
Initrd image:   /boot/initrd-3.7.10-1.11-desktop
KMS drivers:     nouveau
Root device:    /dev/system/os2 (mounted on / as ext4)
enabling LUKS support for /dev/sda2 (sda2-crypted)
Kernel Modules: thermal_sys thermal processor fan ata_piix ata_generic dm-mod dm-snapshot dm-crypt scsi_dh scsi_dh_emc scsi_dh_rdac scsi_dh_alua scsi_dh_hp_sw button wmi video mxm-wmi i2c-algo-bit drm drm_kms_helper ttm nouveau xhci-hcd hid-logitech-dj linear sha256_generic cbc 
Features:       acpi dm kms plymouth block usb lvm2 luks resume.userspace resume.kernel
linux:/ # mkinitrd -k /boot/vmlinuz-3.7.10-1.16-desktop -i /boot/initrd-3.7.10-1.16-desktop

Kernel image:   /boot/vmlinuz-3.7.10-1.16-desktop
Initrd image:   /boot/initrd-3.7.10-1.16-desktop
KMS drivers:     nouveau
Root device:    /dev/system/os2 (mounted on / as ext4)
enabling LUKS support for /dev/sda2 (sda2-crypted)
Kernel Modules: thermal_sys thermal processor fan ata_piix ata_generic dm-mod dm-snapshot dm-crypt scsi_dh scsi_dh_emc scsi_dh_rdac scsi_dh_alua scsi_dh_hp_sw button wmi video mxm-wmi i2c-algo-bit drm drm_kms_helper ttm nouveau xhci-hcd hid-logitech-dj linear sha256_generic cbc 
Features:       acpi dm kms plymouth block usb lvm2 luks resume.userspace resume.kernel

Das sieht schon besser aus:
Code:
linux:/ # ls -ltar /boot/initrd*
-rw-r--r-- 1 root root  33461881 Jun 22 18:01 /boot/initrd-3.7.10-1.11-desktop
lrwxrwxrwx 1 root users       26 Jun 22 18:01 /boot/initrd -> initrd-3.7.10-1.11-desktop
-rw-r--r-- 1 root root  33463928 Jun 22 18:03 /boot/initrd-3.7.10-1.16-desktop

Nächster reboot...
 
OP
gehrke

gehrke

Administrator
Teammitglied
Alles klar, tut wieder. Habe die symlinks noch auf 3.7.10-1.16 umgebogen.

Vielen herzlichen Dank an alle, die mir hier geholfen haben!


cu, Paul
 
Oben