When dhcpcd receives a DHCP lease, it tries to configure the DNS servers
through a D-Bus call to systemd-resolved, which currently fails. Fix
this by enabling the relevant systemd unit.
OpenSSL 3.0 removed option `-crypt`. Use `-6` as this option seems
unlikely to be removed soon.
While at it, quote shell variables in a safe way to prevent issues when
they contain space characters.
Fixes: https://github.com/elasticdog/packer-arch/issues/80
It takes some time to write zeros to the disk and it aborts later if
less than 20GB are available.
Add variable to the template, cleanup script and add a new option to
wrapacker.
The '==>' prefix is used by pacstrap, pacman, and mkinitcpio. A new
prefix is needed to better differentiate the output of the script from
the output of the programs mentioned above.
Also adding more output to the different steps helps during troubleshooting.
- virtualbox-guest-modules-arch doesn't exist anymore and the installation
will fail.
- virtualbox-guest-utils was replaced by virtualbox-guest-utils-nox
because Xorg isn't used.
- linux-headers removed because it's not needed by virtualbox-guest-utils
The Vagrant documentation for option "group" in syncing folders states
(in https://www.vagrantup.com/docs/synced-folders/basic_usage.html#group):
"By default this will be the SSH user". Vagrant indeed tries to change
the owner and group of synchronized files to vagrant:vagrant (not
vagrant:users). It outputs:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
find /vagrant '!' -type l -a '(' ! -user vagrant -or ! -group vagrant
')' -exec chown vagrant:vagrant '{}' +
Stdout from the command:
Stderr from the command:
find: 'vagrant' is not the name of an existing group
Fix this by using --user-group instead of --gid users in the useradd
command which creates user vagrant.
Previously, there was an issue with mkfs failing due to a missing
options flag; this error was difficult to catch, as it was only output
in the provisioned OS's virtual machine file.
This change moves the base installation steps to be more in line with
the other provisioning steps, and allows for any errors, issues, or
output to be cached in the logs of the interface running the Packer
build.
Do a final clean of the pacman cache, then write zeros to disk and
unlink the file. Packer will compact the disk as part of the build,
resulting in a smaller final image.
Instead of having mostly duplicate scripts for the entire installation
process, we can split them up into the base installation steps and then
run shell provisioners for anything specific to each of the types after
the machine has rebooted.
This structure will mean less chance of error when making changes to
machines, and will also allow for expansion of the scripts to be run at
the end, such as adding a minimization script to remove history and
clear out space on the drive before compression.