From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 16 09:44:14 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F46516A41F for ; Tue, 16 Aug 2005 09:44:14 +0000 (GMT) (envelope-from devif0@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F8D843D46 for ; Tue, 16 Aug 2005 09:44:13 +0000 (GMT) (envelope-from devif0@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so1153042wra for ; Tue, 16 Aug 2005 02:44:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bm3sqG2uqvgDEC/q+SejdSnQKMc/mfxLyJMyMDyrPj9qNXCDMHhorcFce4JVIA4bFUb17uKXo3ZZ5RCi0Px4nGyKYLLzsQiCq9fcKA4Kin3MLlTcvSxwscpZ2/7Dn9mRbx5IFHGwoVanFBd/IGjyzO6eTVrESrbv7gEHfuQSJfo= Received: by 10.54.10.61 with SMTP id 61mr4170522wrj; Tue, 16 Aug 2005 02:44:10 -0700 (PDT) Received: by 10.54.69.4 with HTTP; Tue, 16 Aug 2005 02:44:10 -0700 (PDT) Message-ID: <356446ef05081602442f94a346@mail.gmail.com> Date: Tue, 16 Aug 2005 11:44:10 +0200 From: iv gan To: John Baldwin In-Reply-To: <200508101107.31917.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <356446ef0508100239320d2bf0@mail.gmail.com> <6.1.0.6.2.20050810032350.078f3eb0@cobalt.antimatter.net> <356446ef050810061832003965@mail.gmail.com> <200508101107.31917.jhb@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, Glenn Dawson Subject: Re: howto make sysintall X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 09:44:14 -0000 Thanks for the answers John, Glen I think John was right that it is better to build my own mfsroot and then make config scripts etc. The `sysctl -a` can do the thing with detecting the hardware etc. It is a bit lammy but is working. Then dd fdisk bsdlabel and newfs do the rest. However if someone is there with an idea how to correctly build sysinstall it would be wellcome. greets.. Ivo On 8/10/05, John Baldwin wrote: > On Wednesday 10 August 2005 09:18 am, iv gan wrote: > > I am not so sure because the script cannot detect different devices. > > It can be ad or ar or whatever but it cannot chechk for it. And what I > > would like to do is more to detect the device and then to do something > > like 10% to /, 20% to /tmp 35% to /var and 35% to /usr or something > > like it. > > Any suggestion? >=20 > You can run a command to generate a config file that you then include. I= use > this with shell scripts that invoke 'dialog' to provide the user with cus= tom > menus. A sample is something like this: >=20 > install.cfg: >=20 > # select media > command=3Dsh /stand/setmedia.sh > system > configFile=3D/stand/setmedia.cfg > loadConfig >=20 > setmedia.sh: >=20 > #!/bin/sh > # > # Set the installation media based on kernel environment variables. >=20 > config=3D/stand/setmedia.cfg >=20 > case `kenv media` in > FTP) > iface=3D`kenv iface` > server=3D`kenv server` >=20 > echo "abort" > ${config} > if [ -z "${iface}" -o -z "${server}" ]; then > dialog --title "Missing Settings" --msgbox "The > network interface and FTP server must be specified\nvia the 'iface' and > 'server' variables in loader.conf." -1 -1 > exit 1 > fi > found=3D0 > for ifn in `ifconfig -l`; do > if [ "${ifn}" =3D "${iface}" ]; then > found=3D1 > fi > done > if [ ${found} -eq 0 ]; then > dialog --title "Invalid Interface" --msgbox "The > network interface ${iface} is not present." -1 -1 > exit 1 > fi > echo "# Setup for FTP install" > ${confi= g} > echo "command=3D/stand/dhclient ${iface}" >> ${co= nfig} > echo "system" >> ${conf= ig} > echo "hostname=3Dlocalhost" >> ${co= nfig} > echo "netDev=3D${iface}" >> ${co= nfig} > echo "_ftpPath=3Dftp://${server}/pub/FreeBSD" >> ${co= nfig} > echo "ifconfig_${iface}=3DDHCP" >> ${co= nfig} > echo "mediaSetFTP" >> ${conf= ig} > ;; > *) > # Default to CD > echo "# select CDROM media" > ${confi= g} > echo "mediaSetCDROM" >> ${conf= ig} > esac >=20 >=20 > This is just the part to setup the install media. What I do here is shar= e the > same mfsroot across both CD installs and installs over PXE, but in > the /usr/nfsroot on the PXE server I have a boot/loader.conf that looks l= ike: >=20 > boot/loader.conf: > # NFS install > media=3DFTP > iface=3Dfxp0 > server=3D10.1.2.3 >=20 > I also use a similar approach to use different disk layouts for different > configurations, etc. In my case I patched the release sources to include > kenv and dialog in the crunch for the mfsroot and added my custom scripts= to > stand/ in the mfsroot. >=20 > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org >