Date: Sun, 3 Jan 2021 18:49:01 +0000 From: Rafal Lukawiecki <raf@rafal.net> To: Colin Percival <cperciva@tarsnap.com> Cc: freebsd-cloud@freebsd.org Subject: Re: FreeBSD on AWS Graviton (t4g) Message-ID: <58E304B3-F75C-4470-996F-3EF28438033E@rafal.net> In-Reply-To: <21F56FA2-8DBA-4D6F-B08F-848F56233B45@rafal.net> References: <C4D2ACA9-BFFE-49C1-B8AA-72E32C9DB6C9@rafal.net> <7AA5AFAB-E42A-4A59-BCA5-9B15BD58B81B@rafal.net> <01000176bfa4236e-f12b57d0-7000-4a31-acb2-5660d60eb714-000000@email.amazonses.com> <4E347E37-113D-4AFC-BD7E-AC83FF27C2E0@rafal.net> <01000176bfc11df8-fbb42271-1837-409b-9ce5-13577e938d1c-000000@email.amazonses.com> <21F56FA2-8DBA-4D6F-B08F-848F56233B45@rafal.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Once again, thanks for your help, Colin. The suggested steps worked and = I have managed to build an updated ARM AMI with all the extra packages. = I am testing it now and seems quite good. Shutdown behaviour does not = bother me. Indeed, there was not enough space for make in /usr/obj (and not enough = for pkg either) so I had to add a couple of memory disks. FYI, the below = user data script works well. I run it on a spot instance of a = c6g.8xlarge and it was done in just under 30 mins. I wonder if I am replicating what your AMI maker does anyway by building = things using make, or is this still the right way to go around. I=E2=80=99ve one more question: where can find out the currently = *available* level of the patches, ie. the =E2=80=9C-p2=E2=80=9D in = "12.2-RELEASE-p2=E2=80=9D? There is nowhere I could see on freebsd.org = <http://freebsd.org/> that publishes that, and I assume it has to be = somewhere in the svn trees but I cannot find it. I would like a way of = being able to check if I am current. My user data script, perhaps I should post it somewhere=E2=80=A6: #!/bin/sh PKGS_TO_INSTALL=3D=E2=80=9CLots of package names go here :)" export ASSUME_ALWAYS_YES=3DYES export PATH=3D"$PATH:/usr/local/bin" mount -t devfs devfs /mnt/dev mdconfig -a -t swap -s 8G -u 2 newfs -U md2 mount /dev/md2 /usr/src mdconfig -a -t swap -s 20G -u 3 newfs -U md3 mount /dev/md3 /bits/usr/obj svnlite co https://svn.freebsd.org/base/releng/12.2/ /usr/src/ make -j 32 -C /usr/src DESTDIR=3D/mnt buildworld buildkernel = installkernel installworld yes | /usr/bin/env PATH=3D"$PATH:/usr/local/bin" pkg -r /mnt fetch -d = $PKGS_TO_INSTALL pkg -r /mnt update -f cp /etc/resolv.conf /mnt/etc/resolv.conf yes | /usr/bin/env PATH=3D"$PATH:/usr/local/bin" pkg -c /mnt -o = ASSUME_ALWAYS_YES=3DYES install $PKGS_TO_INSTALL rm /mnt/etc/resolv.conf # You may need to check if there was already = another resolv.conf and perhaps restore it (11.1: yes, 12.x: none) sleep 10 sync; sync; sync; umount /bits/usr/obj umount /mnt/src umount -f /mnt/dev sync; sync; sync; sleep 10 sync; sync; sync; sleep 10 umount -f /mnt sleep 10 mkami "FreeBSD 12.2 PB 3.16" "Project Botticelli Ltd Customised FreeBSD = 12.2" shutdown -p now The two memory disks are bit oversized. The pkg cache only needs 4 GB = (not 8) and /usr/obj needs just under 10 (not 20) but it saves me from = surprises, I hope, as I continue using it over the next few months. Thanks a lot and regards from Ireland, Rafal -- Rafal Lukawiecki Data Scientist=20 Project Botticelli Ltd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58E304B3-F75C-4470-996F-3EF28438033E>