LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-08-2005, 08:59 AM   #1
elmu
LQ Newbie
 
Registered: Feb 2005
Posts: 17

Rep: Reputation: 0
Software RAID-1 install problem


Hello,

I just want to install a software raid-1 system on my debian sarge box.
I followed the instruction from the following site:
http://www.epimetrics.com/topics/on...ge_topic_id=120

The difference that I have only a / and a /home partition.
I compiled my kernel (2.6.8) with RAID support.
After the reboot I got a Kernel panic. See my log:
KernelPanic

In the tutorial there was no initrd defined in the grub menu list. Can it be the problem?

What did I wrong?


Thanks!

(I posted this topic on Debian topic 2 days ago, but maybe it is more general problem)

My fstab:


Code:
:debian:/# more /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/md0        /               ext3    defaults,errors=remount-ro 0       1
/dev/md1        /home           ext3    defaults,usrquota,grpquota        0
  2
/dev/hda5       none            swap    sw,pri=1              0       0
/dev/hdc5       none            swap    sw,pri=1              0       0
/dev/hdb        /media/cdrom0   iso9660 ro,user,noauto  0       0
/dev/fd0



My hda:

Code:
:debian:/# sfdisk -l /dev/hda

Disk /dev/hda: 8322 cylinders, 16 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 8322/16/63).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hda1   *      0+    158     159-   1277136   fd  Linux raid autodetect
/dev/hda2        159     521     363    2915797+   5  Extended
/dev/hda3          0       -       0          0    0  Empty
/dev/hda4          0       -       0          0    0  Empty
/dev/hda5        159+    180      22-    176683+  82  Linux swap / Solaris
/dev/hda6        181+    521     341-   2739051   fd  Linux raid autodetect
debian:/#


and hdc:

Code:
:debian:/# sfdisk -l /dev/hdc

Disk /dev/hdc: 8322 cylinders, 16 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hdc1   *      0+   2534-   2534    1277136   fd  Linux raid autodetect
/dev/hdc2       2534+   8319-   5786-   2915797+   5  Extended
/dev/hdc3          0       -       0          0    0  Empty
/dev/hdc4          0       -       0          0    0  Empty
/dev/hdc5       2534+   2884-    351-    176683+  82  Linux swap / Solaris
/dev/hdc6       2884+   8319-   5435-   2739051   fd  Linux raid autodetect
debian:/#



And at the end my grub menu list:

Code:
:## ## End Default Options ##

title           Debian GNU/Linux, kernel 2.6.8-bali2
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.8-bali2 ro root=/dev/md0 md=0,/dev/hda1,/dev/h
dc1
initrd          /boot/initrd.img-2.6.8-bali2
savedefault
boot

title           Debian GNU/Linux, kernel 2.6.8-bali2 (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.8-bali2 ro root=/dev/md0 md=0,/dev/hdc1
initrd          /boot/initrd.img-2.6.8-bali2
savedefault
boot

title           Debian GNU/Linux, kernel 2.6.8-2-686
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.8-2-686 root=/dev/hda1 ro
initrd          /boot/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          /boot/vmlinuz-2.6.8-2-686 root=/dev/hda1 ro single
initrd          /boot/initrd.img-2.6.8-2-686
savedefault
boot

title           Debian GNU/Linux, kernel 2.4.27-2-386
root            (hd0,0)
kernel          /boot/vmlinuz-2.4.27-2-386 root=/dev/hda1 ro
initrd          /boot/initrd.img-2.4.27-2-386
savedefault
boot

title           Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.4.27-2-386 root=/dev/hda1 ro single
initrd          /boot/initrd.img-2.4.27-2-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
debian:/#
 
Old 11-09-2005, 07:07 PM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
Re: Software RAID-1 install problem

I just want to install a software raid-1 system on my debian sarge box.
I followed the instruction from the following site:
http://www.epimetrics.com/topics/on...ge_topic_id=120

These instructions need a little fine tuning for Debian
(read them the other day, cant load them today)
However, after a quick glance, this looks ok:
http://www.linuxhowtos.org/System/raid.htm

The difference that I have only a / and a /home partition.
Things get a lot easier with a non-Raid /boot partition

I compiled my kernel (2.6.8) with RAID support.
For Debian, do these as modules (as per Debian standards) and mkinitrd will
make an initrd for you including ramdisk and tools.
(also provided everything is configured properly )

In the tutorial there was no initrd defined in the grub menu list. Can it be the problem?
It's not for Debian. Debian uses an initrd because of modules.
How did you create your initrd?

What did I wrong?
My guess would be that you haven't made your initrd properly or your root filesystem has
not been populated properly. You might also want to ensure udev is enabled in the kernel
and that the udev daemon is installed.

(I posted this topic on Debian topic 2 days ago, but maybe it is more general problem)
I got half way through an answer (comparing it to LVM-root with Raid 0) when I got distracted
... or lost .... can't remember.
EDIT: Now I remember that the system I have root on LVM+Raid also runs Xen, so the
grub entry might be hard(er) to follow.

Code:
:debian:/# more /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/md0        /               ext3    defaults,errors=remount-ro 0       1
/dev/md1        /home           ext3    defaults,usrquota,grpquota        0
  2
/dev/hda5       none            swap    sw,pri=1              0       0
/dev/hdc5       none            swap    sw,pri=1              0       0
/dev/hdb        /media/cdrom0   iso9660 ro,user,noauto  0       0
/dev/fd0
Just for sanity, do the following give good results?
# e2fsck /dev/md0
# e2fsck /dev/md1


Code:
title           Debian GNU/Linux, kernel 2.6.8-bali2
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.8-bali2 ro root=/dev/md0 md=0,/dev/hda1,/dev/h
dc1
initrd          /boot/initrd.img-2.6.8-bali2
savedefault
boot
I doubt you need the md options.

Here's what I've got that might help:
Code:
title           Xen Stable - Debian Stable
root            (hd0,0)
kernel          /xen-2.0.7.gz root=/dev/ram0 ro dom0_mem=81920 physdev_dom0_hide=(00:0a.0)(00:0b.0)(00:06.0)(00:07.2)
module          /vmlinuz-2.6.11.12-xen0 root=/dev/vg0/root ro console=tty0
module          /initrd.img-2.6.11.12-xen0
savedefault
boot
Forget the dom0 options and the first module line, exchange 'module' on the second module
line with 'initrd'. Note that my root option is the same as yours, but that I have a boot
partition in that location ... I think this is your error. Grub doesn't know how to
read a raid device to get the kernel and initrd from.

So yours might look something like this (if you add a boot partition!!!)
Code:
title           Debian GNU/Linux, kernel 2.6.8-bali2
root            (hd0,0)
kernel          /vmlinuz-2.6.8-bali2 ro root=/dev/md0
initrd          /initrd.img-2.6.8-bali2
savedefault
boot
Here's something else you'll need for Debian's mkinitrd to produce the correct result.
# cat /etc/mdadm/mdadm.conf
Code:
DEVICE partitions
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=72c1f448:2d5f8521:431d286d:3de5be1d
   devices=/dev/hda3,/dev/hdc3
ARRAY /dev/md1 level=raid0 num-devices=2 UUID=f739cdb1:7cfb3f92:605674de:969a9c53
        devices=/dev/hda6,/dev/hdc6
ARRAY /dev/md2 level=raid0 num-devices=2 UUID=0b81ec82:8cd3167c:8192ec98:f749babc
        devices=/dev/hda7,/dev/hdc7


Well, getting distracted again ... haven't finished ... but probably enough for you to chew on ...later

ps. not sure about the sarge installed, but the Debian NetInst CD's are able to install
to raid ... why don't you try that? ... You'll end up with a bootable system with everything
in the correct (Debian) place.

Last edited by uberNUT69; 11-09-2005 at 07:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New install of Suse 10. Software Raid? KGNickl Linux - Software 2 11-27-2005 08:00 AM
Software RAID-1 install problem elmu Debian 1 11-08-2005 10:12 AM
setting up software RAID 1 after install caddis Linux - Newbie 2 03-02-2005 12:18 AM
Software Raid 5 Install Druid Issues natbrazil Linux - Software 0 02-01-2005 04:47 PM
Software Raid setup to install slackware 9.1 anvil82 Linux - Hardware 2 03-20-2004 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration