On Fri, Sep 14, 2001 at 09:17:45PM +0200, Guillaume Cottenceau wrote:
> 
> I'm "missing the point" :-) ?

Yes you are.  Here is what the kernel does when it mounts the initrd
and then mounts the real root fs starting with init():

    lock_kernel();
    do_basic_setup();

    prepare_namespace();
    ...

and prepare_namespace():

#ifdef CONFIG_BLK_DEV_INITRD
    int real_root_mountflags = root_mountflags;
    if (!initrd_start)
        mount_initrd = 0;
    if (mount_initrd)
        root_mountflags &= ~MS_RDONLY;
    real_root_dev = ROOT_DEV;
#endif

#ifdef CONFIG_BLK_DEV_RAM
#ifdef CONFIG_BLK_DEV_INITRD
    if (mount_initrd)
        initrd_load();
    else
#endif
    rd_load();
#endif

    /* Mount the root filesystem.. */
    mount_root();

    mount_devfs_fs ();

#ifdef CONFIG_BLK_DEV_INITRD
    root_mountflags = real_root_mountflags;
    if (mount_initrd && ROOT_DEV != real_root_dev
        && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
        int error;
        int i, pid;

        pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
        if (pid>0)
            while (pid != wait(&i));
        if (MAJOR(real_root_dev) != RAMDISK_MAJOR
             || MINOR(real_root_dev) != 0) {
            error = change_root(real_root_dev,"/initrd");
            if (error)
                printk(KERN_ERR "Change root to /initrd: "
                    "error %d\n",error);
        }
    }
#endif

As you can see, when the kernel mounts the initrd and then mounts the
real root, it saves the "rootflags" to be applied later when the REAL
root is mounted and mounts the initrd with RO only.  With the new
Mandrake mkinitrd this funcionality is broken.

> Try with a reiserfs rootfs, with rootflags=notail and tell me what
> happens.

I don't care to thanks.  I don't need to.  I have proved with the code
above from the current kernel that if you do not mount the real root
with the rootflags values in your mkinitrd, you have broken
compatibility.  

> Impossible without patching the kernel at this point. And Al Viro doesn't
> answer anyway.

Well, maybe a patch is needed then?

> don't use rootflags then.

So when I use Mandrake Linux, I can't use standard kernel features?
Is that the way to gain users?

b.


-- 
Brian J. Murrell

Reply via email to