Re: dmraid works with my TX-2000

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

Attachment: pgpDZDSA4yEhp.pgp
Description: PGP signature


[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux