Grub2 lässt sich nicht im MBR aktualisieren

Du kommst mit der Installation nicht voran oder willst noch was nachfragen? Schau auch in den "Tipps und Tricks"-Bereich.
Antworten
sny
Beiträge: 10
Registriert: 03.03.2008 13:06:55

Grub2 lässt sich nicht im MBR aktualisieren

Beitrag von sny » 18.11.2010 15:01:41

Hallo,

vorneweg: ich kenne mich mit Debian ganz gut aus, grub & RAID sind für mich aber nur Kochbuch-Geschichten, betreffender Server steht in einem RZ, Boot in Rescue-Konsole ist grundsätzlich möglich.

Der Server hat zwei Festplatten im Software-Raid1. /dev/md0 ist /boot, /dev/md1 ist /.

Mein System läuft derzeit ohne Probleme, es bootet auch nach Kernel-Aktualisierungen korrekt. Allerdings kann ich kein grub-install ausführen, es kommt folgende Fehlermeldung:

Code: Alles auswählen

grub-install /dev/sda
/usr/sbin/grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!.
/usr/sbin/grub-setup: error: embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
Das Problem liegt wohl hieran:
It also happens when the first partition starts just after the MBR, without the usual space of 60-something block before the first partition.
Quelle: https://wiki.archlinux.org/index.php/GR ... or_message

Wie das System eigentlich bootet, weiss ich nicht wirklich. Aufgesetzt habe ich es vor ca. 1,5 Jahren nach Debian-Handbuch oder hotoforge etc (auf jeden Fall nichts exotisches), damals noch mit grub1. Solltet ihr weitere Angaben benötigen, lasst es mich wissen.

Ach ja, meine Frage:
Ich möchte gerne sicherstellen, dass grub nicht nur läuft, sondern auch korrekt installiert ist. Das ist derzeit wohl nur Glücksache, ich weiss nicht ob das System auch nur von der anderen Platte booten würde. Eine Neuformatierung möchte ich vermeiden.

Code: Alles auswählen

Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA WDC WD5000AAKS-0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      512B    100MB   100MB   primary  ext2            raid
 2      100MB   1124MB  1024MB  primary  linux-swap(v1)
 3      1124MB  477GB   476GB   primary  ext3            raid
 4      477GB   500GB   23.2GB  primary  linux-swap(v1)
fstab:

Code: Alles auswählen

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc    /proc   proc  defaults  0 0
/dev/md1  /   ext3  defaults,usrquota 0 1
/dev/md0  /boot   ext2  defaults  0 2
# /dev/sda2 none    swap  sw    0 0
UUID=f26xxx-xxx-xxx none    swap  sw    0 0
# /dev/sdb2 none    swap  sw    0 0
UUID=b3yyy-yyy-yyy none    swap  sw    0 0
#/dev/sda4   swap        swap    defaults 0 0
#/dev/sdb4   swap        swap    defaults 0 0
mdstat

Code: Alles auswählen

Personalities : [raid1]
md1 : active raid1 sdb3[0] sda3[1]
      464663936 blocks [2/2] [UU]

md0 : active raid1 sdb1[0] sda1[1]
      97536 blocks [2/2] [UU]

unused devices: <none>
fdisk

Code: Alles auswählen

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00054321

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13       97656   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2              13         137     1000000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             137       57985   464664062+  fd  Linux raid autodetect
/dev/sda4           57986       60801    22619520   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00012345

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13       97656   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2              13         137     1000000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sdb3             137       57985   464664062+  fd  Linux raid autodetect
/dev/sdb4           57986       60801    22619520   82  Linux swap / Solaris

Disk /dev/md0: 99 MB, 99876864 bytes
2 heads, 4 sectors/track, 24384 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 475.8 GB, 475815870464 bytes
2 heads, 4 sectors/track, 116165984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

MagicJohnson
Beiträge: 82
Registriert: 31.01.2009 14:37:48

Re: Grub2 lässt sich nicht im MBR aktualisieren

Beitrag von MagicJohnson » 04.12.2010 18:40:12

Ich habe das gleiche Problem. Hast du schon herausgefunden, wie man das lösen kann?

sny
Beiträge: 10
Registriert: 03.03.2008 13:06:55

Re: Grub2 lässt sich nicht im MBR aktualisieren

Beitrag von sny » 20.12.2010 11:39:35

MagicJohnson hat geschrieben:Ich habe das gleiche Problem. Hast du schon herausgefunden, wie man das lösen kann?
Nein, leider nicht, da ich erwägt habe den Server zu wechseln (nicht deswegen). Ich denke, ich müsste die Partitionen etwas verschieben, damit hinter dem MBR mehr Platz ist. Ich fühle mich aber nicht wohl bei dem Gedanken, bin einfach zuwenig in der Materie drin. Eher würde ich wohl zum alten Grub zurückkehren.

Antworten