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
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.
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.
Version 1.43 of e2fsprogs changes mkfs to default 64bit.
This doesn't play nicely with Syslinux, so disable it.
We wouldn't need 64bit filesystems unless we're working with 16TiB
filesystems.
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.