run-init: /sbin/init: No such file or directory

C

Che'tin'oich

Jungspund
Hallo, ich hab gerade einen dummen fehler gemacht, durch ein fehlerhaftes Skript wurde (auch noch als root) rm -f in / ausgeführt. Nun kann man sich nicht mehr über SSH am Server anmelden und nach einen Neustart meldet dieser:

nach Grub und ein paar Textzeilen:
run-init: /sbin/init: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

Eigentlich wurden doch diesen Befehl drei Symlinks gelöscht:
cdrom, initrd.img und vmlinuz
Diese habe ich nun neu erstellt, jedoch bleibt der Fehler - was tun?

Ich habe über ein Live System die Festplatte gemountet und über
Code:
ln -s initrd.img /boot/initrd.img-2.6.18-5-amd64
und
Code:
ln -s vmlinuz /boot/vmlinuz-2.6.18-5-amd64
die Links neuerstellt. Die beiden Datein sind auch in /boot vorhanden

Code:
ls -l
drwxr-xr-x  2 root root  4096 Oct 24  2007 bin/
drwxr-xr-x  3 root root  4096 Sep 21  2007 boot/
lrwxrwxrwx  1 root root    11 Jun 24 15:01 cdrom -> media/cdrom/
drwxr-xr-x 11 root root 45056 Sep 20  2007 dev/
drwxr-xr-x  3 root root  4096 Sep 20  2007 emul/
drwxr-xr-x 60 root root  4096 Jun 23 20:20 etc/
drwxr-xr-x  5 root root  4096 Jun 24 13:50 home/
drwxr-xr-x  2 root root  4096 Sep 20  2007 initrd/
lrwxrwxrwx  1 root root    30 Jun 24 15:00 initrd.img -> boot/initrd.img-2.6.18-5-amd64
drwxr-xr-x 11 root root  4096 Sep 21  2007 lib/
drwx------  2 root root 16384 Sep 20  2007 lost+found/
drwxr-xr-x  3 root root  4096 Sep 20  2007 media/
drwxr-xr-x  8 root root  4096 Jan 17 09:39 mnt/
drwxr-xr-x  2 root root  4096 Sep 20  2007 opt/
drwxr-xr-x  2 root root  4096 Oct 28  2006 proc/
drwxr-xr-x  8 root root  4096 Jun 24 13:50 root/
drwxr-xr-x  2 root root  4096 Sep 21  2007 sbin/
drwxr-xr-x  2 root root  4096 Mar  7  2007 selinux/
drwxr-xr-x  2 root root  4096 Sep 20  2007 srv/
drwxr-xr-x  2 root root  4096 Jan 30  2007 sys/
drwxrwxrwt  5 root root  4096 Jun 24 13:48 tmp/
drwxr-xr-x 11 root root  4096 Oct 16  2007 usr/
drwxr-xr-x 13 root root  4096 Sep 20  2007 var/
lrwxrwxrwx  1 root root    27 Jun 24 15:01 vmlinuz -> boot/vmlinuz-2.6.18-5-amd64

In der menu.lst von Grub steht folgendes:
Code:
title		Debian GNU/Linux, kernel 2.6.18-5-amd64
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.18-5-amd64 root=/dev/hda1 ro 
initrd		/boot/initrd.img-2.6.18-5-amd64
savedefault

title		Debian GNU/Linux, kernel 2.6.18-5-amd64 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.18-5-amd64 root=/dev/hda1 ro single
initrd		/boot/initrd.img-2.6.18-5-amd64
savedefault

### END DEBIAN AUTOMAGIC KERNELS LIST

Nachtrag:
noch die fstab:
Code:
aufs / aufs defaults 0 0 # AutoUpdate
devpts /dev/pts devpts gid=5,mode=620 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate
/dev/hda1 /mnt/hda1 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/hda2 /mnt/hda2 swap auto,defaults 0 0 # AutoUpdate
/dev/hda3 /mnt/hda3 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/hdb1 /mnt/hdb1 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/hdc1 /mnt/hdc1 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda1 /mnt/sda1 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/md0 /mnt/md0 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sdc1 /mnt/sdc1 vfat auto,noatime,users,suid,dev,exec,quiet,umask=0,check=s,shortname=mixed 0 0 # AutoUpdate
/dev/fd0 /mnt/floppy vfat noauto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
 
Zuletzt bearbeitet:
Gibts denn die Datei

Code:
/sbin/init
?

riecht streng nach Neuinstallation ...:D
 
ja die gibt es, eine Neuinstalltion wäre ungünstig
 
Eigentlich wurden doch diesen Befehl drei Symlinks gelöscht:
cdrom, initrd.img und vmlinuz

Eigentlich hast du Recht, von welcher Distribution sprechen wie hier?

Debian oder Ubuntu oder Knoppix oder.....?
 
Debian 4.0 AMD64
Könnte es daran liegen das ich die symlinks mit einem 32bit LiveSystem erstellt habe?
 
Gibt es unter dem Livesystem eine /mnt/hda1/sbin/init ?
 
In Bezug auf Post #3, beantworte ich dir nun mal die Frage des TEs.
Ja die gibt es.

greetings
 
Ich hab die Symlinks jetzt nochmal in Rescuemode mit der Debian 4.0 AMD64 CD neuerstellt, bringt leider auch nichts.

Evtl. kann jemand mit diesem Fehler etwas anfangen:
http://img3.imagebanana.com/img/ccdyzuw/thumb/DSC00441.JPG

Gibt es unter dem Livesystem eine /mnt/hda1/sbin/init ?
Ja gibt es:
bt ~ # cd /mnt/hda1/sbin/
bt sbin # ls -l
total 4096
...
-rwxr-xr-x 1 root root 66856 Mar 18 2006 ifconfig*
-rwxr-xr-x 2 root root 31992 Sep 28 2006 ifdown*
-rwxr-xr-x 2 root root 31992 Sep 28 2006 ifup*
-rwxr-xr-x 1 root root 37720 Jan 30 2007 init*
...
 
Zuletzt bearbeitet:
da dürft dir irgendwie eine wichtige systemdatei fehlen btw. dürfte die nicht korrekt sein.
Ich glaub die Fehlersuche würde viel zu lange dauern. da wäre neuaufsetzen "wirtschaftlich" korrekter.
 
Hmm ärgerlich, vorschlag wie ich das am besten mache, ohne die ganzen Einstellungen zuüberschreiben?
 
Moment mal......

Poste mal vor dem worst-case (Neuinstallation....) die Ausgabe von

Code:
file /sbin/init

und vor allem von

Code:
ls -alh /boot
 
(siehe meinen nächsten beitrag)
 
Zuletzt bearbeitet:
bt hda1 # ls -alh /boot
total 6.0M
drwxrwxrwx 6 root root 4.0K May 6 00:28 ./
drwxr-xr-x 27 root root 260 Jun 25 11:25 ../
-rwxrwxrwx 1 root root 1.7K Dec 8 2007 bootinst.bat*
-rwxrwxrwx 1 root root 2.1K Dec 8 2007 bootinst.sh*
-rwxrwxrwx 1 root root 2.4K Dec 8 2007 bootlilo.sh*
-rwxrwxrwx 1 root root 3.6K Dec 8 2007 chain.c32*
drwxrwxrwx 2 root root 4.0K May 6 00:28 dos/
-rwxrwxrwx 1 root root 1.9M Nov 8 2007 initrd.gz*
drwxrwxrwx 2 root root 4.0K May 6 00:28 isolinux/
drwxrwxrwx 2 root root 4.0K May 6 00:28 modules/
-rwxrwxrwx 1 root root 93K Dec 8 2007 mt86p*
drwxrwxrwx 2 root root 4.0K May 6 00:28 syslinux/
-rwxrwxrwx 1 root root 112K Dec 8 2007 vesamenu.c32*
-rwxrwxrwx 1 root root 3.9M Dec 8 2007 vmlinuz*

Häh?

Hast du nicht vorhin deine /boot/grub/menu.lst gepostet?

In der menu.lst von Grub steht folgendes:
Code:

title Debian GNU/Linux, kernel 2.6.18-5-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-amd64 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.18-5-amd64
savedefault

title Debian GNU/Linux, kernel 2.6.18-5-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-amd64 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.18-5-amd64
savedefault

### END DEBIAN AUTOMAGIC KERNELS LIST

Ich sehe von der bzw von grub generell nichts mehr hier? Auch von deinem erwähnten kernel (rot markiert oben) nichts mehr....

Also ich hab keine Ahnung was du noch alles gemacht hast, aber das hier kann schon mal nicht hinhauen......

Versuch mal grub mit einer live-cd neu zu installieren (grub-install .....) und konfiguriere dann gleich die menu.lst entsprechend.

Bist du dir auch wirklich sicher, nur ein

Code:
rm -f /

gemacht zu haben? Das von oben sieht nämlich nicht so aus.....
 
Wie geschrieben war es die falsche Ausgabe, halt die vom LiveSystem. Hier nun die richtigen:
bt hda1 # ls -alh boot
total 13M
drwxr-xr-x 3 root root 4.0K Sep 21 2007 ./
drwxr-xr-x 23 root root 4.0K Jun 25 09:31 ../
-rw-r--r-- 1 root root 951K Jun 1 2007 System.map-2.6.18-5-amd64
-rw-r--r-- 1 root root 64K May 31 2007 config-2.6.18-5-amd64
drwxr-xr-x 2 root root 4.0K Sep 20 2007 grub/
-rw-r--r-- 1 root root 5.1M Sep 21 2007 initrd.img-2.6.18-5-amd64
-rw-r--r-- 1 root root 4.8M Sep 20 2007 initrd.img-2.6.18-5-amd64.bak
-rw-r--r-- 1 root root 1.5M Jun 1 2007 vmlinuz-2.6.18-5-amd64

bt hda1 # file sbin/init
sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), stripped
 
Häng mal an deine Kernel-Zeile beim Booten (oder in der menu.lst) noch ein

Code:
init=/sbin/init

wenn das auch nicht klappt, bin ich mit meinem Latein am Ende.

P.S.:

Poste dann bei Nicht-Erfolg mindestens die letzten 5 Zeilen auf dem Screen hier.
 
ändert nichts - gleicher Fehler :(
danke trotzdem für eure Hilfe - werde jetzt Debian drüberinstallieren
 
Zuletzt bearbeitet:

Ähnliche Themen

Logon Script via User oder Group funkzioniert nicht

Chroot: No such file or directory?

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

Eigener Multiboot USB Stick - scheitert schon an GRUB 2

Festplatte stirbt, dd funktioniert nicht

Zurück
Oben