Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] initramfs - kernel panic - kein initram FS?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 2:07 pm    Post subject: [solved] initramfs - kernel panic - kein initram FS? Reply with quote

Hello,

ich habe Gentoo mit LVM2 und DM-Crypt installiert und zwar nach dieser Anleitung: http://en.gentoo-wiki.com/wiki/Root_filesystem_over_LVM2,_DM-Crypt_and_RAID. Die RAID Option habe ich einfach weggelassen.

Nachdem ich das dm-crypt Passwort eingebe, bekomme ich folgende Fehlermeldung:
Code:
Unable to make device node for 'vg-root'
/dev/mapper/vg-root: open failed: No such file or directory
   2 logical volume(s) in volume group "vg" now active
mount: mounting /dev/mapper/vg-root on /newroot failed: No such file or directory

BusyBox v1.15.3 (2010-09-30 15:49:47 CEST) multi-call binary

Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

Options:
        -c DEV  Reopen stdio to DEV after switch

[   15.233541] Kernel panic - not syncing: Attempted to kill init!
[   15.233787] Pid: 1, comm: busybox Not tainted 2.6.35-gentoo-r9 #3
[   15.234030] Call Trace:
[   15.234288]  [<ffffffff81569116>] panic+0xa0/0x152

Danach friert der Bildschirm ein.

Meine System Settings:
Quote:
Kernel: 2.6.35-gentoo-r10

Partitions:
/dev/sda1 --> Windows 7
/dev/sda2 --> Windows 7
/dev/sda3 --> boot (Gentoo)
/dev/sda4 --> system (Gentoo) The whole sda4 partition is a Volumegroup called VG and it is encrypted. This VG has two LVs (swap and root).

Meine fstab:
Code:
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

/dev/sda3               /boot           ext2            defaults,noatime        1 2
/dev/mapper/vg-root             /               ext4            noatime         0 1
/dev/mapper/vg-swap             none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

Meine grub.conf:
Code:
default 0
timeout 3
splashimage=(hd0,2)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.35-gentoo-r10
root (hd0,2)
kernel /boot/kernel-2.6.35-gentoo-r10
initrd /boot/initramfs


title Windows 7
rootnoverify (hd0,0)
makeactive
chainloader +1

Meine jetzige init:
Code:
#!/bin/busybox sh

mount -t proc proc /proc
CMDLINE=`cat /proc/cmdline`

mount -t sysfs sysfs /sys

#wait a little to avoid trailing kernel output
sleep 3

#If you don't have a qwerty keyboard, uncomment the next line
loadkmap < /etc/kmap-de

#If you have a msg, show it:
cat /etc/msg

#dm-crypt
/bin/cryptsetup luksOpen /dev/sda4 vault

sleep 2

#lvm
#/bin/vgscan
/bin/vgchange -ay vg

sleep 2

#root filesystem
mount -r /dev/mapper/vg-root /newroot

#unmount pseudo FS
umount /sys
umount /proc
#umount /dev

#root switch
#exec /bin/busybox switch_root /newroot /sbin/init ${CMDLINE}
exec switch_root /newroot /sbin/init

Meine vorherige init:
Code:
#!/bin/sh

mount -t proc proc /proc
CMDLINE=`cat /proc/cmdline`

mount -t sysfs sysfs /sys

#wait a little to avoid trailing kernel output
sleep 3

#If you don't have a qwerty keyboard, uncomment the next line
loadkmap < /etc/kmap-de

#If you have a msg, show it:
#cat /etc/msg

#dm-crypt
/bin/cryptsetup luksOpen /dev/sda4 vault

#lvm
#/bin/vgscan
/bin/vgchange -ay vg

#root filesystem
mount -r /dev/mapper/vg-root /newroot

#unmount pseudo FS
umount /sys
umount /proc

#root switch
exec /bin/busybox switch_root /newroot /sbin/init ${CMDLINE}

Bei der ersten Installation habe den Kernel 2.6.35-gentoo-r9 verwendet und sda4 hatte ext3 als Filesystem. Nach der neuen Installation habe ich den Kernel 2.6.35-gentoo-r10 probiert und als FS ext4 gewählt. Die Fehler blieben jedoch die selben. Ich habe busybox-1.15.3 und auch busybox-1.17.1-r1 probiert, ohne jeglichen Erfolg.

Wenn ich versuche irgendein Gerät in der initramfs zu mounten, dann findet er den Mountpoint nicht. Jedoch ist er in Wirklichkeit vorhanden. Ein ls während dem init Prozess zeigt mir diese Ornder an:
Code:
bin
dev
etc
init
newroot
proc
root
sys
var

Ich weiß nicht ob es von Bedeutung ist, aber bei vgchange -ay vg bekomme ich folgenden Output:
Code:
livecd ~ # vgchange -ay vg
  Internal error: Maps lock 14192640 < unlock 14196736
  Internal error: Maps lock 14196736 < unlock 14200832
  2 logical volume(s) in volume group "vg" now active

Das war schon bei der Installation der Fall. Im Internet habe ich gelesen, dass das kein ernst zunehmendes Problem ist. (Quelle weiß ich leider nicht mehr)

Ich hoffe ihr könnt mir weiterhelfen.
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB


Last edited by mcimaster on Sun Oct 10, 2010 10:11 pm; edited 2 times in total
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5329

PostPosted: Sun Oct 10, 2010 2:19 pm    Post subject: Reply with quote

er findet den mountpoint nicht sondern das device unter /dev/devicemapper/vg-root .
Weil die initrd wiso auch immer das device /dev/devicemapper/vg-root nicht erstellen kann.
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 2:33 pm    Post subject: Reply with quote

firefly wrote:
er findet den mountpoint nicht sondern das device unter /dev/devicemapper/vg-root .
Weil die initrd wiso auch immer das device /dev/devicemapper/vg-root nicht erstellen kann.

Was kann hierbei der Grund sein?
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5329

PostPosted: Sun Oct 10, 2010 2:43 pm    Post subject: Reply with quote

befindet sich unter /dev ein verzeichnis namens devicemapper in der initrd? Wenn nein eventuell hilft es, wenn du dieses verzeichnis erstellst.
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 3:16 pm    Post subject: Reply with quote

firefly wrote:
befindet sich unter /dev ein verzeichnis namens devicemapper in der initrd? Wenn nein eventuell hilft es, wenn du dieses verzeichnis erstellst.

Ja, /dev/mapper ist vorhanden.

EDIT: Sorry, Du meinst ja explizit devicemapper. Nein, ich werde es mal versuchen..
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 3:31 pm    Post subject: Reply with quote

Also, ich habe den Ordner erstellt. Es hat leider nichts gebracht.
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Sun Oct 10, 2010 4:12 pm    Post subject: Reply with quote

Versuch mal, das Init-Skript Stück für Stück auszuführen.

Ich denke, es hängt bei /bin/cryptsetup luksOpen /dev/sda4 vault

Ich kenne vault nicht, ich öffne es immer ohne.
Wird denn danach etwas in /dev/mapper/ angezeigt?
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 4:50 pm    Post subject: Reply with quote

Finswimmer wrote:
Versuch mal, das Init-Skript Stück für Stück auszuführen.

Ich denke, es hängt bei /bin/cryptsetup luksOpen /dev/sda4 vault

Ich kenne vault nicht, ich öffne es immer ohne.
Wird denn danach etwas in /dev/mapper/ angezeigt?


Wie kann man es ohne Argument öffnen? Ich muss doch ein Argument angeben.

In /dev/mapper befinden sich:
Code:
control
vault
vg-root -> ../dm-2
vg-swap


Kurz bevor ich mounte, mache ich ls /dev/mapper:
Code:
...
#dm-crypt
/bin/cryptsetup luksOpen /dev/sda4 vault

#lvm
#/bin/vgscan
/bin/vgchange -ay vg

ls /dev/mapper
sleep 15

#root filesystem
mount -r /dev/mapper/vg-root /newroot
...

_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Sun Oct 10, 2010 5:07 pm    Post subject: Reply with quote

Nimm doch einfach genkernel?
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 5:10 pm    Post subject: Reply with quote

root_tux_linux wrote:
Nimm doch einfach genkernel?

Was soll ich mit einem Genkernel?
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 5:47 pm    Post subject: Reply with quote

Ich bin jetzt in der init shell gelandet, um den Fehler step by step zu reproduzieren:
Code:
/ # /bin/cryptsetup luksOpen /dev/sda4 vault
Enter passphrase for /dev/sda4:
/ # /bin/vgchange -ay vg
   Unable to make device node for 'vg-root'
   /dev/mapper/vg-root: open failed: No such file or directory
   2 logical volume(s) in volume group "vg" now active
/ #

Habt ihr eine Idee, wie ich fortfahren soll?
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Sun Oct 10, 2010 5:58 pm    Post subject: Reply with quote

mcimaster wrote:

In /dev/mapper befinden sich:
Code:
control
vault
vg-root -> ../dm-2
vg-swap



Ich finde hier den Symlink auf ../dm-2 merkwürdig, das existiert sicher nicht in Deiner initram... Ich denke, hier könnte das Problem liegen.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Sun Oct 10, 2010 6:05 pm    Post subject: Reply with quote

vg-root scheint es also zu geben?
Was ist, wenn du den vgchange Schritt ignorierst?
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 6:15 pm    Post subject: Reply with quote

Finswimmer wrote:
vg-root scheint es also zu geben?
Was ist, wenn du den vgchange Schritt ignorierst?


Ja, aber vg-root ist auf ../dm-2 verlinkt.

Wenn ich vgchange auslasse, dann habe ich genau dasselbe Ergebnis, mit oder ohne.
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 6:16 pm    Post subject: Reply with quote

schachti wrote:
mcimaster wrote:

In /dev/mapper befinden sich:
Code:
control
vault
vg-root -> ../dm-2
vg-swap



Ich finde hier den Symlink auf ../dm-2 merkwürdig, das existiert sicher nicht in Deiner initram... Ich denke, hier könnte das Problem liegen.

Was könnte hier falsch sein?
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Sun Oct 10, 2010 8:23 pm    Post subject: Reply with quote

Ich vermute, beim Schritt

Code:

cp -a /dev/mapper/vg-root dev/mapper


aus der von Dir verlinkten Anleitung ist was schiefgegangen. Vor einiger Zeit waren, wenn ich mich richtig erinnere, die Eintrage unter /dev/mapper keine Symlinks auf /dev/dm-X - das hat sich scheinbar geändert, und Du hast nun einen Symlink auf eine (an dieser Stelle nicht existierende) Gerätedatei anstatt der Gerätedatei selbst kopiert.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 8:37 pm    Post subject: Reply with quote

Welche ist die richtige Gerätedatei? Heißt das, das ich den Link vor dem Erstellen des initramfs erstellen muss?
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Sun Oct 10, 2010 10:05 pm    Post subject: Reply with quote

mcimaster wrote:
Ich bin jetzt in der init shell gelandet, um den Fehler step by step zu reproduzieren:
Code:
/ # /bin/cryptsetup luksOpen /dev/sda4 vault
Enter passphrase for /dev/sda4:
/ # /bin/vgchange -ay vg
   Unable to make device node for 'vg-root'
   /dev/mapper/vg-root: open failed: No such file or directory
   2 logical volume(s) in volume group "vg" now active
/ #

Habt ihr eine Idee, wie ich fortfahren soll?

Hast du strace installiert? Das wäre mal interessant:
Code:
strace -e trace=open /bin/vgchange -ay vg

_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
mcimaster
n00b
n00b


Joined: 21 Sep 2004
Posts: 71

PostPosted: Sun Oct 10, 2010 10:08 pm    Post subject: Reply with quote

Schachti hatte es erkannt. :)

Der Symlink vg-root -> ../dm-2 war tot. Das Gerät dm-2 war in meiner initramfs nicht enthalten. Jetzt habe ich alle dm-* in die intramfs kopiert und alles funkt wunderbar.

Danke für eure Hilfe!

Alles Gute und schönen Abend noch.
_________________
System: Acer TravelMate 4002LMi, Intel Pentium M 725 1,6GHz
60GB HDD, 512MB DDR, ATI Mobility Radeon 9700 64 MB
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Mon Oct 11, 2010 9:33 am    Post subject: Reply with quote

mcimaster wrote:
root_tux_linux wrote:
Nimm doch einfach genkernel?

Was soll ich mit einem Genkernel?


Dann hättest du dir das gefrickel von initramfs erspart?

http://www.gentoo.de/doc/de/genkernel.xml

Warum einfach wenns kompliziert geht :)
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum