Messages in this thread Patch in this message | | | Date | Mon, 2 Nov 1998 18:17:05 +0100 | From | Hubert Mantel <> | Subject | Re: umsdos & initrd / 2.0.35 |
| |
Hi,
On Sat, Oct 31, Florian Lohoff wrote:
> Hi, > i am trying to automatically install a small distribution via > network and continue booting via the umsdos pseudo root. > > If i do this with an full ext2 partition this works fine but on umsdos > i get (hand written) > > --schnipp----------- > UMSDOS Beta 0.6 (compatibility level 0.4, fast msdos) > VFS: Mounted root (umsdos filesystem) readonly. > Trying to unmount old root ... <3>error -16 > Change root to /initrd: error -2 > Unable to open initial console > > ------schnapp------- > > This is all Kernel 2.0.35 - id like to try 2.0.36pre but currently i cant > find the pre patches .. (*linux.org unresolvable) > > It seems to me that this is an umsdos/initrd bug but maybe someone else > knows more ...
This is an old bug. The attached patch fixes it but breaks use of UMSDOS as module. I know I should do a clean patch, but it should solve your problem as you need UMSDOS support compiled in anyway.
> Flo -o) Hubert Mantel Goodbye, dots... /\\ _\_v diff -urN linux-pre-2.0.31/fs/super.c linux-pre-2.0.31-umsdos/fs/super.c --- linux-pre-2.0.31/fs/super.c Tue Apr 8 17:47:46 1997 +++ linux-pre-2.0.31-umsdos/fs/super.c Wed Jun 18 17:25:59 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-pre-2.0.31/fs/umsdos/inode.c linux-pre-2.0.31-umsdos/fs/umsdos/inode.c --- linux-pre-2.0.31/fs/umsdos/inode.c Sat Nov 30 11:21:22 1996 +++ linux-pre-2.0.31-umsdos/fs/umsdos/inode.c Wed Jun 18 17:25:59 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")); +#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-pre-2.0.31/init/main.c linux-pre-2.0.31-umsdos/init/main.c --- linux-pre-2.0.31/init/main.c Wed Jun 18 17:24:04 1997 +++ linux-pre-2.0.31-umsdos/init/main.c Wed Jun 18 18:29:30 1997 @@ -973,9 +973,12 @@ if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) { int error; + mount_initrd = 0; pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); if (pid>0) while (pid != wait(&i)); + + mount_initrd = 1; if (real_root_dev != MKDEV(RAMDISK_MAJOR, 0)) { error = change_root(real_root_dev,"/initrd"); if (error) @@ -983,6 +986,7 @@ "error %d\n",error); } } + mount_initrd = 0; #endif /* | |