Date: Wed, 8 Jan 2020 00:35:15 +0400 From: Gleb Popov <arrowd@freebsd.org> To: Ravi Pokala <rpokala@freebsd.org> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: interactive bsdinstall -> scripted bsdinstall Message-ID: <CALH631mE0Rvp8e52tzamaSwXLP5s2RG2KT_pLLzx7ZhBy5dKhw@mail.gmail.com> In-Reply-To: <F411DB17-33A6-4493-AE8A-0FEA81631867@panasas.com> References: <34796D6B-91A0-4EB8-A225-5A7B6D0275AE@freebsd.org> <202001070736.0077aMru061650@kx.truefc.org> <F411DB17-33A6-4493-AE8A-0FEA81631867@panasas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 8, 2020 at 12:27 AM Ravi Pokala <rpokala@freebsd.org> wrote: > -----Original Message----- > From: KIRIYAMA Kazuhiko <kiri@truefc.org> > Date: 2020-01-06, Monday at 23:36 > To: Ravi Pokala <rpokala@freebsd.org> > Cc: "freebsd-hackers@freebsd.org" <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 <kiri@truefc.org> > > > > _______________________________________________ > 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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631mE0Rvp8e52tzamaSwXLP5s2RG2KT_pLLzx7ZhBy5dKhw>