Re: Solution? Re: pxe-install on FreeBSD 5.3

From: Doug Ambrisko <ambrisko_at_ambrisko.com>
Date: Wed, 27 Oct 2004 09:25:03 -0700 (PDT)
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
_at__at_ -308,6 +308,7 _at__at_ 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.
Received on Wed Oct 27 2004 - 14:25:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:19 UTC