Commit graph

30 commits

Author SHA1 Message Date
Nicolas Iooss
0cc8902d9c
Merge pull request #83 from fishilico/start-systemd-resolved
Start systemd-resolved automatically
2025-10-22 22:06:51 +02:00
Nicolas Iooss
234fdeef49 Start systemd-resolved automatically
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.
2025-10-03 16:18:21 +00:00
Nicolas Iooss
27fa924f05 Use openssl passwd -6 instead of -crypt
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
2025-10-03 15:49:14 +00:00
JuliusLongmind
ed6856b815 Fixing mirrorlist, network interfaces before reboot 2022-06-11 07:36:39 -07:00
Hiroshi Hatake
522933af14 Remove www prefix for ArchLinux mirror list generator URL
Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
2020-12-28 22:02:36 +09:00
Hiroshi Hatake
a074cd7cc6 Use URL#id form for turning network intarfece note's URL
Handling Reboots section has #id.
So, we should use #id to point unique location.

Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
2020-12-28 21:58:37 +09:00
Hiroshi Hatake
6730cb16a4
Merge pull request #68 from MafiaInc/master
Turn network interfaces down before restart
2020-12-28 21:57:28 +09:00
Christian Kotte
c1125dc9b8 Add variable/option to control if zeros are written to the disk
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.
2020-08-13 15:53:08 -07:00
Christian Kotte
5a93a04295 Update network configuration
Use systemctl command instead of manually symlinking. Add more
information about systemd Predictable Network Interface Names.
2020-08-13 15:53:08 -07:00
Christian Kotte
16cfbbd2e5 Move pacman mirror config just before package installation 2020-08-13 15:53:08 -07:00
Christian Kotte
090a1cb9a6 Improve script output
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.
2020-08-13 15:53:08 -07:00
Christian Kotte
213190a00d Remove VirtualBox module loading
The modules will be loaded automatically when vboxservice.service starts
2020-08-13 15:53:08 -07:00
Christian Kotte
0f137664aa Fix VirtualBox Guest Additions installation
- 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
2020-08-13 15:53:08 -07:00
Christian Kotte
c5f85d09f3 Add linux, dhcpcd, and netctl to the base installation
The base group was changed to a base meta package and many packages were
removed: https://www.archlinux.org/news/base-group-replaced-by-mandatory-base-package-manual-intervention-required/

Therefore, it's necessary to add linux or linux-lts to install a Kernel.
Dhcpcd is needed to get an IP after the first reboot. Netctl is needed later when
using Vagrant.
2020-08-13 15:53:08 -07:00
Christian Kotte
072de4ba94 Remove hard tabs from install-base.sh
It's best practice to use soft tabs instead of hard tabs.
2020-08-13 15:53:08 -07:00
81bb3a703c Turn network interfaces down before restart
Turning network interfaces down to make sure SSH session was dropped
  on host side.
  More info [here](https://www.packer.io/docs/provisioners/shell.html#handling-reboots)
2019-07-30 20:12:49 +03:00
Boris-Chengbiao Zhou
ce539e2e6d Add workaround for slow CRNG initialization 2019-07-19 14:54:54 -07:00
Mike Appleby
2a522c91c4 Don't call pacman-optimize in cleanup.sh
The pacman-optimize script has been removed from pacman.

https://git.archlinux.org/pacman.git/commit/?id=d590a45795b30a14cdb697754749c85907053570

This was causing the installer to complain "/usr/bin/pacman-optimize:
No such file or directory".
2018-10-30 16:28:00 -06:00
James Conroy-Finn
6311877e6f Install VMware's Open VM Tools 2018-09-30 18:35:07 +01:00
Louis Bellet
e4bcd86a63 Fixing Guest Virtualbox tools
Archlinux wiki suggest for linux kernel using virtualbox-host-modules-arch
2017-01-23 15:40:03 -08:00
Aaron Bull Schaefer
45fe1a10d0 Tweak formatting for consistency with project conventions
Just to have the style match across all files in the project.
2016-11-18 12:08:30 -08:00
Attila Bogar
227f42add6 use bash syntax 2016-11-18 11:34:56 -08:00
Attila Bogar
3f2ac7e735 libvirt + country mirror support in box 2016-11-18 11:34:56 -08:00
Nicolas Iooss
322ec10c43 Create vagrant user in vagrant group
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.
2016-11-13 10:29:12 -08:00
Tom Swartz
455dc90842 Move Provisioning to STDOUT
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.
2016-11-07 17:53:19 -08:00
Aaron Bull Schaefer
f00a3026f4 Optimize the pacman database before zeroing the drive 2016-02-11 09:08:28 -08:00
Aaron Bull Schaefer
6c589e733a Remove the conditional on cleanup.sh
This should be desireable to run on any of the builders.
2016-02-11 08:00:09 -08:00
Mike Appleby
004b694ef6 Set the execute bit on cleanup.sh.
This isn't strictly necessary.  Done for consistency with the other
files in ./scripts.
2016-02-10 13:49:42 -06:00
Mike Appleby
fd57a360b7 Add a cleanup script.
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.
2016-02-09 20:53:33 -06:00
Aaron Bull Schaefer
d5adbc3f10 Remove duplication in installation scripts
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.
2016-02-08 09:27:41 -08:00