Messages in this thread Patch in this message | | | Date | Tue, 20 May 1997 18:09:46 +0200 (MEST) | From | Hubert Mantel <> | Subject | Re: initrd and NFS |
| |
On Tue, 20 May 1997, Werner Almesberger wrote:
> Are there any other problems initrd users have experienced ?
Yes: If you boot with initrd, you cannot start a UMSDOS based Linux-system because the pseudo-root will get destroyed. The attached patch fixes this.
> Thanks, > - Werner
Hubert mantel@suse.de
--------------------------------------------------------------------------- diff -urN linux-2.0.30/fs/super.c linux-2.0.30-initrd/fs/super.c --- linux-2.0.30/fs/super.c Tue Apr 8 17:47:46 1997 +++ linux-2.0.30-initrd/fs/super.c Tue May 20 14:18:17 1997 @@ -1054,6 +1054,17 @@ } ROOT_DEV = new_root_dev; do_mount_root(); + +#ifdef CONFIG_UMSDOS_FS + { + extern struct inode *pseudo_root; + if (pseudo_root != NULL){ + current->fs->root = pseudo_root; + current->fs->pwd = pseudo_root; + } + } +#endif + old_fs = get_fs(); set_fs(get_ds()); error = namei(put_old,&inode); diff -urN linux-2.0.30/fs/umsdos/inode.c linux-2.0.30-initrd/fs/umsdos/inode.c --- linux-2.0.30/fs/umsdos/inode.c Sat Nov 30 11:21:22 1996 +++ linux-2.0.30-initrd/fs/umsdos/inode.c Tue May 20 14:22:57 1997 @@ -380,6 +380,9 @@ /* Read the super block of an Extended MS-DOS FS. */ +#ifdef CONFIG_BLK_DEV_INITRD +extern int mount_initrd; +#endif struct super_block *UMSDOS_read_super( struct super_block *s, void *data, @@ -409,7 +412,11 @@ PRINTK (("umsdos_read_super %p\n",sb->s_mounted)); umsdos_setup_dir_inode (sb->s_mounted); PRINTK (("End umsdos_read_super\n")); - if (s == super_blocks){ +#ifdef CONFIG_BLK_DEV_INITRD + if (s == super_blocks || mount_initrd){ +#else + if (s == super_blocks) +#endif /* #Specification: pseudo root / mount When a umsdos fs is mounted, a special handling is done if it is the root partition. We check for the presence diff -urN linux-2.0.30/init/main.c linux-2.0.30-initrd/init/main.c --- linux-2.0.30/init/main.c Sat Nov 23 14:28:23 1996 +++ linux-2.0.30-initrd/init/main.c Tue May 20 14:18:18 1997 @@ -969,6 +969,7 @@ "error %d\n",error); } } + mount_initrd = 0; /* don't forget this or funny things may happen ;-) */ #endif /* ---------------------------------------------------------------------------
| |