Scripting bsdinstall

Mike Remski mremski at comcast.net
Wed Dec 25 12:37:46 UTC 2019


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 at freebsd.org> wrote:
>
>> On Sun, Dec 15, 2019 at 4:51 PM Matthew Seaman <matthew at 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.


More information about the freebsd-hackers mailing list