interactive bsdinstall -> scripted bsdinstall
Gleb Popov
arrowd at freebsd.org
Tue Jan 7 20:35:43 UTC 2020
On Wed, Jan 8, 2020 at 12:27 AM Ravi Pokala <rpokala at freebsd.org> wrote:
> -----Original Message-----
> From: KIRIYAMA Kazuhiko <kiri at truefc.org>
> Date: 2020-01-06, Monday at 23:36
> To: Ravi Pokala <rpokala at freebsd.org>
> Cc: "freebsd-hackers at freebsd.org" <freebsd-hackers at 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 at freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "
> freebsd-hackers-unsubscribe at freebsd.org"
>
> ---
> Kazuhiko Kiriyama <kiri at truefc.org>
>
>
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
More information about the freebsd-hackers
mailing list