Bug#318120: initrd-tools: i2o-root not detected correctly
On Wed, Jul 13, 2005 at 05:46:08PM +0200, Raoul Borenius wrote:
> Package: initrd-tools
> Version: 0.1.81.1
> Severity: normal
>
>
> when installing kernel-image-2.6.8-2-686-smp on a box with i2o-RAID:
>
> Setting up kernel-image-2.6.8-2-686-smp (2.6.8-16) ...
> /usr/sbin/mkinitrd: /dev/i2o/hda2: Unknown root device
> Please refer to the manual page.
> Failed to create initrd image.
> dpkg: error processing kernel-image-2.6.8-2-686-smp (--configure):
> subprocess post-installation script returned error exit status 9
> Errors were encountered while processing:
> kernel-image-2.6.8-2-686-smp
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> The root should in fact be /dev/i2o/hda1. Would love to supply a patch
> but I'm a bit lost when looking at /usr/sbin/mkinitrd...
Yes, its pretty scary, isn't it.
I had a bit of a poke around and basically there seem to be two problems.
1. Its detecting your root device as /dev/i2o/hda2
wheras it is /dev/i2o/hda1
This should be easy enough to track down.
Unless you have something special going on, mkinird
determines the the root device parsing /etc/fstab
The attached script get_root_dev, is the relevant
code from mkinird, broken out into something
a bit more paletable. Could you try running that
2. Secondly, and more importantly, mkinitrd does not support i2o-RAID.
Hopefully this is easy enough to fix, though the day
we replace initrd with something else will be a wonderful
day indeed.
In the meantime, could you give let me know
what the major device numbers for /dev/i2o/hda*
are. And what kernel modules need to be loaded for
i2o-RAID to work.
Thanks
--
Horms
#!/bin/bash
script='
BEGIN { printf "set -- " }
/^#/ { next }
$2 == "/" { root = $1; type = $3; next }
$3 == "swap" { printf "'\''%s'\''", $1 }
END {
print ""
print "root=" root
print "fstabtype=" type
}
'
awk "$script" /etc/fstab
Reply to: