From owner-freebsd-hackers@freebsd.org Fri Dec 27 19:37:13 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21DED1CCFBD for ; Fri, 27 Dec 2019 19:37:13 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47kxsz1z4qz4TVx for ; Fri, 27 Dec 2019 19:37:10 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id xBRJaWYe039739; Fri, 27 Dec 2019 11:36:32 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id xBRJaWmL039738; Fri, 27 Dec 2019 11:36:32 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201912271936.xBRJaWmL039738@gndrsh.dnsmgr.net> Subject: Re: Scripting bsdinstall In-Reply-To: <72fa9e36-4460-c09c-25a8-b8157bacccdb@astart.com> To: papowell@astart.com Date: Fri, 27 Dec 2019 11:36:32 -0800 (PST) CC: freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 47kxsz1z4qz4TVx X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.45 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; FROM_HAS_DN(0.00)[]; IP_SCORE(0.04)[ip: (0.14), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.02), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.56)[-0.563,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 19:37:13 -0000 > On 2019-12-25 04:48, Mike Remski wrote: > > On Wednesday, December 25, 2019 7:43:26 AM EST, Gleb Popov wrote: > >> > >> > >> On Wed, Dec 25, 2019 at 4:37 PM Mike Remski wrote: > >> On Wednesday, December 25, 2019 4:31:50 AM EST, Gleb Popov wrote: > >>> On Sun, Dec 22, 2019 at 9:47 PM Gleb Popov wrote: > >>> > >>>> On Sun, Dec 15, 2019 at 4:51 PM Matthew Seaman > >>>> wrote: > >>>> ?... > >>> > >>> I had to do all these "bsdinstall" invocations in the preamble > >>> because I > >>> wanted to set up partitions in my way. It turned out that the value of > >>> PARTITIONS variable is directly passed to "bsdinstall scriptedpart", > >>> so my > >>> installerscript got reduced to > >>> > >>> DISTRIBUTIONS="base.txz kernel.txz lib32.txz" > >>> PARTITIONS="ada0 gpt { 512K freebsd-boot , 2G freebsd-ufs / , 4G > >>> freebsd-swap , 8G freebsd-ufs /var , 4G freebsd-ufs /tmp , auto > >>> freebsd-ufs > >>> /usr }" > >>> > >>> #!/bin/sh > >>> > >>> sysrc ifconfig_DEFAULT=DHCP > >>> > >>> It now works, and even the second part gets properly executed. > >>> > >>> However, no boot loader gets installed. Skimming through "bsdinstall > >>> bootconfig" source reveals that it only supports installing boot > >>> files for > >>> UEFI loader. What should I do in case of BIOS? > >> In bsdinstall/scripts/zfsboot there are a couple things that look > >> related to what you want.? GPART_BOOTCODE, GPART_BOOTCODE_PART and > >> GPART_BOOTCODE_PARTONLY, plus GPART_SET_ACTIVE and > >> GPART_SET_PMBR_ACTIVE.? I know you are using UFS, but it may help > >> figure out what you need. > >> > >> Thanks for these, but I ended up adding > >> > >> gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > >> > >> to the second part of the script. It should be noted that it wasn't > >> working without "-b /boot/pmbr" part. > > > > Ahh.? I think at one time you needed to do them as separate gpart > > commands then you needed to have both options on the same command.? > > Glad you got it working. > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to > > "freebsd-hackers-unsubscribe@freebsd.org" > > > As a highly interested outside observer,? is it possible to put this > accumulated wisdom into a document and put it on a FreeBSD Web Site? > > Scripting FreeBSD installs seems to be a lost,? or at least,? arcane Art. +1 on that, and/or can this lead to some enhancements to bsdinstall(8) man page? > -- > Patrick Powell Astart Technologies -- Rod Grimes rgrimes@freebsd.org