You are not logged in.

#1 2006-06-28 07:13:47

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

raid doing weird with initcpio

Hey,
I'm using a software raid with 2 sata disks in raid0. 
I am still able to boot, and everything works! but I get this messages at startup which I don't like very much:

:: Initramfs completed - control passing to kinit
md: will configure md0 (super-block) from /dev/sda1,/dev/sdb1, below
md: kinit (pid 1 ) used obsolete MD ioctl, upgrade your software to use new ictls
md: loading md0: /dev/sda1
md: couldn't update array info. -22
md0: personality does not support diskops!
md0: personality does not support diskops!
md: starting md0 failed
kyournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
kinit: Mounted root (ext3 filesystem) readonly
INIT: version 2.86 booting

>Arch Linux v0.7.2 (Gimmick)
...

So it says there is obsolete software used, and it says starting md0 failed, but I can still boot (md0 is my root)
Is this bad?

/boot/grub/menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd0,2)
kernel /vmlinuz26 root=/dev/md0 ro vga=795 noapic md=0,/dev/sda1,/dev/sdb1
initrd /kernel26.img

/etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes, into the CPIO image, and additional
# binaries a given user may wish.  This is run first, so may
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
#    FILES="/etc/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'modload' may be used in place of 'udev', but is not recommended
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
#    This setup specifies all modules in the MODULES setting above.
#    No raid, lvm, or encrypted root is needed.
#    HOOKS="base"
#
#    This setup will autodetect all modules for your system and should
#    work as a sane default
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
#    This setup will generate a 'full' image which supports most systems.
#    No autodetection is done.
#    HOOKS="base udev ide scsi sata usb filesystems"
#
#    This setup assembles an ide raid array with an encrypted root FS.
#    Note: See 'mkinitcpio -H raid' for more information on raid devices.
#    HOOKS="base udev ide filesystems raid encrypt"
#
#    This setup loads an LVM volume group on a usb device.
#    HOOKS="base udev usb filesystems lvm"
HOOKS="base udev autodetect sata raid filesystems keymap"

Offline

#2 2006-06-28 17:32:14

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: raid doing weird with initcpio

What do your kernel params look like? Anything fancy about your raid setup?

EDIT:
Aha, I think I got it.  The main issue is two-fold.  Firstly, the 'raid' hook will assembly the device, and then kinit tries to assemble it again.  If you do not need to touch the raid device after assembly (i.e. to decrypt it or run LVM) there is no real need for the 'raid' hook itself (assuming you add the proper modules to your config file).

However, the raid hook should still be intelligent enough to shut of kinit's raid detection.  I will look into that.

Offline

#3 2006-06-28 18:03:23

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: raid doing weird with initcpio

phrakture: kernel params? isn't that the line in my grub config I posted above?

my raid setup, nothing fancy I think. Software raid on 2 sata disks.
sda:
1: ext3
2: ext3
3: ext2 (boot)
4: extended
5: ext3 (data)
6: swap
7: ext3

sdb:
1: ext3
2: ext3
3: ext3 (data)
4: extended
5: swap
6: ext3

raid:
md0: raid0: sda1+sdb1 (root)
md1: raid1: sda2+sdb2 (home)
md2: raid0: sda7+sdb6 (data)

Offline

#4 2006-06-28 18:48:07

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: raid doing weird with initcpio

mouse256 wrote:

phrakture: kernel params? isn't that the line in my grub config I posted above?

I totally missed that :oops:

Anyway, seeing as there is nothing fancy, try the following mkinitcpio.conf settings:

MODULES="raid0 ext3"
HOOKS="base udev autodetect sata keymap"

This will do two things.
a) It will let kinit do all the raid assembly
b) Will also skip filesystem detection, which may be slower on boot (not noticable though).  You can specify rootfstype=ext3 to skip that too.

This is just a test.  The raid setup should work as you have it without errors, but it seems that I need to make some modifications.  Please let me know if the above works without errors.  If it does, I'm pretty sure I can fix the original error.

Offline

#5 2006-06-28 19:22:47

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: raid doing weird with initcpio

phrakture wrote:

Anyway, seeing as there is nothing fancy, try the following mkinitcpio.conf settings:

MODULES="raid0 ext3"
HOOKS="base udev autodetect sata keymap"

Works perfectly now, no more warnings and somewhat faster, thanks smile

btw: when I tried the initrd image with the 2.6.17 kernel I got 3 warnings when udev started: it complained it couldn't create /dev/md0 /dev/md1 and /dev/md2, maybe there's also a little bug there? wink (but it does work)

Offline

#6 2006-06-28 23:37:38

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: raid doing weird with initcpio

mouse256 wrote:
phrakture wrote:

Anyway, seeing as there is nothing fancy, try the following mkinitcpio.conf settings:

MODULES="raid0 ext3"
HOOKS="base udev autodetect sata keymap"

Works perfectly now, no more warnings and somewhat faster, thanks smile

Hah, you can improve it further... run mkinitcpio -M (I think it's -M), make note of your sata controller module.

MODULES="my_sata_controller libata raid0 ext3"
HOOKS="base"

keymap too if you want it 8)

Offline

#7 2006-06-29 06:30:08

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: raid doing weird with initcpio

hehehe, but it's running good and quick now, if it ain't broke, ... wink

But I just noticed the following: I also have a pata disk and a dvdwriter connected through pata.  When I don't add the "ide" hook I can't use these devices. Is that normal? I thought you only needed to add stuff in initcpio for booting? (and I don't boot from the pata or the dvd, they are only storage)

Offline

#8 2006-06-29 07:05:07

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,328

Re: raid doing weird with initcpio

i have already a patch, that would disable md assembly by kinit, shall i commit it phrakture?

Offline

#9 2006-06-29 15:52:24

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: raid doing weird with initcpio

tpowa wrote:

i have already a patch, that would disable md assembly by kinit, shall i commit it phrakture?

No.  That's not a good idea.  kinit should be sane enough to skip already configured devices, without failing.  There are a few ioctl's in kinit that check if an md device is assembled, but they appear to be failing.  It is best to fix the ioctl checks to see if a device exists.

The 'raid' hook is not 100% proper.  It is meerly there to assemble a raid device if something else needs to be done before mounting it (i.e. decryption).  The raid assembly inside kinit is important.  Not only that, I trust the people working on kinit know this stuff better than I do and would not remove pieces of their code.

Offline

#10 2006-06-29 15:55:42

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: raid doing weird with initcpio

mouse256 wrote:

I also have a pata disk and a dvdwriter connected through pata.  When I don't add the "ide" hook I can't use these devices. Is that normal? I thought you only needed to add stuff in initcpio for booting? (and I don't boot from the pata or the dvd, they are only storage)

The normal user-land udev does not pick this up?  It sounds like it may be a udev configuration issue.  However, I'll venture a guess - this is something iphitus knows better, but there are a few controllers that support *both* pata and sata.  I'd guess that if the sata controller is loaded first, the pata one will not be picked up by a uevent, but I can't guarentee that.

If it is a different module, try loading that manually.

Offline

#11 2006-06-29 16:44:47

mouse256
Member
From: Antwerpen, Belgium
Registered: 2005-08-24
Posts: 247

Re: raid doing weird with initcpio

I'm using an asus a7n8x board.
The sata controller is silicon image (sata_sil)
The pata controller is nforce 2 (amd74xx)

I think the amd74xx module is loaded when I don't put the ide hook in mkinitcpio, but I'm not shure about that. I must remake the bad initcpio to test (but I have an examination tomorrow, so the test won't be for today wink )

Offline

Board footer

Powered by FluxBB