dmraid works with my TX-2000
Dick
dm at chello.nl
Wed Apr 20 17:30:36 UTC 2005
> I also modified Gerte's linuxrc and Gentoo's /sbin/rc. Probably only
> useful if you're running Gentoo, don't know if this will apply
> anywhere else.
I'm also running running Gentoo Linux, it applies to me ;-)
> I modified linuxrc to copy the device-mapper nodes from the initrd
> filesystem (where dmraid "created" them) to the "static" /dev, eg. a
> /dev/mapper folder in the root filesystem (line 163, just before
> pivot()'ing):
>
> echo -e "${GOOD}>>${NORMAL}${BOLD} Copying device-mapper nodes...${NORMAL}"
> rm -rf /newroot/dev/mapper
> mkdir /newroot/dev/mapper
> cp -dpr /dev/mapper/* /newroot/dev/mapper/
I thought about that, but I don't like the "newroot" to be mounted read/write
during initrd-time :(
> Also, I modified Gentoo's /sbin/rc script to save the device-mapper
> nodes before it mounts udev and restore them afterwards (line 184):
I don't like hacking /sbin/rc ;-) ... And I think this stuff is udev's
resposibility, isn't it possible to learn udev to do the trick?
> Works like a charm.
I believe that! :) ... I'm really suprised to see someone got through the same
initrd hell as me ;-)
I've wrote a new linuxrc inspired by Gerte's linuxrc, simplified and less
external binaries needed:
#######################################
#!/bin/bash
/bin/mount -o remount,rw /
/bin/mount -t proc none /proc
/bin/mount -t sysfs none /sys
read CMDLINE < /proc/cmdline
for PARAM in $CMDLINE ; do
case "${PARAM}" in
real_root*)
REAL_ROOT=${PARAM/real_root=/}
;;
real_init*)
REAL_INIT=${PARAM/real_init=/}
;;
esac
done
/sbin/dmraid -ay
/bin/mount -t ext3 -o ro $REAL_ROOT /root
exec <dev/console >dev/console 2>&1
cd /root
mount -o remount,ro /initrd
/sbin/pivot_root . initrd
umount /initrd/proc
umount /initrd/sys
exec chroot . $REAL_INIT
exec /bin/bash
#######################################
I really have to dig in the udev stuff, to check how dmraid could coorporate
with udev.
Greetings,
Dick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ataraid-list/attachments/20050420/cc29d977/attachment.sig>
More information about the Ataraid-list
mailing list