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

Notfall Festplatte im Menü anbinden

$cruffy

Member
Ich habe mir folgendes System aufgebaut:

- 1x 1TB Festplatte mit Suse 11.2 installiert
- 1x 250GB Festplatte mit Debian (aktuell) installiert

Jetzt soll zunächst die Suse Festplatte starten und im Grub Menü soll auch das booten von der anderen Festplatte (Wurzelverzeichnis auf sdb1) wählbar sein.

Der Sinn ist, daß zunächst Suse arbeiten soll, aber wenn es zum Ausfall kommen sollte, soll es mir möglich sein, die Suse Festplatte einfach rauszunehmen und dann nur mit debian zu booten. Trotzdem soll es möglich sein im Menü auszuwählen, daß Debian starten soll.

Können beide Partitionen (Suse/Debian) als aktiv gekennzeichnet sein oder muss ich dies erst beim Ausfall ändern? Wie kann ich die beabsichtigte Lösung am besten bewerkstelligen?
 
OP
$

$cruffy

Member
Ja, durchaus. Wenn ich beide Festplatten anschließe und den Rechner starte, dann startet das Menü von der Debian Festplatte, es sollte abe die Suse Festplatte sein. Es sind beides sata Festplatten. Irgendwie bin ich da ratlos, bei IDE gab es Meister und Sklave, aber hier wohl nicht.
 

josef-wien

Ultimate Guru
Ob Du jetzt von der "Debian-Platte" startest, in deren Boot-Menü Du openSUSE entweder direkt oder via chainloader aufrufst, oder ob Du von der "openSUSE-Platte" startest, in deren Boot-Menü Du Debian entweder direkt oder via chainloader aufrufst, ist reine Geschmackssache. Du mußt im BIOS Deines PC einstellen, von welcher Platte gestartet werden soll, üblicherweise gibt es die Möglichkeit, die Plattenreihenfolge festzulegen. Wenn Du eine Platte ab- und dann wieder anhängst, solltest Du auch diese Einstellung nachprüfen.

Jene Platte, von der der PC startet, erhält immer die BIOS-ID 0x80 (bei GRUB wird dafür üblicherweise hd0 angegeben, obwohl unter anderem auch 0x80 ein gültiger Wert ist). Die zweite Platte erhält dann die BIOS-ID 0x81 (was hd1 entspricht).
 
OP
$

$cruffy

Member
Ich hab das BIOS umgestellt, damit startet es von der richtigen Festplatte. Die Datei Menu.lst habe ich jetzt so bearbeitet, aber es klappt nicht - er findet eine Datei nicht.

Code:
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.2 - 2.6.31.5-0.1
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.31.5-0.1-desktop root=/dev/sda1 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x314
    initrd /boot/initrd-2.6.31.5-0.1-desktop


###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Debian - 2.6.26-2-amd64
    root (hd1,0)
    kernel /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sdc1 ro quiet vga=0x314
    initrd /boot/initrd.img-2.6.26-2-amd64

Fehlermeldung wenn ich Debian wähle (Suse startet normal):
root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd
kernel /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sdc1 ro quiet vga=0x314

Error 15: File not found

Press any key to continue...

Den Eintrag für Debian habe ich aus der Debian menu.lst abgeschrieben, nur das vga am Ende ist von mir. Die Festplatte wird als sdc1 angezeigt wenn ich unter suse "fdisk -l" auslese. Es ist nämlich noch eine andere HDD drinn im Rechner, die ist aber nur für die Daten (home).
 
OP
$

$cruffy

Member
Ich habs. Es war (hd2,0).

Jetzt startet er aber und meldet Fehler:
Code:
Loading, please wait...
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events ... done.
Waiting for /dev to be fully populated... [    9.811722] Error: Driver ´pcspkr´is already registered, aborting...
done.
Setting the system clock.
Activating swap...done.
Checking root file system...fsck 1.41.3 (12-Oct-2008)
mein-debian: clean, 26297/2572288 files, 389305/10265527 blocks
done.
Setting the system clock.
Cleaning up ifupdown...
Loading kernel modules..done.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
fsck.ext3: Bad magic number in super-block while trying to open /dev/sda3
/dev/sda3:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

fsck died with exit status 8
failed (code 8).

File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file system manually. failed!
A mainenance shell will now be started. CONTROL-D will terminate this shell and resume system boot (warning).
Give root passwort for maintenance
(or type Control-D to continue):

Komisch, keine datenpartition sda3 - laut fdisk -l ist swap auf sda3.

/var/log/fsck/checkfs
Code:
Log of fsck -C -R -A -a
Wed Aug 11 01:42:12 2010

fsck 1.41.3 (12-Oct-2008)
fsck.ext3: Bad magic number in super-block while trying to open /dev/sda3
/dev/sda3:
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

fsck died with exit status 8

Wed Aug 11 01:42:12 2010
 

josef-wien

Ultimate Guru
$cruffy schrieb:
kernel /boot/vmlinuz-2.6.31.5-0.1-desktop root=/dev/sda1 ...
kernel /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sdc1 ...
Bad magic number in super-block while trying to open /dev/sda3
Der Gerätename wird bei jedem Systemstart neu festgelegt und ist daher nicht eindeutig. Daher hat er in Konfigurationsdateien wie /boot/grub/menu.lst oder /etc/fstab nichts verloren. Stelle alle Eintragungen auf die Geräte-ID (/dev/disk/by-id/...) oder die UUID (/dev/disk/by-uuid/...) um.

$cruffy schrieb:
###Don't change this comment - YaST2 identifier: Original name: failsafe###
Du hast diesen YaST-spezifischen Kommentar für Deinen Debian-Eintrag kopiert. Lösche den Kommentar oder ändere den Text, ansonsten hast Du gute Chancen, daß YaST bei nächster Gelegenheit Deinen Debian-Eintrag wieder entfernt.

$cruffy schrieb:
kernel /boot/vmlinuz-2.6.26-2-amd64 ...
initrd /boot/initrd.img-2.6.26-2-amd64
Wenn Du nicht bei jedem Kernel-Update diese Eintragungen ändern willst, dann verwende die Verknüpfungen /boot/vmlinuz und /boot/initrd.img (oder /boot/initrd), die es auch bei Debian geben sollte.
 
OP
$

$cruffy

Member
Sehr eigenartige Sachen gehen im System vor. Ich habe gerade die fstab für Debian umgestellt auf "/dev/disk/by-uuid" und es bootet anscheinend ohne Probleme.
Allerdings findet sich im Verzeichnis "/dev" kein Unterverzeichnis namens "disk", solange ich es mir unter suse anschaue! Trotzdem startet das System und unter debian ist das Verzeichnis "/dev/disk" dann doch zu finden. Als ob es erst beim booten erstellt worden wäre - mag sein, daß es sogar so ist und war mir bisher unbekannt.

Ausgaben unter debian
Code:
cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system>                                         <mount point>       <type>       <options>                                           <dump>  <pass>
proc                                                                             /proc               proc          defaults                                  0          0
/dev/disk/by-uuid/xxxx3f0-xxxx-4740-a6a8-xxxxxxxxxxxxxx     /                     ext3          user_xattr,errors=remount-ro     0          1
/dev/disk/by-uuid/xxxxc80-xxxx-4a10-9117-xxxxxxxxxxxxxx     /home             ext3          user,rw                                   0          1
/dev/disk/by-uuid/xxxxx66a-xxxx-4122-9aa1-xxxxxxxxxxxxx     none               swap         sw                                         0         0

#/dev/sda1       /                 ext3         user_xattr,errors=remount-ro  0      1
#/dev/sda3       /home             ext3         user,rw                       0      1
#/dev/sda4       none              swap         sw                            0      0
#/dev/hda        /media/cdrom0     udf,iso9660  user,noauto                   0      0

Code:
 fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000323ca

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4113    33037641   83  Linux
/dev/sda2            4114      118990   922749502+  83  Linux
/dev/sda3          118991      121601    20972857+  82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000323ca

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        4113    33037641   83  Linux
/dev/sdb2            4114      118990   922749502+  83  Linux
/dev/sdb3          118991      121601    20972857+   c  W95 FAT32 (LBA)

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000323ca

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1        5112    41062108+  83  Linux
/dev/sdc2          120582      121601     8193150   82  Linux swap / Solaris
/dev/sdc3            5113      117075   899342797+  83  Linux

Partition table entries are not in disk order

Egal ob ich es jetzt über das Startmenü von Suse oder bei abgeschalteten Suse Festplatte starte, es wird immer durchgebootet bis zum prompt. Sollte ich das noch mit ext3.fsck -p /dev/sdc1 durchchecken?
 

josef-wien

Ultimate Guru
$cruffy schrieb:
Sehr eigenartige Sachen gehen im System vor.
Falsch.
$cruffy schrieb:
war mir bisher unbekannt
Richtig.

$cruffy schrieb:
bootet anscheinend ohne Probleme
$cruffy schrieb:
es wird immer durchgebootet bis zum prompt
Was stimmt jetzt? Welche Fehlermeldung ist es diesmal?
$cruffy schrieb:
ext3.fsck -p /dev/sdc1
Der Parameter -p wird Dir nicht helfen, das passiert beim Systemstart ohnehin. Wenn ein Dateisystem repariert werden soll, mußt Du -f (und wenn gewünscht -y) verwenden.
 
OP
$

$cruffy

Member
Diesmal kommt keine Fehlermeldung.

Allerdings braucht er länger beim MTA: und dann noch bei Nettalk Services - da wartet er schon einige zig Sekunden. Dann bootet er weiter zum normalen debian prompt wo ich mich als Benutzer anmelden darf. Das einzige was noch kommt ist
Code:
Not starting S.M.A.R.T. daemon smartd, disabled via /etc/default/smartmontools (warning).

War aber schon vorher so.

Sonst sieht alles gut aus.
 
Oben