Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Dec 2019 21:47:29 +0400
From:      Gleb Popov <arrowd@freebsd.org>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Scripting bsdinstall
Message-ID:  <CALH631mswuj3xXJ8O96PKCBZUpBUWJ%2Bg0CsP0Cr7GTi1BbLS9w@mail.gmail.com>
In-Reply-To: <96ecfc02-04f6-7222-4582-3740c505c7e5@FreeBSD.org>
References:  <CALH631=S0d9kmYRNrG5PVg9rqUF80Ko_Z5DsP=9dGKQKodW5Hg@mail.gmail.com> <96ecfc02-04f6-7222-4582-3740c505c7e5@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 15, 2019 at 4:51 PM Matthew Seaman <matthew@freebsd.org> wrote:

> On 15/12/2019 09:52, Gleb Popov wrote:
> > - How do I setup networking on target machine? Examples propose running
> > sysrc ifconfig_em0=DHCP, but how do I know interface name?
>
> For interfaces, you can just say:
>
>   sysrc ifconfig_DEFAULT=DHCP
>
> and it will match any interface name that doesn't have a more specific
> ifconfig setting (so, not lo0).  Only works for IPv4 as far as I can
> tell -- saying 'ifconfig_DEFAULT_ipv6="inet6 accept_rtadv"' doesn't have
> the desired effect of enabling SLAAC everywhere.
>

Great, exactly what I needed, thanks.

I ended up with following script:


DISTRIBUTIONS="base.txz kernel.txz lib32.txz"
export DISTRIBUTIONS

bsdinstall checksum
bsdinstall hostname
bsdinstall scriptedpart ada0 gpt { 512K freebsd-boot , 2G freebsd-ufs / ,
4G freebsd-swap , 8G freebsd-ufs /var , 4G freebsd-ufs /tmp , auto
freebsd-ufs /usr }
bsdinstall mount
bsdinstall distextract
bsdinstall config
bsdinstall entropy

#!/bin/sh

sysrc ifconfig_DEFAULT=DHCP


While I feel a bit wrong using `bsdinstall` command in the preamble part,
but it works pretty nice. However, the script part doesn't seem work. The
last window I see in the installer is "No root partition is found. The root
partition must have a mountpoint of /". After I hit OK, the script ends and
no "sysrc" command is run.

What am I doing wrong now?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631mswuj3xXJ8O96PKCBZUpBUWJ%2Bg0CsP0Cr7GTi1BbLS9w>