On 3/21/07, MickB <[EMAIL PROTECTED]> wrote:
>     I would like to get an answer for a question about kernel related
> filesystems mounting, before and after initramfs's treatment. Before
> calling udev's "stuff" within my initramfs, I have to mount kernel
> filesystems on my temporary system : /proc, /sys and /dev. Quite normal.
> Then I call udev, it makes its job and we can go further. It's at this
> point I have a doubt.

You can simply remount /proc and /sys in the real root, just like is
done in the mountkernfs filesystem. However, you want to transition
/dev from the init root to the real root because that's where all the
device nodes have been created. In the script I attached before, this
is done just before run-init:

mount -o move /dev /sysroot/dev

In the udev bootscript, you probably want to make some things
conditional since they were already done from the initramfs: mounting
of /dev and copying of static devices. This is what I changed:

                if ! mountpoint /dev >/dev/null 2>&1; then
                        if ! mount -n -t tmpfs tmpfs /dev -o mode=755; then
                                echo_failure
                                boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" 
${FAILURE}
                                boot_mesg -n " onto /dev, this system will be 
halted."
                                boot_mesg -n "\n\nAfter you press Enter, this 
system"
                                boot_mesg -n " will be halted and powered off."
                                boot_mesg -n "\n\nPress Enter to continue..." 
${INFO}
                                boot_mesg "" ${NORMAL}
                                read ENTER
                                /etc/rc.d/init.d/halt stop
                        fi
                fi

and

                # Copy static device nodes to /dev
                for s in /lib/udev/devices/*; do
                        [ -e "/dev/${s##*/}" ] || cp -a $s /dev
                done

--
Dan

P.S. Please don't top-post and try to trim down the replies.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to