generic kernel (slack12) + raid 1 + reiserfs -> kernel panic - Slackware

This is a discussion on generic kernel (slack12) + raid 1 + reiserfs -> kernel panic - Slackware ; Hi, 1) Purpose My purpose is to run the generic kernel (GK) on a raid 1 array of 2 sata discs. I use standard unmodified packages from the installation Slack 12 dvd. All mirrored partitions are formatted using reiserfs file ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

  1. generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    Hi,

    1) Purpose

    My purpose is to run the generic kernel (GK) on a raid 1 array of 2 sata
    discs. I use standard unmodified packages from the installation Slack 12
    dvd. All mirrored partitions are formatted using reiserfs file system.

    Description of the array :

    md0 is composed of /dev/sda1 and /dev/sdb1 mounted on /boot
    md1 is composed of /dev/sda5 and /dev/sdb5 mounted on /

    GK stands for Generic Kernel
    HK stands for Huge Kernel

    2) Tries

    I first made a successfull install of the huge kernel (HK).

    Then, I made an initrd.gz image including only the reiserfs module :

    # mkinitrd -c -k 2.6.21.5-smp -m reiserfs -f reiserfs -r /dev/md1

    In lilo.conf, I copied the entry made for the HK to a new entry that I
    renamed "Test", I changed the kernel image filename and I added initrd.gz
    line.

    At the end og GK rebooting, I got a kernel panic :

    ....
    initrd.gz: Loading kernel modules from initrd image
    Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    mount : mounting /dev/md0 on /mnt failed
    ....
    kernel panic

    3) Investigations

    First, I make a diff between the configurations of the HK and GK. There is
    no difference concerning sata and raid drivers ; the HK boots without an
    initrd.gz. Reiserfs is built as a module in GH.

    Second, I break my raid array. On one disc, I turn my partitions to standard
    Linux (type=83 instead of fd) and reinstall HK then GK on this disk. For
    GK, I make an initrd the same way as in 2), changing the device names of
    course.

    Both HK and GK work one one sata disc with reiserfs formatted partitions !

    So, the problem seems to come from raid detection in GK. It is not related
    to sata nor reiserfs.

    Looking in /boot/initrd-tree/dev directory, I notice that all device nodes
    (sda* and sdb*) corresponding to all partitions exist but md* are symbolic
    links to inexisting files !

    In order to satisfy these symbolic links, I make a md directory
    in /boot/initrd-tree/dev and created 0, 1,... nodes in it with the same
    permission, owner, group, type, major, minor as in the regular /dev/md.

    I run mkinitrd without an argument in order to rebuild initrd.gz, rerun
    Lilo, reboot. Things have changed, the kernel log is now :

    ....
    initrd.gz: Loading kernel modules from initrd image
    Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev, md0,
    block 2, size 4096)
    ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev, md0,
    block 16, size 4096)
    mount : mounting /dev/md0 on /mnt failed
    ....
    kernel panic

    I reboot HK, reiserfs fs are clean.

    4) Conclusion

    I feel like running an inird.gz at boot time affects badly raid arrays
    detection and mounting.

    For the moment I will stick on HK but I'd like to know whether I went to an
    untested area or I did bad things.

    Many thanks for your answers !

    Franck Barbenoire





  2. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    Franck Barbenoire wrote:
    > Hi,
    >
    > 1) Purpose
    >
    > My purpose is to run the generic kernel (GK) on a raid 1 array of 2 sata
    > discs. I use standard unmodified packages from the installation Slack 12
    > dvd. All mirrored partitions are formatted using reiserfs file system.
    >
    > Description of the array :
    >
    > md0 is composed of /dev/sda1 and /dev/sdb1 mounted on /boot
    > md1 is composed of /dev/sda5 and /dev/sdb5 mounted on /
    >
    > GK stands for Generic Kernel
    > HK stands for Huge Kernel
    >
    > 2) Tries
    >
    > I first made a successfull install of the huge kernel (HK).
    >
    > Then, I made an initrd.gz image including only the reiserfs module :
    >
    > # mkinitrd -c -k 2.6.21.5-smp -m reiserfs -f reiserfs -r /dev/md1
    >
    > In lilo.conf, I copied the entry made for the HK to a new entry that I
    > renamed "Test", I changed the kernel image filename and I added initrd.gz
    > line.
    >
    > At the end og GK rebooting, I got a kernel panic :
    >
    > ...
    > initrd.gz: Loading kernel modules from initrd image
    > Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    > mount : mounting /dev/md0 on /mnt failed
    > ...
    > kernel panic
    >
    > 3) Investigations
    >
    > First, I make a diff between the configurations of the HK and GK. There is
    > no difference concerning sata and raid drivers ; the HK boots without an
    > initrd.gz. Reiserfs is built as a module in GH.
    >
    > Second, I break my raid array. On one disc, I turn my partitions to standard
    > Linux (type=83 instead of fd) and reinstall HK then GK on this disk. For
    > GK, I make an initrd the same way as in 2), changing the device names of
    > course.
    >
    > Both HK and GK work one one sata disc with reiserfs formatted partitions !
    >
    > So, the problem seems to come from raid detection in GK. It is not related
    > to sata nor reiserfs.
    >
    > Looking in /boot/initrd-tree/dev directory, I notice that all device nodes
    > (sda* and sdb*) corresponding to all partitions exist but md* are symbolic
    > links to inexisting files !
    >
    > In order to satisfy these symbolic links, I make a md directory
    > in /boot/initrd-tree/dev and created 0, 1,... nodes in it with the same
    > permission, owner, group, type, major, minor as in the regular /dev/md.
    >
    > I run mkinitrd without an argument in order to rebuild initrd.gz, rerun
    > Lilo, reboot. Things have changed, the kernel log is now :
    >
    > ...
    > initrd.gz: Loading kernel modules from initrd image
    > Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    > ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev, md0,
    > block 2, size 4096)
    > ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev, md0,
    > block 16, size 4096)
    > mount : mounting /dev/md0 on /mnt failed
    > ...
    > kernel panic
    >
    > I reboot HK, reiserfs fs are clean.
    >
    > 4) Conclusion
    >
    > I feel like running an inird.gz at boot time affects badly raid arrays
    > detection and mounting.
    >
    > For the moment I will stick on HK but I'd like to know whether I went to an
    > untested area or I did bad things.
    >
    > Many thanks for your answers !
    >
    > Franck Barbenoire
    >
    >
    >
    >

    I had been thinking of trying an initrd on my software raid. I thought
    it may be tricky and I guess you proved that. No real need to use
    initrd when you build custom kernels. My kernel compile times are down
    to half what they were. I was using an Athlon XP 3200. Now I'm using a
    Core Duo T2250.

  3. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    cbxbiker61 wrote:

    > Franck Barbenoire wrote:
    >> Hi,
    >>
    >> 1) Purpose
    >>
    >> My purpose is to run the generic kernel (GK) on a raid 1 array of 2 sata
    >> discs. I use standard unmodified packages from the installation Slack 12
    >> dvd. All mirrored partitions are formatted using reiserfs file system.
    >>
    >> Description of the array :
    >>
    >> md0 is composed of /dev/sda1 and /dev/sdb1 mounted on /boot
    >> md1 is composed of /dev/sda5 and /dev/sdb5 mounted on /
    >>
    >> GK stands for Generic Kernel
    >> HK stands for Huge Kernel
    >>
    >> 2) Tries
    >>
    >> I first made a successfull install of the huge kernel (HK).
    >>
    >> Then, I made an initrd.gz image including only the reiserfs module :
    >>
    >> # mkinitrd -c -k 2.6.21.5-smp -m reiserfs -f reiserfs -r /dev/md1
    >>
    >> In lilo.conf, I copied the entry made for the HK to a new entry that I
    >> renamed "Test", I changed the kernel image filename and I added initrd.gz
    >> line.
    >>
    >> At the end og GK rebooting, I got a kernel panic :
    >>
    >> ...
    >> initrd.gz: Loading kernel modules from initrd image
    >> Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    >> mount : mounting /dev/md0 on /mnt failed
    >> ...
    >> kernel panic
    >>
    >> 3) Investigations
    >>
    >> First, I make a diff between the configurations of the HK and GK. There
    >> is no difference concerning sata and raid drivers ; the HK boots without
    >> an initrd.gz. Reiserfs is built as a module in GH.
    >>
    >> Second, I break my raid array. On one disc, I turn my partitions to
    >> standard Linux (type=83 instead of fd) and reinstall HK then GK on this
    >> disk. For GK, I make an initrd the same way as in 2), changing the device
    >> names of course.
    >>
    >> Both HK and GK work one one sata disc with reiserfs formatted partitions
    >> !
    >>
    >> So, the problem seems to come from raid detection in GK. It is not
    >> related to sata nor reiserfs.
    >>
    >> Looking in /boot/initrd-tree/dev directory, I notice that all device
    >> nodes (sda* and sdb*) corresponding to all partitions exist but md* are
    >> symbolic links to inexisting files !
    >>
    >> In order to satisfy these symbolic links, I make a md directory
    >> in /boot/initrd-tree/dev and created 0, 1,... nodes in it with the same
    >> permission, owner, group, type, major, minor as in the regular /dev/md.
    >>
    >> I run mkinitrd without an argument in order to rebuild initrd.gz, rerun
    >> Lilo, reboot. Things have changed, the kernel log is now :
    >>
    >> ...
    >> initrd.gz: Loading kernel modules from initrd image
    >> Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    >> ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev,
    >> md0, block 2, size 4096)
    >> ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev,
    >> md0, block 16, size 4096)
    >> mount : mounting /dev/md0 on /mnt failed
    >> ...
    >> kernel panic
    >>
    >> I reboot HK, reiserfs fs are clean.
    >>
    >> 4) Conclusion
    >>
    >> I feel like running an inird.gz at boot time affects badly raid arrays
    >> detection and mounting.
    >>
    >> For the moment I will stick on HK but I'd like to know whether I went to
    >> an untested area or I did bad things.
    >>
    >> Many thanks for your answers !
    >>
    >> Franck Barbenoire
    >>
    >>
    >>
    >>

    > I had been thinking of trying an initrd on my software raid. I thought
    > it may be tricky and I guess you proved that. No real need to use
    > initrd when you build custom kernels. My kernel compile times are down
    > to half what they were. I was using an Athlon XP 3200. Now I'm using a
    > Core Duo T2250.


    I agree with you : you do not need an initrd when compiling the kernel
    yourself, you just put anything you need in it. I just not wanted to do
    that because I wanted to use the generic kernel from the dvd.

    In order to test and see the difference, I will add reiserfs support to the
    generic kernel configuration, and rebuild it, thus avoiding the use of
    inird.

    I will report the result as a post in this thread.

    Franck

  4. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic




    cbxbiker61 wrote:

    >I had been thinking of trying an initrd on my software raid. I thought
    >it may be tricky and I guess you proved that. No real need to use
    >initrd when you build custom kernels.


    If you do decide to go with initrd, take a close look at the
    possiblility of using initfs instead.

    --
    Guy Macon




  5. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    Franck Barbenoire wrote:

    > cbxbiker61 wrote:
    >
    >> Franck Barbenoire wrote:
    >>> Hi,
    >>>
    >>> 1) Purpose
    >>>
    >>> My purpose is to run the generic kernel (GK) on a raid 1 array of 2 sata
    >>> discs. I use standard unmodified packages from the installation Slack 12
    >>> dvd. All mirrored partitions are formatted using reiserfs file system.
    >>>
    >>> Description of the array :
    >>>
    >>> md0 is composed of /dev/sda1 and /dev/sdb1 mounted on /boot
    >>> md1 is composed of /dev/sda5 and /dev/sdb5 mounted on /
    >>>
    >>> GK stands for Generic Kernel
    >>> HK stands for Huge Kernel
    >>>
    >>> 2) Tries
    >>>
    >>> I first made a successfull install of the huge kernel (HK).
    >>>
    >>> Then, I made an initrd.gz image including only the reiserfs module :
    >>>
    >>> # mkinitrd -c -k 2.6.21.5-smp -m reiserfs -f reiserfs -r /dev/md1
    >>>
    >>> In lilo.conf, I copied the entry made for the HK to a new entry that I
    >>> renamed "Test", I changed the kernel image filename and I added
    >>> initrd.gz line.
    >>>
    >>> At the end og GK rebooting, I got a kernel panic :
    >>>
    >>> ...
    >>> initrd.gz: Loading kernel modules from initrd image
    >>> Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    >>> mount : mounting /dev/md0 on /mnt failed
    >>> ...
    >>> kernel panic
    >>>
    >>> 3) Investigations
    >>>
    >>> First, I make a diff between the configurations of the HK and GK. There
    >>> is no difference concerning sata and raid drivers ; the HK boots without
    >>> an initrd.gz. Reiserfs is built as a module in GH.
    >>>
    >>> Second, I break my raid array. On one disc, I turn my partitions to
    >>> standard Linux (type=83 instead of fd) and reinstall HK then GK on this
    >>> disk. For GK, I make an initrd the same way as in 2), changing the
    >>> device names of course.
    >>>
    >>> Both HK and GK work one one sata disc with reiserfs formatted partitions
    >>> !
    >>>
    >>> So, the problem seems to come from raid detection in GK. It is not
    >>> related to sata nor reiserfs.
    >>>
    >>> Looking in /boot/initrd-tree/dev directory, I notice that all device
    >>> nodes (sda* and sdb*) corresponding to all partitions exist but md* are
    >>> symbolic links to inexisting files !
    >>>
    >>> In order to satisfy these symbolic links, I make a md directory
    >>> in /boot/initrd-tree/dev and created 0, 1,... nodes in it with the same
    >>> permission, owner, group, type, major, minor as in the regular /dev/md.
    >>>
    >>> I run mkinitrd without an argument in order to rebuild initrd.gz, rerun
    >>> Lilo, reboot. Things have changed, the kernel log is now :
    >>>
    >>> ...
    >>> initrd.gz: Loading kernel modules from initrd image
    >>> Using : /lib/modules/2.6.21.5-smp/kernel/fs/reiserfs/reiserfs.ko
    >>> ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev,
    >>> md0, block 2, size 4096)
    >>> ReiserFS : md0 : warning: sh-2006: read_super_block: bread failed (dev,
    >>> md0, block 16, size 4096)
    >>> mount : mounting /dev/md0 on /mnt failed
    >>> ...
    >>> kernel panic
    >>>
    >>> I reboot HK, reiserfs fs are clean.
    >>>
    >>> 4) Conclusion
    >>>
    >>> I feel like running an inird.gz at boot time affects badly raid arrays
    >>> detection and mounting.
    >>>
    >>> For the moment I will stick on HK but I'd like to know whether I went to
    >>> an untested area or I did bad things.
    >>>
    >>> Many thanks for your answers !
    >>>
    >>> Franck Barbenoire
    >>>
    >>>
    >>>
    >>>

    >> I had been thinking of trying an initrd on my software raid. I thought
    >> it may be tricky and I guess you proved that. No real need to use
    >> initrd when you build custom kernels. My kernel compile times are down
    >> to half what they were. I was using an Athlon XP 3200. Now I'm using a
    >> Core Duo T2250.

    >
    > I agree with you : you do not need an initrd when compiling the kernel
    > yourself, you just put anything you need in it. I just not wanted to do
    > that because I wanted to use the generic kernel from the dvd.
    >
    > In order to test and see the difference, I will add reiserfs support to
    > the generic kernel configuration, and rebuild it, thus avoiding the use of
    > inird.
    >
    > I will report the result as a post in this thread.
    >
    > Franck


    I recompiled the kernel, starting from the generic kernel configuration, I
    added support for reiserfs. Rebooting this kernel without use of inird.gz
    works fine : raid 1 array is correctly detected and mounted.

    So the problem is demonstrated : initrd + raid 1 = problem !

    Franck

  6. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    On Sun, 22 Jul 2007 21:09:37 +0200, Franck Barbenoire wrote:

    > I recompiled the kernel, starting from the generic kernel
    > configuration, I
    > added support for reiserfs. Rebooting this kernel without use of inird.gz
    > works fine : raid 1 array is correctly detected and mounted.


    > So the problem is demonstrated : initrd + raid 1 = problem !


    Yep.

    Boy you should see the squirrels come out in other NG's for the
    "automagic" type distros. There are so clueless. First off there is
    always some knucklehead that insists that Yast or MCC is the only way to
    solve these problems and any other approach is heresy.

    Oh and don't even mention a kernel compile.

    Makes you glad to be a Slacker where we solve out problems the right
    way, IMO.

    --
    Linux Help: http://rsgibson.com/linux.htm
    Email - rsgibson@verizon.borg
    Replace borg with net


  7. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    > I recompiled the kernel, starting from the generic kernel configuration, I
    > added support for reiserfs. Rebooting this kernel without use of inird.gz
    > works fine : raid 1 array is correctly detected and mounted.
    >
    > So the problem is demonstrated : initrd + raid 1 = problem !


    when your HDD and MD drivers are modules, the auto-configuration of the md
    devices doesn't work. In this case the initrd/initramfs needs to have a
    command to assemble the md devices.

    A "mdadm --assemble --scan" should be enough but I don't know it it's
    available in Slackware.

    ArchLinux for ex. has a klibc binary mdassemble that's included in the
    initramfs that does that.


    --
    damjan

  8. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    Damjan wrote:

    >> I recompiled the kernel, starting from the generic kernel configuration,
    >> I added support for reiserfs. Rebooting this kernel without use of
    >> inird.gz works fine : raid 1 array is correctly detected and mounted.
    >>
    >> So the problem is demonstrated : initrd + raid 1 = problem !

    >
    > when your HDD and MD drivers are modules, the auto-configuration of the md
    > devices doesn't work. In this case the initrd/initramfs needs to have a
    > command to assemble the md devices.
    >
    > A "mdadm --assemble --scan" should be enough but I don't know it it's
    > available in Slackware.
    >
    > ArchLinux for ex. has a klibc binary mdassemble that's included in the
    > initramfs that does that.
    >
    >


    I finally got it :

    cd /boot
    mkinitrd -c -k 2.6.21.5-smp -m reiserfs

    in /boot/initrd-tree/dev, copy the missing nodes from /dev/md :

    cd /boot/initrd-tree/dev
    cp -a /dev/md .

    copy also mdadm executable

    cd /boot/initrd-tree
    cp -a /sbin/mdadm bin

    Add the following lines in /boot/initrd-tree/init (just above LVM section)

    mdadm -A /dev/md0 /dev/sda1 /dev/sdb1
    mdadm -A /dev/md1 /dev/sda5 /dev/sdb5
    mdadm -A /dev/md0 /dev/sda6 /dev/sdb6
    mdadm -A /dev/md0 /dev/sda7 /dev/sdb7
    ....

    Rerun mkinitrd without argument for updating initrd.gz

    mkinitrd

    Update the symbolic link to the kernel :

    cd /boot
    ln -sf kernel-generic-smp-2.6.21.5-smp vmlinuz

    Add initrd to lilo.conf

    image = /boot/vmlinuz
    initrd = /boot/initrd.gz
    root = /dev/md1
    label = Linux
    read-only

    Run lilo

    lilo

    Reboot, and that's it : you run the generic kernel with software raid 1
    array !

    Thanks for your help

    Franck Barbenoire

  9. Re: generic kernel (slack12) + raid 1 + reiserfs -> kernel panic

    Franck Barbenoire wrote:
    > and that's it : you run the generic kernel with software raid 1 array !


    Thanks for a very well written tutorial!

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc1(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


+ Reply to Thread