mount-Problem

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
codc
Posts: 97
Joined: 2004-01-08 02:55
Location: Tübingen
 

mount-Problem

Post by codc »

Moin,

ich habe meinen Rootserver mit einer eigenen Partitionierung und Sarge installiert via deboostrap installiert.
Nun hab ich ein merkwürdiges Verhalten im mounten des Systems. Zunächts ein mal die /etc/fstab:

Code: Select all

proc            /proc           proc    defaults        0       0
/dev/hda1       /boot           ext3    defaults        0       0
/dev/hda2       none            swap    sw              0       0
/dev/hda3       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda5       /usr            ext3    defaults        0       2
/dev/hda6       /tmp            ext3    defaults        0       2
/dev/hda7       /var            ext3    defaults        0       2
/dev/hda8       /home           ext3    defaults        0       2
Wenn ich da mount -a mache werden alle Devices gemountet lt. mount sind aber leer. Wenn ich allerdings per Hand auf der Konsole mit mount /var zb. var einhänge sieht das Verzeichnis normal aus.
Das ganze ist in der Rettungskonsole in einer ge-chrooteten Umgebung da die Kiste noch nicht hochkommt. Ich vermute das dieses komische Verhalten das Problem beim Booten ist den grub ist installiert und konfiguriert.

/boot/grub/menu.lst:

Code: Select all

title           Debian GNU/Linux, kernel 2.6.8-2-686
root            (hd0,0)
kernel          /vmlinuz-2.6.8-2-686 root=/dev/hda3 ro
initrd          /initrd.img-2.6.8-2-686
savedefault
boot

title           Debian GNU/Linux, kernel 2.6.8-2-686 (recovery mode)
root            (hd0,0)
kernel          /vmlinuz-2.6.8-2-686 root=/dev/hda3 ro single
initrd          /initrd.img-2.6.8-2-686
savedefault
boot
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: mount-Problem

Post by Joe User »

Ohne passender/gültiger /proc/mounts und /etc/mtab wird Dein Vorhaben, sofern ich Dich richtig verstanden habe, nicht klappen...

Code: Select all

mount
mount -afv
man mount
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
codc
Posts: 97
Joined: 2004-01-08 02:55
Location: Tübingen
 

Re: mount-Problem

Post by codc »

Boot in Rettungskonsole:

Code: Select all

/dev/ram on / type ext2 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=4,mode=620)
shm on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,devgid=14,devmode=0660)
mount /dev/hda3 /mnt

mount Ausgabe wie oben

chroot /mnt

Code: Select all

/dev/hda3 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda5 on /usr type ext3 (rw)
/dev/hda6 on /tmp type ext3 (rw)
/dev/hda7 on /var type ext3 (rw)
/dev/hda8 on /home type ext3 (rw)
proc on /proc type proc (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda5 on /usr type ext3 (rw)
/dev/hda7 on /var type ext3 (rw)
/dev/hda8 on /home type ext3 (rw)
/dev/hda3 on /mnt type ext3 (rw)
mount -afv

Code: Select all

mount: proc already mounted on /proc
mount: /dev/hda1 already mounted on /boot
mount: /dev/hda5 already mounted on /usr
mount: /dev/hda6 already mounted on /tmp
mount: /dev/hda7 already mounted on /var
mount: /dev/hda8 already mounted on /home
nothing was mounted
Die Partionen sind aber leer und erst wenn ich zb mit mount /dev/hda1 /boot manuell einhänge dann sind die Verzeichnisse korrekt.

Ich nehme an deswegen kommt die Kiste auch nicht hoch weil grub / bzw. /boot nicht lesen kann.

Irgendwie stehe ich da gerade wirklich auf dem Schlauch.

Ist der erste Rootie den ich einrichte - bisher hatte ich immer physkalischen Zugriff auf die Server und da ist das einfacher wenn man von CD booten kann und mit Netinstall installieren kann.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: mount-Problem

Post by Joe User »

Letzter Versuch:

Code: Select all

chroot /mnt /bin/env -i HOME=/root TERM=$TERM PS1='u:w$ ' PATH=/usr/sbin:/usr/bin:/sbin:/bin /bin/bash +h
>/etc/mtab
mount -a
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: mount-Problem

Post by Joe User »

codc wrote:Ist der erste Rootie den ich einrichte - bisher hatte ich immer physkalischen Zugriff auf die Server und da ist das einfacher wenn man von CD booten kann und mit Netinstall installieren kann.
Eventuell hilft es ja auch einem Debianer: http://www.rootforum.org/wiki/howto/gen ... stallation
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
codc
Posts: 97
Joined: 2004-01-08 02:55
Location: Tübingen
 

Re: mount-Problem

Post by codc »

@JoeUser: deine Antwort hat mich nicht zum Ziel geführt aber ich habs gelöst das mount-Problem

eine verwaiste /etc/mtab im chroot stresst rum - löschen und alles funktioniert wie erwartet - leider bootet die kiste immer noch nichtt sauber durch :?: - heute abend bin ich aber definitiv zu müde für eine rootshell ;)