From owner-freebsd-stable@FreeBSD.ORG Fri Jul 9 06:27:24 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E27A106567C for ; Fri, 9 Jul 2010 06:27:24 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id F3A4F8FC15 for ; Fri, 9 Jul 2010 06:27:23 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1OX73R-000HfX-Vs; Fri, 09 Jul 2010 09:27:22 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Jeremy Chadwick In-reply-to: <20100708164022.GA46433@icarus.home.lan> References: <4C34C5DE.7040007@aldan.algebra.com> <4C34CA31.7010804@aldan.algebra.com> <4C34E39A.7090905@aldan.algebra.com> <20100708135353.GA43460@icarus.home.lan> <4C35E9D4.8080007@aldan.algebra.com> <20100708164022.GA46433@icarus.home.lan> Comments: In-reply-to Jeremy Chadwick message dated "Thu, 08 Jul 2010 09:40:22 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Fri, 09 Jul 2010 09:27:21 +0300 From: Daniel Braniss Message-ID: Cc: freebsd-stable@freebsd.org Subject: Re: net-booting the install disks (Re: 8.x grudges) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2010 06:27:24 -0000 > On Thu, Jul 08, 2010 at 11:08:04AM -0400, Mikhail T. wrote: > > 08.07.2010 09:53, Jeremy Chadwick =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0= =B0=D0=3D=B2(=D0=BB=D0=B0): > > >Then don't modify loader.conf. Instead, once the =22Welcome to Free= BSD=21=3D=22 > > >portion of loader appears, press =226=22 to shell to the loader prom= pt > > >and type: > > > > > >set vfs.root.mountfrom=3D=22ufs:/dev/md0=22 > > >boot > > Yes, that works... It just should not be necessary. >=20 > Okay, so let me get this straight. First the complaint was that you ha= d > to modify loader.conf, which involved extracting the CD image, editing > the file, yadda yadda. Now that you've been shown you don't have to > edit loader.conf, the complaint is =22it shouldn't be necessary=22. :-= ) >=20 > There's actually quite a bit about FreeBSD that =22shouldn't be> necess= ary=22 (from an administrator's point of view), but that's a > completely separate issue when compared to your =22when I do thing X in= > the kernel config, it breaks=22. Which of those two approaches do you > want to focus on? > > > Red Hat's =22kickstart=22 does not require one to extract CD-images= to > > fiddle with a couple of lines, and FreeBSD comes tantalizingly close > > to offer the same functionality. Just not quite :-( > > I've PXE booted Ubuntu and Debian. It was easy to accomplish (read: > easier than FreeBSD) because they offer pxelinux vs. FreeBSD's pxeboot.= > > pxelinux=5B1=5D offers the ability to read a configuration file via T= FTP, > which configures pxelinux itself. The configuration capabilities are > very impressive=5B2=5D. FreeBSD folks interested in PXE should really = take > a look at this thing. I believe the configuration file is read and > applied immediately, so things like serial port speed changes happen > before pxelinux outputs anything (e.g. no need to rebuild pxelinux just= > to get a faster rate). >=20 > That said, given that FreeBSD's pxeboot requires a bunch of extra work > (rebuilding for faster serial speed, and a bunch of other stuff -- it's= > in my doc), I'm a surprised you're not complaining about that. :-) >=20 > The bottom line: the PXE booting framework in FreeBSD could be improved= . It has been improved, though not the documentation :-( you can configure most of the stuff via DHCP, take a look at src/lib/libstand/bootp.c example lines from dhcpd.conf: option FBSD.ind0 =22hint.uart.0.flags=3D0x10=22 option FBSD.ind1 =22kern.ipc.semmni=3D256=22 option FBSD.ind2 =22kern.ipc.semmns=3D2048=22 and with this code in rc.initdiskless: confpath=3D=60kenv conf-path=60 if =5B -n =22=24confpath=22 =5D ; then if =5B =22=60expr =24confpath : '=5C(.*=5C):'=60=22 =5D ; then echo Mounting =24confpath on /conf mount_nfs =24confpath /conf chkerr =24? =22mount_nfs =24confpath /conf=22 to_umount=3D=22=24=7Bto_umount=7D =24confpath=22 fi fi eval =60kenv =7C sed -n 's/=5Erc=5C.//p'=60 rm -f /etc/rc.conf /etc/rc.conf.local for fc in =24conf0 =24conf1 =24conf2 =24conf3 =24conf4 =24conf5 =24conf6 = =24conf7 =24conf8=20 =24conf9 rc.conf.=24hostname do ho=3D=60expr =24fc : '=5C(.*=5C):'=60 fl=3D=60expr =24fc : '.*/=5C(.*=5C)'=60 if =5B =22=24=7Bho=7D=22 =21=3D =22=22 =5D; then mp=3D=60expr =24fc : '=5C(.*=5C)/.*'=60 mount_nfs =24mp /mnt > /dev/null 2>&1 if =5B -f /mnt/=24fl =5D; then echo =22=23 from =24fc /mnt/=24fl=22 >> /etc/rc.conf cat /mnt/=24fl >> /etc/rc.conf fi umount /mnt > /dev/null 2>&1 elif =5B -e /conf/=24fc =5D ; then echo =22=23 from /conf/=24fc=22 >> /etc/rc.conf cat /conf/=24fc >> /etc/rc.conf fi done and these lines in dhcpd.conf option FBSD.conf-path=3D=22fr-01:/vol/system/share/conf=22 option FBSD.rc-conf3 =22rc.ws8=22 ... will generate a 'personalized' rc.conf danny PS: this is not the first time I have posted this. =5B...=5D