Ubuntu Pastebin

Paste from lloz at Tue, 24 Nov 2015 22:09:34 +0000

Download as text
 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# $ for i in */*minbug*; do echo \# $i; cat $i; done
# packer/xubuntu-14.04-minbug.json
{
    "variables": {
        "vbox_iso_builder_vm_name": "Xubuntu 14.04 LTS preseed/include ignored example",
        "vbox_iso_builder_name": "xubuntu-14.04-minbug",
        "vbox_iso_builder_iso_url": "install-images/xubuntu-14.04.3-desktop-amd64.iso",
        "vbox_iso_builder_iso_checksum": "846cd87c718b0233c27a8ce20eef0923",
        "vbox_iso_builder_disk_size": "30720",
        "boot_wait": "5s",
        "boot_command_keyseq": "<esc><esc><esc><enter><wait>",
        "boot_command_prefix": "/casper/vmlinuz.efi boot=casper automatic-ubiquity debug-ubiquity noprompt",
        "boot_command_suffix": "initrd=/casper/initrd.lz",
    
        "build_dir": "build",
        "preseed_dir": "preseed",
        "preseed": "xubuntu-14.04-minbug.seed",

        "ssh_name": "vagrant",
        "ssh_pass": "vagrant"
    },
    "builders": [
        {
            "vm_name": "{{ user `vbox_iso_builder_vm_name` }}",
            "name": "{{ user `vbox_iso_builder_name` }}",
            "type": "virtualbox-iso",
            "guest_os_type": "Ubuntu_64",
            "iso_url": "{{ user `vbox_iso_builder_iso_url` }}",
            "iso_checksum": "{{ user `vbox_iso_builder_iso_checksum` }}",
            "iso_checksum_type": "md5",
            "ssh_username": "{{ user `ssh_name` }}",
            "ssh_password": "{{ user `ssh_pass` }}",
            "ssh_timeout": "200m",
            "shutdown_command": "echo '{{ user `ssh_pass` }}' | sudo -S shutdown -P now",
            "shutdown_timeout": "30s",
            "boot_command":
            [
                "{{ user `boot_command_keyseq` }}",
                " {{ user `boot_command_prefix` }} nomodeset nosplash debug",
                " auto=true priority=critical fb=false locale=en_US",
                " DEBCONF_DEBUG=5",
                " console-setup/ask_detect=false keyboard-configuration/layoutcode=us",
                " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/./{{ user `preseed` }}",
                " {{ user `boot_command_suffix` }} -- <enter>"   
            ],
            "boot_wait": "{{ user `boot_wait` }}",
            "disk_size": "{{ user `vbox_iso_builder_disk_size` }}",
            "format": "ova",
            "hard_drive_interface": "sata",
            "headless": false,
            "http_directory": "{{ user `preseed_dir` }}",
            "output_directory": "{{ user `build_dir` }}"
        }
    ]
}

# preseed/xubuntu-14.04-minbug-included.seed
d-i netcfg/hostname string second-preseed-hostname

# preseed/xubuntu-14.04-minbug.seed
d-i preseed/include string /xubuntu-14.04-minbug-included.seed
d-i netcfg/hostname string first-preseed-hostname

# Run with: $ packer build packer/xubuntu-14.04-minbug.json
# Once in live environment, open up a terminal, check which is current hostname selection:
# $ debconf-get "netcfg/hostname"
# ...
# first-preseed-hostname

# If preseed/include worked, the above would return second-preseed-hostname
Download as text