Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2019 12:51:38 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Scripting bsdinstall
Message-ID:  <96ecfc02-04f6-7222-4582-3740c505c7e5@FreeBSD.org>
In-Reply-To: <CALH631=S0d9kmYRNrG5PVg9rqUF80Ko_Z5DsP=9dGKQKodW5Hg@mail.gmail.com>
References:  <CALH631=S0d9kmYRNrG5PVg9rqUF80Ko_Z5DsP=9dGKQKodW5Hg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Zarp4nHAU0DLl7m62uDq23hTJqNlYaTk1
Content-Type: multipart/mixed; boundary="S6koaFF5hmWbrAgo5eFrwvsw5xlg5MReR"

--S6koaFF5hmWbrAgo5eFrwvsw5xlg5MReR
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 15/12/2019 09:52, Gleb Popov wrote:
> - How do I setup networking on target machine? Examples propose running=

> sysrc ifconfig_em0=3DDHCP, but how do I know interface name?

For interfaces, you can just say:

  sysrc ifconfig_DEFAULT=3DDHCP

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=3D"inet6 accept_rtadv"' doesn't hav=
e
the desired effect of enabling SLAAC everywhere.

> - Same question goes for target drive. In most cases it is ada0, but ho=
w do
> I dynamically find it out?

This one is trickier.  You can't feasibly write a generic zero-knowledge
install script: there are too many variables to deal with.  Basically
you're going to have to assume some knowledge about what disks are
present in your systems and how they are connected.

If you know you're always going to be attaching your drives to an
on-board SAS controller, then /dev/ada0 is the right choice.

If you need to handle systems with larger numbers of drives which may be
hanging off various different flavours of host bus adaptor or RAID
controller and you need to create (for example) some complicated ZPOOL
of multiple vdevs with hot spares and separate intent log or cache
devices; well, perhaps in that case aim for a basic single-disk install
(perhaps on a temporary device like a USB stick), get the minimal system
up and then script building your more complex storage solutions from
within that self-hosted and running system where you have the full power
of the shell and all the normal management tools available to you.

	Cheers,

	Matthew


--S6koaFF5hmWbrAgo5eFrwvsw5xlg5MReR--

--Zarp4nHAU0DLl7m62uDq23hTJqNlYaTk1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEGfFU7L8RLlBUTj8wAFE/EOCp5OcFAl32LFpfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE5
RjE1NEVDQkYxMTJFNTA1NDRFM0YzMDAwNTEzRjEwRTBBOUU0RTcACgkQAFE/EOCp
5OdiWQ//bo/nEIjoltNR1eCzmaEkFIGuGogZuJewKJvFJR7XFz+O6znSWuQTv50n
oFBJxoVGit9FlaT+gfF7B7hUrfIC8KtiSVU/ywyyOqSliNzCgD9LLur2uml9weym
RVeoiIKerRIrV751kg5jrG20AuCyK8dMlTOr0qjRb8SiSURuR1HsvtsaSWtsCtpc
8h0XwLjS3Op32y2EdmVy5v+kI3/LNgt7M+TPgV2CzZ/X2qoJQlFCIc4dupa6+M5R
YAQqeM0FRo3SqrUVPeYMiFwEKA+ZBeWa8djNVBf8z0gLFLs5vU7pn6cgFHTUBY7Z
HuzmDzJcj15h4QMFKVmAP5L0lxMT5xBhbXmCN0Bum/J8uaNjZeTOLtS5b09ZUOnK
Ria3LBwgLXAbn+1mSfW6Ia5+DRlioypgZ2WK+NxgdRWC5yr/kXMer2dg/V2vEksH
rzzFlIWdv+83U8ws+iQ1PcfkMp7QlGAW2Xrb06zIV9MqwnG9vRBPlveH5GIk3o8R
KuaCMdACj466YURnvSizHmQWxyHzx05qUoDhcijgunZalO2Kj1mFTFu/KqU5TWSr
5cf3vAmiMyLYRziKNAzT4jNXiiVFGM2n7sIc/vB9qgmbhavkA0zT5XNAc5iGLzEW
ivgOn0kqYps3wu3V3wpHDNmasr6zoGtL5wP8x+ZB/3pKi8OJq+4=
=C/AQ
-----END PGP SIGNATURE-----

--Zarp4nHAU0DLl7m62uDq23hTJqNlYaTk1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96ecfc02-04f6-7222-4582-3740c505c7e5>