Boot Probs with Raid1

General support questions

Boot Probs with Raid1

Postby luke0512 » 2011/11/28 17:41:37

I'm new at the forum and first say hello to everybody.

My Problem is that the system doesn't start up automatically from usb stick, i always have to choose one stick from bios-boot-menue. I just read some howtos for installing grub on md devices but i'm not shure about the steps. i'm a bit confused about the device numbering.

Here is my config



Code: Select all
[root@obi-waan ~]# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/sda
(hd4)     /dev/sdb



[root@obi-waan ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd4,0)
#          kernel /vmlinuz-version ro root=/dev/md1
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd4,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS Linux (2.6.32-131.17.1.el6.x86_64)
   root (hd4,0)
   kernel /vmlinuz-2.6.32-131.17.1.el6.x86_64 ro root=LABEL=root rd_MD_UUID=1a46901f:80605b08:69876c29:df3543d1
rd_NO_LUKS rd_NO_LVM rd_NO_DM LANG=de_DE.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=
de-latin1-nodeadkeys crashkernel=auto
   initrd /initramfs-2.6.32-131.17.1.el6.x86_64.img


[root@obi-waan ~]# fdisk -l

Platte /dev/sdb: 2000.4 GByte, 2000398934016 Byte
255 Köpfe, 63 Sektoren/Spur, 243201 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00093a1f

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sdb1               1      239374  1922764800   fd  Linux raid autodetect
/dev/sdb2          239374      241605    17920000   fd  Linux raid autodetect
/dev/sdb3          241605      242943    10752000   fd  Linux raid autodetect
/dev/sdb4          242943      243202     2076672   82  Linux Swap / Solaris

Platte /dev/sdc: 2000.4 GByte, 2000398934016 Byte
255 Köpfe, 63 Sektoren/Spur, 243201 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000b9d37

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sdc1               1      239374  1922764800   fd  Linux raid autodetect
/dev/sdc2          239374      241605    17920000   fd  Linux raid autodetect
/dev/sdc3          241605      242943    10752000   fd  Linux raid autodetect
/dev/sdc4          242943      243202     2076672   82  Linux Swap / Solaris

Platte /dev/sda: 2000.4 GByte, 2000398934016 Byte
255 Köpfe, 63 Sektoren/Spur, 243201 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00093a1f

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1               1      239374  1922764800   fd  Linux raid autodetect
/dev/sda2          239374      241605    17920000   fd  Linux raid autodetect
/dev/sda3          241605      242943    10752000   fd  Linux raid autodetect
/dev/sda4          242943      243202     2076672   82  Linux Swap / Solaris

Platte /dev/md1: 36.7 GByte, 36697014272 Byte
2 Köpfe, 4 Sektoren/Spur, 8959232 Zylinder
Einheiten = Zylinder von 8 × 512 = 4096 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Festplatte /dev/md1 enthält keine gültige Partitionstabelle

Platte /dev/md2: 22.0 GByte, 22016950272 Byte
2 Köpfe, 4 Sektoren/Spur, 5375232 Zylinder
Einheiten = Zylinder von 8 × 512 = 4096 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Festplatte /dev/md2 enthält keine gültige Partitionstabelle

Platte /dev/sdd: 4009 MByte, 4009754624 Byte
126 Köpfe, 22 Sektoren/Spur, 2825 Zylinder
Einheiten = Zylinder von 2772 × 512 = 1419264 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd0e9d431

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sdd1   *           1        2826     3914752   fd  Linux raid autodetect

Platte /dev/sde: 4009 MByte, 4009754624 Byte
84 Köpfe, 22 Sektoren/Spur, 4237 Zylinder
Einheiten = Zylinder von 1848 × 512 = 946176 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1bcaba09

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sde1   *           2        4238     3914752   fd  Linux raid autodetect

Platte /dev/md127: 3937.8 GByte, 3937819164672 Byte
2 Köpfe, 4 Sektoren/Spur, 961381632 Zylinder
Einheiten = Zylinder von 8 × 512 = 4096 Bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Festplatte /dev/md127 enthält keine gültige Partitionstabelle

Platte /dev/md0: 4008 MByte, 4008693760 Byte
2 Köpfe, 4 Sektoren/Spur, 978685 Zylinder
Einheiten = Zylinder von 8 × 512 = 4096 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Festplatte /dev/md0 enthält keine gültige Partitionstabelle


[root@obi-waan ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid1 sdd1[0] sde1[1]
      3914740 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md127 : active raid5 sda1[0] sdb1[1] sdc1[3]
      3845526528 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
     
md2 : active raid5 sda3[0] sdc3[3] sdb3[1]
      21500928 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md1 : active raid5 sda2[0] sdc2[3] sdb2[1]
      35836928 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>


[root@obi-waan ~]# mount

/dev/md1 on / type ext4 (rw)
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/md0 on /boot type ext3 (rw)
/dev/md2 on /home type ext4 (rw)
/dev/md127 on /mnt/daten type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/etc/named on /var/named/chroot/etc/named type none (rw,bind)
/var/named on /var/named/chroot/var/named type none (rw,bind)
/etc/named.conf on /var/named/chroot/etc/named.conf type none (rw,bind)
/etc/named.rfc1912.zones on /var/named/chroot/etc/named.rfc1912.zones type none (rw,bind)
/etc/rndc.conf on /var/named/chroot/etc/rndc.conf type none (rw,bind)
/etc/rndc.key on /var/named/chroot/etc/rndc.key type none (rw,bind)
/usr/lib64/bind on /var/named/chroot/usr/lib64/bind type none (rw,bind)
/etc/named.iscdlv.key on /var/named/chroot/etc/named.iscdlv.key type none (rw,bind)
/etc/named.root.key on /var/named/chroot/etc/named.root.key type none (rw,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)


[root@obi-waan ~]# cat /etc/mdadm.conf

# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=234fac6a:692e5728:46e832f3:e6fce766
ARRAY /dev/md1 level=raid5 num-devices=3 UUID=1a46901f:80605b08:69876c29:df3543d1
ARRAY /dev/md2 level=raid5 num-devices=3 UUID=12e74019:843ceeae:2bfba874:9f5c8267



i found a workaround for the installation
Code: Select all
To install bootloader change as root to grub shell:

/sbin/grub 

Therefore grub should show:

Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported.  For the first word, TAB
lists possible command completions.  Anywhere else TAB lists the possible
completions of a device/filename.]     

grub> 

Now type the following command in listed order (grub will response what it has done):

device (hd0) /dev/sda
device (hd1) /dev/sdb
root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd1)
quit



the main question is which dev is hd0 and hd1 on my system? For me it looks like hd(4) is sdd and hd(5) should be sde and in case to this i have to change hd0 in hd4 and sda to sdd / hd1 in hd5 and sdb in sde???

the problem maybe caused while installing the system with a different mainboard (dg965ry) and now using an dg43nb

Are there any suggestions or solutions?

Thanks for help

Greetings Eric
luke0512
 
Posts: 2
Joined: 2011/11/28 17:12:33

Boot Probs with Raid1

Postby pschaff » 2011/11/30 22:07:00

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

I'm thoroughly confused - due to the complexity of the setup, insufficient information, and probably a language barrier.

Device ordering as seen by GRUB and the OS may well change with a different motherboard, and also based on BIOS settings. USB can further complicate the situation.

What do USB memory sticks have to do with the problem? Are /dev/sdd and /dev/sde the USB devices? I have never seen a USB memory stick RAID. Why are you not booting from a hard disk?

Please see this draft Wiki page and see if it can help you to debug how GRUB sees the devices:

http://wiki.centos.org/TipsAndTricks/TroubleshootGRUB
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America


Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 8 guests