summaryrefslogtreecommitdiff
path: root/packer/alis-packer-bios-ext4-grub.json
blob: e5bfc884a13681c5ca9df2666d6961de9f1bdfb7 (plain)
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
46
47
48
49
50
51
52
53
{
    "variables": {
      "iso": "https://mirror.rackspace.com/archlinux/iso/latest/archlinux-2020.04.01-x86_64.iso",
      "disk_size": "16384"
    },
    "builders": [
      {
        "name": "archlinux-alis-virtualbox",
        "type": "virtualbox-iso",
        "guest_os_type": "ArchLinux_64",
        "guest_additions_mode": "attach",
        "headless": false,
        "http_directory": ".",
        "vboxmanage": [
          ["modifyvm", "{{.Name}}", "--memory", "2048"],
          ["modifyvm", "{{.Name}}", "--vram", "128"],
          ["modifyvm", "{{.Name}}", "--cpus", "2"],
          ["modifyvm", "{{.Name}}", "--firmware", "bios"]
        ],
        "disk_size": "{{user `disk_size`}}",
        "hard_drive_interface": "sata",
        "iso_url": "{{user `iso`}}",
        "iso_checksum": "bbece70b6e6a3f1d5f90a7d330657ea3c9280355",
        "iso_checksum_type": "sha1",
        "ssh_username": "vagrant",
        "ssh_password": "vagrant",
        "ssh_wait_timeout": "60m",
        "boot_wait": "5s",
        "boot_command": [
          "<wait5s><enter>",
          "<wait40s>",
          "wget http://{{.HTTPIP}}:{{.HTTPPort}}/alis.conf<enter><wait1s>",
          "wget http://{{.HTTPIP}}:{{.HTTPPort}}/alis.sh<enter><wait1s>",
          "sed -i \"s/FILE_SYSTEM_TYPE=.*/FILE_SYSTEM_TYPE=\\\"ext4\\\"/\" ./alis.conf<enter><wait1s>",
          "sed -i \"s/LVM=.*/LVM=\\\"false\\\"/\" ./alis.conf<enter><wait1s>",
          "sed -i \"s/LUKS_PASSWORD=.*/LUKS_PASSWORD=\\\"\\\"/\" ./alis.conf<enter><wait1s>",
          "sed -i \"s/LUKS_PASSWORD_RETYPE=.*/LUKS_PASSWORD_RETYPE=\\\"\\\"/\" ./alis.conf<enter><wait1s>",
          "sed -i \"s/BOOTLOADER=.*/BOOTLOADER=\\\"grub\\\"/\" ./alis.conf<enter><wait1s>",
          "sed -i \"s/DESKTOP_ENVIRONMENT=.*/DESKTOP_ENVIRONMENT=\\\"\\\"/\" ./alis.conf<enter><wait1s>",
          "chmod +x ./alis.sh<enter><wait1s>",
          "./alis.sh<enter><wait3>y<wait1s><enter>",
          "<wait10s><wait10s><wait10s><wait10s><wait10s><wait10s><wait10s><wait60m>"
        ],
        "shutdown_command": "systemctl poweroff"
      }
    ],
    "post-processors": [
      {
        "type": "vagrant",
        "output": "archlinux-alis-{{.BuildName}}.box"
      }
    ]
  }