From owner-freebsd-hackers@freebsd.org Tue Jan 7 20:35:43 2020 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 320791F237B for ; Tue, 7 Jan 2020 20:35:43 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 47skfR0S97z4bSC; Tue, 7 Jan 2020 20:35:42 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f41.google.com with SMTP id 9so708031lfq.10; Tue, 07 Jan 2020 12:35:42 -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=nrtXbfT5GSEJudEevl8oNva4rhgsxygymnDV84GAhx0=; b=REaF2ooaozV7jnrGX3VtFYGQ2g7tHSlQv7PkvZsTufW7vGzQnYdxMTZpMlE5KFNcAC SsxTmkKpl1jUIQiuPchoSRivtPW4qDdLT2yG92ejGIfPEQcoYKCrjhY+w8tRdjhhXNRd OSP6DuKeNgi3mFI22rWnzTYlQpacEh+JDVPETD/Q90S7LhbuKqeei9EhqwDERlLWKvbO Zo13bXtsFyB0b0UJ6S/EWMYar/sSryrl72j/xpwvUMSRx27Qd2efeQD/Ru4RwlpZusQB bN7qZWdMFih1ewgarzfuHgLVkXadrVxhbSRlZZjEg594fXJ1A/DJJ62ixhh2huerIJOW nt5A== X-Gm-Message-State: APjAAAXS8Gld884QVda7zZMG84nmRZnzutLsEjnEqm9t1kgkJd0oS+CI x9WZiPYa4QG347Ar6mlsZ2t87EUITZM= X-Google-Smtp-Source: APXvYqwqLSDBmIXOGrC3iKrVP8gZXESINrTR5pHLzP9+v98giD400GMeITNeOrfpRtJnLN7WFkZwzg== X-Received: by 2002:a19:4a:: with SMTP id 71mr793334lfa.50.1578429340998; Tue, 07 Jan 2020 12:35:40 -0800 (PST) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id x23sm358717lff.24.2020.01.07.12.35.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2020 12:35:40 -0800 (PST) Received: by mail-lj1-f171.google.com with SMTP id u1so945782ljk.7; Tue, 07 Jan 2020 12:35:40 -0800 (PST) X-Received: by 2002:a2e:8551:: with SMTP id u17mr696630ljj.165.1578429340273; Tue, 07 Jan 2020 12:35:40 -0800 (PST) MIME-Version: 1.0 References: <34796D6B-91A0-4EB8-A225-5A7B6D0275AE@freebsd.org> <202001070736.0077aMru061650@kx.truefc.org> In-Reply-To: From: Gleb Popov Date: Wed, 8 Jan 2020 00:35:15 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: interactive bsdinstall -> scripted bsdinstall To: Ravi Pokala Cc: "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 47skfR0S97z4bSC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] 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: Tue, 07 Jan 2020 20:35:43 -0000 On Wed, Jan 8, 2020 at 12:27 AM Ravi Pokala wrote: > -----Original Message----- > From: KIRIYAMA Kazuhiko > Date: 2020-01-06, Monday at 23:36 > To: Ravi Pokala > Cc: "freebsd-hackers@freebsd.org" > Subject: Re: interactive bsdinstall -> scripted bsdinstall > > Hi, Ravi > > On Tue, 07 Jan 2020 16:08:33 +0900, > Ravi Pokala wrote: > > > > Hi folks, > > > > I have a vague memory that `bsdinstall' generates a script or log, > which can be used to script identical installations. > > What would you do ? Non interactive installation or > debugging installation ? > > I mean, I want to perform an interactive installation for a new piece of > hardware, once. Then, I want to replicate that installation on additional > instances of that hardware. If `bsdinstall' generates an installation > script, then I could just use that. > > Thanks, > > Ravi (rpokala@) > I wrote the installer config from scratch and here is what I ended up with: DISTRIBUTIONS="base.txz kernel.txz lib32.txz vpn.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 gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 echo 'xxxxxx' | pw usermod -n root -h 0 echo "PermitRootLogin yes" > /etc/ssh/sshd_config echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config echo "ChallengeResponseAuthentication no" >> /etc/ssh/sshd_config echo "PubkeyAuthentication no" >> /etc/ssh/sshd_config echo "Subsystem sftp /usr/libexec/sftp-server" >> /etc/ssh/sshd_config mkdir -p /usr/local/etc/pkg/repos/ echo 'FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest" }' > /usr/local/etc/pkg/repos/FreeBSD.conf sysrc ifconfig_DEFAULT=SYNCDHCP service netif start sysrc sshd_enable=YES service sshd start env PATH=$PATH:/usr/local/bin pkg install -y openvpn python python3 sysrc openvpn_enable=YES sysrc openvpn_dir=/root/vpn/ sysrc openvpn_configfile=/root/vpn/client.ovpn bsdconfig hostname echo -n "ifconfig " >> /root/vpn/client.ovpn dialog --title "VPN IP" --clear --inputbox "Enter VPN IP address" 10 30 2>> /root/vpn/client.ovpn echo " 255.0.0.0" >> /root/vpn/client.ovpn > > > > Is that a real thing, or did I imagine that? If that's real, where > does that live on the newly installed system? > > > > Thanks, > > > > Ravi (rpokala@) > > > > > > _______________________________________________ > > 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" > > --- > Kazuhiko Kiriyama > > > > _______________________________________________ > 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" >