> On 1 Jan 2018, at 17:42, Rafal Lukawiecki <[email protected]> wrote:
> 
> PS. Could it be as easy as make DESTDIR=/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”, 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=YES
PKGS_TO_INSTALL="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=unknown-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=/mnt kernel -j16
mkami "FreeBSD 11.1 PB” “Project Botticelli Ltd Customised FreeBSD 11.1"
shutdown -p now

Rafal
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-cloud
To unsubscribe, send any mail to "[email protected]"

Reply via email to