From owner-freebsd-hackers@freebsd.org Sun Dec 22 17:47:57 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 B64991D867E for ; Sun, 22 Dec 2019 17:47:57 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47gqhD6l4tz4cx2; Sun, 22 Dec 2019 17:47:56 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f51.google.com with SMTP id n25so10981215lfl.0; Sun, 22 Dec 2019 09:47:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7hwMTMTof0m6VFsPFtxo+tkbDW0yFng70zf8p737q64=; b=F42Ya1nCZyvQjgPtHC6xOZpk7a56gepSTfs+YI7a3YriwqxstXjSHBxhys3wn4KoZa xZ+MtRhIUhyH/nH5fzj2Ne+HwXNYFEKDof9TXhrsmvOHvQ8/RNLdxd7G0rcAp4bHZJaP C4xmhKf0ur7fOOkkeDl8wZcT0GU3alGNQ3MxzkH8/5GRl0LEZd70Z0Jqu7uuU6tIuSLQ XQn5SFUNi0Q8rO7M4kKZNK14k79o9hqBBmzdJvX2uvikUKLdwjoVeO1D0gPJ9JcvK2Iv zy4ftjsN8OQpJFv21wFkM8+o35695DHBIsbphzjuNUMNGk5RqQUIPn8ZFinLgenuyzCQ FdfA== X-Gm-Message-State: APjAAAXezr1njH3IIRC5yFx2f2i4TQ5fIeG/UrjgNi4IMjz7lpBGLDV4 QcDB6kPumUU3DkzEos2efQNRZl3pZXs= X-Google-Smtp-Source: APXvYqzYIo4J7xX/fiR0ykLS68zktAsVtrgmeboTMOU0XK18qXsghrRxiUkokzq8XucgE6R1vk12RA== X-Received: by 2002:a19:f811:: with SMTP id a17mr14743147lff.182.1577036874160; Sun, 22 Dec 2019 09:47:54 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id w71sm8420009lff.0.2019.12.22.09.47.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Dec 2019 09:47:54 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id m26so13167078ljc.13; Sun, 22 Dec 2019 09:47:54 -0800 (PST) X-Received: by 2002:a2e:6f19:: with SMTP id k25mr15374665ljc.84.1577036873882; Sun, 22 Dec 2019 09:47:53 -0800 (PST) MIME-Version: 1.0 References: <96ecfc02-04f6-7222-4582-3740c505c7e5@FreeBSD.org> In-Reply-To: <96ecfc02-04f6-7222-4582-3740c505c7e5@FreeBSD.org> From: Gleb Popov Date: Sun, 22 Dec 2019 21:47:29 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Scripting bsdinstall To: Matthew Seaman Cc: freebsd-hackers X-Rspamd-Queue-Id: 47gqhD6l4tz4cx2 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.51 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-3.11 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-1.11)[ip: (-0.49), ipnet: 209.85.128.0/17(-3.11), asn: 15169(-1.89), country: US(-0.05)]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[51.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Sun, 22 Dec 2019 17:47:57 -0000 On Sun, Dec 15, 2019 at 4:51 PM Matthew Seaman 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?