Solution? Re: pxe-install on FreeBSD 5.3

Doug Ambrisko ambrisko at ambrisko.com
Wed Oct 27 09:25:06 PDT 2004


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.


More information about the freebsd-current mailing list