Re: pre-2.0.31-6 hangs at boot (with autofs)

Janos Farkas (Janos.Farkas-#Eu/k/GXxPIIYAAfEIkLfMpPhQ7S@shadow.banki.hu)
Fri, 15 Aug 1997 19:13:05 +0200


On 1997-08-15 at 06:19:32, Trevor Johnson wrote:
[heh, lately again.. :)]
> With pre-2.0.31-6 I'm still receiving the "Unable to open an initial
> console" message from init/main.c which I experienced with pre-2.0.31-5
> and reported yesterday.

With the autofs patch installed only? Good news. I've been through all
of this around January, but took this much time to remember what it was. :)

Could you try the patch in the following message? I encountered very
similar problems when I was tinkering with romfs at the beginning of
the year. It also explains *why* it does fail. Remember, you had
both isofs and autofs compiled into the kernel. The patch was to
2.1.18, but I guess it applies cleanly, but at worst it's not more
than a snap to adapt to 2.0. If it's not appropriate for 2.0 somehow,
hpa should incorporate it into the 2.0 autofs patches.

-- 
Janos - Don't worry, my address works.  I'm just bored of spam.

-------------------- Original message ---------------------

[PATCH] isofs: fix set_fs() usage (ufs root) + more quiet mount

Ugh, it was a long hunt.. :) do_getname() is prepared to EFAULT if someone tries to open a file, whose name is in kernel space AND get_fs() is not KERNEL_DS. All right, that's for kernel open()'s like in init/main.c. But, isofs clobbered this to be USER_DS, and that caused any harm only if we mounted the root fs from a filesystem which was registered after isofs... These would be sysv, hpfs, affs and ufs; and none of them are normally used for mounting root (although I can imagine the Sparc people tried sometimes ufs). Also I had a new fs registered lastly, and I didn't manage to use it as a root fs... :)

Also another visual fix; all those log zone, etc. messages now don't show up on console, but the "ISO9660 Extensions" still bothered me frequently...

Janos

diff -urpN linux-2.1.18-pre-base/fs/isofs/inode.c linux-2.1.18-pre-work/fs/isofs/inode.c --- linux-2.1.18-pre-base/fs/isofs/inode.c Wed Jan 1 19:17:26 1997 +++ linux-2.1.18-pre-work/fs/isofs/inode.c Sun Dec 29 18:19:15 1996 @@ -193,6 +193,11 @@ static unsigned int isofs_get_last_sessi vol_desc_start=0; if (get_blkfops(MAJOR(dev))->ioctl!=NULL) { + /* Whoops. We must save the old FS, since otherwise + * we would destroy the kernels idea about FS on root + * mount in read_super... [chexum] + */ + unsigned long old_fs=get_fs(); inode_fake.i_rdev=dev; ms_info.addr_format=CDROM_LBA; set_fs(KERNEL_DS); @@ -200,7 +205,7 @@ static unsigned int isofs_get_last_sessi NULL, CDROMMULTISESSION, (unsigned long) &ms_info); - set_fs(USER_DS); + set_fs(old_fs); #if 0 printk("isofs.inode: CDROMMULTISESSION: rc=%d\n",i); if (i==0) diff -urpN linux-2.1.18-pre-base/fs/isofs/rock.c linux-2.1.18-pre-work/fs/isofs/rock.c --- linux-2.1.18-pre-base/fs/isofs/rock.c Wed Jan 1 19:17:26 1997 +++ linux-2.1.18-pre-work/fs/isofs/rock.c Tue Dec 31 15:17:20 1996 @@ -287,7 +287,7 @@ int parse_rock_ridge_inode(struct iso_di CHECK_CE; break; case SIG('E','R'): - printk("ISO9660 Extensions: "); + printk(KERN_DEBUG"ISO9660 Extensions: "); { int p; for(p=0;p<rr->u.ER.len_id;p++) printk("%c",rr->u.ER.data[p]); };

-------------------- End of original message ---------------------