Date: Wed, 08 Jan 2020 11:05:10 +0900 From: KIRIYAMA Kazuhiko <kiri@truefc.org> To: Gleb Popov <arrowd@freebsd.org> Cc: Ravi Pokala <rpokala@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: interactive bsdinstall -> scripted bsdinstall Message-ID: <202001080205.00825AUD094655@kx.truefc.org> In-Reply-To: <CALH631mE0Rvp8e52tzamaSwXLP5s2RG2KT_pLLzx7ZhBy5dKhw@mail.gmail.com> References: <34796D6B-91A0-4EB8-A225-5A7B6D0275AE@freebsd.org> <202001070736.0077aMru061650@kx.truefc.org> <F411DB17-33A6-4493-AE8A-0FEA81631867@panasas.com> <CALH631mE0Rvp8e52tzamaSwXLP5s2RG2KT_pLLzx7ZhBy5dKhw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 08 Jan 2020 05:35:15 +0900, Gleb Popov wrote: > > 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 I could not understood why above directive should be needed. I always can install without that. BTW when I installed in the case of amd64/aarch64, installed VM by bsdinstall could not boot, so I thought that bootcode would not be copied boot partition correctlly, so I do above command to install bootcode, but there are nothing embed bootstrap codes in /boot/* of amd64/aarch64 image: root@vm:/vm/test # mdconfig -a -t vnode -f FreeBSD-13.0-CURRENT-arm64-aarch64-20191212-r355634-memstick.img md1 root@vm:/vm/test # gpart show md1 => 3 2042648 md1 GPT (997M) 3 66584 1 efi (33M) 66587 1976064 2 freebsd (965M) root@vm:/vm/test # mount /dev/md1s2 /mnt root@vm:/vm/test # ll /mnt/boot total 2988 -r--r--r-- 1 root wheel 3547 Dec 12 17:02 beastie.4th -r-xr-xr-x 1 root wheel 97848 Dec 12 17:02 boot1.efi* -r--r--r-- 1 root wheel 2119 Dec 12 17:02 brand-fbsd.4th -r--r--r-- 1 root wheel 2799 Dec 12 17:02 brand.4th -r--r--r-- 1 root wheel 6270 Dec 12 17:02 check-password.4th -r--r--r-- 1 root wheel 2104 Dec 12 17:02 color.4th drwxr-xr-x 2 root wheel 512 Dec 12 17:02 defaults/ -r--r--r-- 1 root wheel 4046 Dec 12 17:02 delay.4th drwxr-xr-x 6 root wheel 512 Dec 12 16:25 dtb/ drwxr-xr-x 2 root wheel 512 Dec 12 16:26 efi/ -r--r--r-- 1 root wheel 1584 Dec 12 17:02 efi.4th drwxr-xr-x 2 root wheel 512 Dec 12 16:26 firmware/ -r--r--r-- 1 root wheel 3741 Dec 12 17:02 frames.4th -r-xr-xr-x 1 root wheel 87080 Dec 12 17:02 gptboot.efi* drwxr-xr-x 2 root wheel 13312 Dec 12 16:26 kernel/ -r--r--r-- 1 root wheel 7815 Dec 12 17:02 loader.4th -rw-r--r-- 1 root wheel 51 Dec 12 17:12 loader.conf -r-xr-xr-x 2 root wheel 677944 Dec 12 17:02 loader.efi* -r--r--r-- 1 root wheel 700 Dec 12 17:02 loader.rc -r-xr-xr-x 1 root wheel 584432 Dec 12 17:02 loader_4th.efi* -r-xr-xr-x 2 root wheel 677944 Dec 12 17:02 loader_lua.efi* -r-xr-xr-x 1 root wheel 513656 Dec 12 17:02 loader_simp.efi* -r--r--r-- 1 root wheel 3103 Dec 12 17:02 logo-beastie.4th -r--r--r-- 1 root wheel 2629 Dec 12 17:02 logo-beastiebw.4th -r--r--r-- 1 root wheel 2207 Dec 12 17:02 logo-fbsdbw.4th -r--r--r-- 1 root wheel 2624 Dec 12 17:02 logo-orb.4th -r--r--r-- 1 root wheel 2347 Dec 12 17:02 logo-orbbw.4th drwxr-xr-x 2 root wheel 512 Dec 12 17:02 lua/ -r--r--r-- 1 root wheel 9253 Dec 12 17:02 menu-commands.4th -r--r--r-- 1 root wheel 36008 Dec 12 17:02 menu.4th -r--r--r-- 1 root wheel 6319 Dec 12 17:02 menu.rc -r--r--r-- 1 root wheel 18590 Dec 12 17:02 menusets.4th drwxr-xr-x 2 root wheel 512 Dec 12 16:26 modules/ -r--r--r-- 1 root wheel 2668 Dec 12 17:02 screen.4th -r--r--r-- 1 root wheel 2606 Dec 12 17:02 shortcuts.4th -r--r--r-- 1 root wheel 36328 Dec 12 17:02 support.4th drwxr-xr-x 2 root wheel 512 Dec 12 16:26 uboot/ -r--r--r-- 1 root wheel 3058 Dec 12 17:02 version.4th drwxr-xr-x 2 root wheel 512 Dec 12 16:26 zfs/ root@vm:/vm/test # > > 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" > > > _______________________________________________ > 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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001080205.00825AUD094655>