From owner-freebsd-hackers Thu Feb 26 08:13:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA09660 for freebsd-hackers-outgoing; Thu, 26 Feb 1998 08:13:05 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from garbo.lodgenet.com (garbo.lodgenet.com [204.124.122.252]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id IAA09642 for ; Thu, 26 Feb 1998 08:12:50 -0800 (PST) (envelope-from erich@lodgenet.com) Received: from jake.lodgenet.com (jake.lodgenet.com [10.0.122.30]) by garbo.lodgenet.com (8.6.12/8.6.9) with ESMTP id KAA19415; Thu, 26 Feb 1998 10:11:06 -0600 Received: from jake.lodgenet.com (localhost [127.0.0.1]) by jake.lodgenet.com (8.8.8/8.8.5) with ESMTP id KAA13367; Thu, 26 Feb 1998 10:12:06 -0600 (CST) Message-Id: <199802261612.KAA13367@jake.lodgenet.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Luigi Rizzo cc: hackers@FreeBSD.ORG Subject: Re: a chicken-egg problem with bootp and nfs_mountroot In-reply-to: Your message of "Thu, 26 Feb 1998 14:00:00 +0100." <199802261300.OAA13677@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 26 Feb 1998 10:12:06 -0600 From: "Eric L. Hernes" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Howdy, A couple weeks ago I did some rather gross hacks locally here to get around some similar problems.. I wanted a MFS root with NFS swap, via boot rom. I ended up calling nfs_moutroot() from mfs_mountroot() or something like that, all buggered up with an MFS_NETBOOT option... Pretty hackish, but it works and I haven't gotten a chance to clean it up yet :( Is that of any interest? Do you have any ideas on a cleaner way to accomplish this... Or is this irrelevant to your question? ;-) Thanks, Eric Luigi Rizzo writes: >Hi, > >i think we have a chicken-egg problem with bootpc_init. > >the code in autoconf decides what to mount as root depending on various >things including nfs_diskless_valid > >nfs_diskless_valid is set to non-zero value by either the boot rom, >or by bootpc_init() (or by a config option BOOTP_NFSROOT, but that's >very annoying). > >Unfortunately bootpc_init() is only called by nfs_mountroot(), which is a >bit too late since the decision has already been taken not to call >nfs_mountroot() ! > >Could we move the call to bootpc_init() earlier, e.g. in configure() >(file autoconf.c) ? > >the function is passed a pointer to the nfs_diskless structure, and one >which is curproc ... > >Any idea before i just test this ? > > cheers > luigi >-----------------------------+-------------------------------------- >Luigi Rizzo | Dip. di Ingegneria dell'Informazione >email: luigi@iet.unipi.it | Universita' di Pisa >tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) >fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ >_____________________________|______________________________________ > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-hackers" in the body of the message > -- Eric L. Hernes erich@lodgenet.com erich@rrnet.com http://rrnet.com/~erich To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message