Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2004 09:25:03 -0700 (PDT)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Solution? Re: pxe-install on FreeBSD 5.3
Message-ID:  <200410271625.i9RGP3tZ040585@ambrisko.com>
In-Reply-To: <60398.1098860148@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp writes:
| After looking again I think I'll change my position:  This entire thing
| should be yanked out and we should rely on the loader to set the right
| variables instead.

Which is why I have this patch to sys/boot:
Index: i386/libi386/pxe.c
===================================================================
RCS file: /usr/local/cvsroot/freebsd/src/sys/boot/i386/libi386/pxe.c,v
retrieving revision 1.20
diff -u -p -r1.20 pxe.c
--- i386/libi386/pxe.c	25 Aug 2003 23:28:31 -0000	1.20
+++ i386/libi386/pxe.c	27 Oct 2004 16:13:48 -0000
@@ -308,6 +308,7 @@ pxe_open(struct open_file *f, ...)
 		}
 		setenv("boot.nfsroot.server", inet_ntoa(rootip), 1);
 		setenv("boot.nfsroot.path", rootpath, 1);
+		setenv("vfs.root.mountfrom", "nfs", 1);
 	}
     }
     pxe_opens++;

When doing a PXE netboot so NFS mounts versus something else like a RAID
controller which might not actually be used.  This can end up with a
in use type error preventing me from initializing the RAID controller.
Sometimes (I forget if it is 4.X or 5.X) I'd get the RAID controller
mounted as root if it was valid.

Note this change would "break" people doing a PXE style FreeBSD Install
via the mdroot but for that the loader.conf on the FreeBSD install
images could have
	vfs.root.mountfrom=md<?>
then they should be okay.  I think this would be more correct then
the current scheme.

I would prefer this not have to be required to be set in the loader so we 
can boot via EtherBoot which sets the root via the BOOTP_NFSROOT option.

FYI, is there any objection to this patch for now. 

Doug A.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410271625.i9RGP3tZ040585>