This repository was archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchroot.json
More file actions
45 lines (45 loc) · 1.44 KB
/
chroot.json
File metadata and controls
45 lines (45 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"builders": [
{
"type": "amazon-chroot",
"ami_name": "arch-packer-from-scratch {{timestamp}}",
"from_scratch": true,
"ami_virtualization_type": "hvm",
"pre_mount_commands": [
"parted {{.Device}} mklabel msdos mkpart primary 1M 100% set 1 boot on print",
"mkfs.ext4 {{.Device}}1"
],
"post_mount_commands": [
"echo 'DEVICE={{.Device}}' > provisioning/config",
"pacstrap {{.MountPath}} base openssh grub cloud-init python2-requests sudo"
],
"mount_path": "/mnt/chroot",
"root_volume_size": 5,
"root_device_name": "xvda",
"ami_block_device_mappings": [
{
"device_name": "xvda",
"delete_on_termination": true,
"volume_type": "gp2"
}
],
"chroot_mounts": [
["proc", "proc", "/proc"],
["sysfs", "sysfs", "/sys"],
["bind", "/dev", "/dev"],
["devpts", "devpts", "/dev/pts"],
["bind", "provisioning", "/provisioning"]
]
}
],
"provisioners": [
{
"type": "shell-local",
"command": "genfstab -U /mnt/chroot >> /mnt/chroot/etc/fstab"
},
{
"type": "shell",
"script": "provisioning/chroot-setup.sh"
}
]
}