Date: Fri, 27 Dec 2019 11:36:32 -0800 (PST) From: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net> To: papowell@astart.com Cc: freebsd-hackers@freebsd.org Subject: Re: Scripting bsdinstall Message-ID: <201912271936.xBRJaWmL039738@gndrsh.dnsmgr.net> In-Reply-To: <72fa9e36-4460-c09c-25a8-b8157bacccdb@astart.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <mremski@comcast.net> 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 <arrowd@freebsd.org> wrote: > >>> > >>>> On Sun, Dec 15, 2019 at 4:51 PM Matthew Seaman <matthew@freebsd.org> > >>>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912271936.xBRJaWmL039738>