Cool Solutions

Understanding how RAIDed Disks Interact with the SLES Boot Process



By:

November 20, 2007 11:52 am

Reads:9,530

Comments:2

Score:5

Problem:

Installed SLED/SLES system onto software raided (RAID1) disks and after the install finished the system fails to boot.

Solution:

The problem is that the /boot partition as such should not be raided, in fact it should be traditional Linux primary, it’s the old school way.

It’s not desired for many administrator simply because in case of a disk failure the system may not boot even though our data and root system is safe. Certainly maintaining a /boot manually on the second disk would be a bit tedious.

Some people create separate RAID1 array for /boot which wouldn’t give any advantage over having it on the root FS therefor I present a solution here where we have only 1 root and 1 swap.

Note: you will need to load the official media in and select rescue mode for being able to fix the problem with the provided solution.

My disk config looks like this:

geeko:~ # fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9729    78148161    f  W95 Ext'd (LBA)
/dev/sda5               1        1306    10490382   fd  Linux raid autodetect
/dev/sda6            1307        1568     2104483+  fd  Linux raid autodetect

md0 is sda5 and sdb5 and used for swap
md1 is sda6 and sdb6 and used for /

Start the grub interactive shell:

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> find /boot/grub/stage1
(hd0,6)
(hd1,6)

grub> root (hd0,6)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,6)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub> root (hd1,6)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1)"...  15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,6)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub> quit

A bit of an explanation:

  • You tell grub first to find all disks which includes grub installed on them.
  • Then you select the first disk “root (hd0,6)”. Note: grub will treat all disks as “hd” regardless it’s SATA or SCSI
  • Then you install grub to the first disk’s first partition “setup (hd0)”. You could install it to anywhere, it’s just a common approach.
  • You do the same for the second disk as well

After all your system should be able to boot and finish the install stage 2. Bear in mind you may need to redo this when you receive a kernel upgrade. (I had to…) I recommend doing this when you see kernel upgrades getting installed before you reboot the system which saves you the rescue mode…

1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5)
You need to be a registered member to rate this post.
Loading ... Loading ...

Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

2 Comments

  1. By:ganawayd

    Hello,

    I am running SLES 9 SP3 64 bit with SATA drives in a DELL Power Edge 2900. I would like to configure the 5 500GB drives into a HARDWARE RAID 5 configuration. Does anyone have a procedure on how to do this?

    Thanks!

  2. By:ravi_kiran17

    Hello,

    I am created customized ISO image using SLES 10 SP1.Using autoyast created an ISO image with 2GB RAM, 2 SCSI drives( Software RAID1).Able to boot and using the system with out any problem.

    Now I have upgraded RAM from 2GB to 4GB. When I tried to install using
    the ISO image it is giving me below error

    Booting ‘SUSE Linux Enterprise Server 10 SP1′ Kernel (hd0,1)/vmlinuz-2.6.16.46-0.12-smp root=/dev/md0 resume=/dev/md2 splash=silent showopts
    Error 15: File not found
    press any key to continue…

    Does anyone has any idea why I am unable to boot

Comment

RSS