initrd neu erstellen und auslesen bzw. per Hand editieren

Ein neuer Tag, ein neues Problem.

Mainboard ist abgeraucht, und ein neues musste her. Das alte Mainboard hatte einen Nvidia Chip auf dem Mainboard. Da denkt man sich „puh – Linux… Mainboard also einfach umbauen“. HAH! Vonwegen.

Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

Lange gesucht, /etc/fstab etc. durchstöbert … NICHTS

Also packen wir mal das initrd wie folgt aus:

mkdir /tmp/initrd
cd /tmp/initrd
gzip -cd /boot/initrd-2.6.18-1.2798.fc6.img | cpio -imd --quiet

in der Datei im /tmp/initrd/init findet sich das übel. Der NV SATA Treiber wird noch geladen und führt dazu, dass die Festplatte nicht angesprochen werden kann.

insmod /lib/sata_nv.ko

Also entfernt, und mit folgendem Befehl wieder zusammengeschnürt:

cd /tmp/initrd
mv /boot/initrd-2.6.18-1.2798.fc6.img boot/initrd-2.6.18-1.2798.fc6.img.bak
find . | cpio -co | gzip -9 > /boot/initrd-2.6.18-1.2798.fc6.img

Das ganze kann man sich auch vereinfachen, indem man einfach ein neues File baut. Ihr benötigt dazu Knoppix oder ein anderes Rescuesystem

mount /dev/sdb2 /mnt # / mounten
mount /dev/sdb1 /mnt/boot #/boot mounten
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash
mv initrd-2.6.18-1.2798.fc6.img initrd-2.6.18-1.2798.fc6.img.old
mkinitrd initrd-2.6.18-1.2798.fc6.img 2.6.18-1.2798.fc6

BAM läuft!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Pflichtfelder sind mit * gekennzeichnet.

*
*
Du kannst folgende <abbr title="HyperText Markup Language">HTML</abbr>-Tags und -Attribute verwenden: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>