Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jan 2018 19:00:08 +0000
From:      Rafal Lukawiecki <raf@rafal.net>
To:        Colin Percival <cperciva@tarsnap.com>
Cc:        freebsd-cloud@freebsd.org
Subject:   Re: AMI building AMI
Message-ID:  <A4886392-18D5-44CF-BFEA-A802AF4F850E@rafal.net>
In-Reply-To: <0C1308D4-AFD6-4216-83A6-4687157EC8D3@rafal.net>
References:  <085D225B-2E99-4540-B693-223087B14A27@rafal.net> <0100016099578ea7-02da1d5c-997d-47be-9cd8-dc6b75bbeda6-000000@email.amazonses.com> <8BCB67B8-DE56-491A-8E6A-95AFB83F71D6@rafal.net> <0100016099671dff-32d986bf-3979-40a3-accf-4d17c2020403-000000@email.amazonses.com> <8538BFB9-B82C-4520-ADB3-E25040EA1B30@rafal.net> <01000160a0283ad5-12b330d3-3f4b-43ea-9cdc-2524f5f42f4a-000000@email.amazonses.com> <0C1308D4-AFD6-4216-83A6-4687157EC8D3@rafal.net>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 1 Jan 2018, at 17:42, Rafal Lukawiecki <raf@rafal.net> wrote:
>=20
> PS. Could it be as easy as make DESTDIR=3D/mnt installkernel in the =
config init?

I went ahead and tried the script. It is not working yet, and I need to =
debug it further, which means connecting to the instance etc, which I =
have not yet. So far a few observations are:

- AMI builder does not like c5.4xlarge, it aborts when trying to install =
the base FreeBSD image. It works with c4.4xlarge.
- svnlite needed extra params to avoid hanging on keyboard input
- pkg -c throws error about "no address record unable to update =
repository=E2=80=9D, I am trying to force an update of the repository
- kernel compiles, but I am not yet sure if it installed correctly
- mkami failed to create an AMI, unsure yet why, need to rerun with more =
debug output.

My current script is:

#!/bin/sh
set -x
export ASSUME_ALWAYS_YES=3DYES
PKGS_TO_INSTALL=3D"awscli cli53 lots of other ones"
pkg -r /mnt fetch -d $PKGS_TO_INSTALL
pkg -r /mnt update -f
pkg -c /mnt install $PKGS_TO_INSTALL
svnlite --non-interactive --trust-server-cert-failures=3Dunknown-ca co =
https://svn.freebsd.org/base/releng/11.1/ /usr/src/
cd /usr/src
cat > /tmp/kernel.patch <<EOT
**PATCH IS HERE**
EOT
patch < /tmp/kernel.patch
make DESTDIR=3D/mnt kernel -j16
mkami "FreeBSD 11.1 PB=E2=80=9D =E2=80=9CProject Botticelli Ltd =
Customised FreeBSD 11.1"
shutdown -p now

Rafal=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A4886392-18D5-44CF-BFEA-A802AF4F850E>