通过在欢迎屏幕上的打包器自动化ubuntu安装

时间:2014-11-29 10:53:35

标签: ubuntu vagrant packer

您好我一直在尝试通过packer.io自动安装ubuntu 12.04

在我看来,步骤是正确的,但ubuntu卡在欢迎屏幕上。

enter image description here

我也通过http。

提供预置文件

请让我知道我做错了什么。谢谢!

我的包装工JSON文件:

    {
    "variables": {
        "ssh_name": "kappataumu",
        "ssh_pass": "kappataumu",
        "hostname": "packer-test"
    },

    "builders": [{
        "type": "virtualbox-iso",
        "guest_os_type": "Ubuntu",

        "vboxmanage": [
            ["modifyvm", "{{.Name}}", "--vram", "32"]
        ],

        "disk_size" : 10000,

        "iso_url": "/home/inception/Desktop/FYP-ubuntu/images/ubuntu-12.04.4-desktop-i386.iso",
        "iso_checksum": "14ad92270218a8925d802b3d3b6e140f",
        "iso_checksum_type": "md5",

        "http_directory" : "ubuntu",
        "http_port_min" : 9001,
        "http_port_max" : 9001,

        "ssh_username": "{{user `ssh_name`}}",
        "ssh_password": "{{user `ssh_pass`}}",
        "ssh_wait_timeout": "20m",

        "shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",

        "boot_command" : [
            "<esc><esc><enter><wait>",
            "/install/vmlinuz noapic ",
            "preseed/url=http://192.168.0.13:80/preseed_32.cfg",
            "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
            "hostname={{user `hostname`}} ",
            "fb=false debconf/frontend=noninteractive ",
            "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
            "keyboard-configuration/variant=USA console-setup/ask_detect=false ",
            "initrd=/install/initrd.gz -- <enter>"
        ]
    }]
    }

我的预存文件:

    # Some inspiration:
# * https://github.com/chrisroberts/vagrant-boxes/blob/master/definitions/precise-64/preseed.cfg
# * https://github.com/cal/vagrant-ubuntu-precise-64/blob/master/preseed.cfg

# English plx
d-i debian-installer/language string en
d-i debian-installer/locale string en_US.UTF-8
d-i localechooser/preferred-locale string en_US.UTF-8
d-i localechooser/supported-locales en_US.UTF-8

# Including keyboards
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layout select USA
d-i keyboard-configuration/variant select USA
d-i keyboard-configuration/modelcode string pc105


# Just roll with it
d-i netcfg/get_hostname string this-host
d-i netcfg/get_domain string this-host

d-i time/zone string UTC
d-i clock-setup/utc-auto boolean true
d-i clock-setup/utc boolean true


# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
d-i debconf debconf/frontend select Noninteractive

d-i pkgsel/install-language-support boolean false
tasksel tasksel/first multiselect standard, ubuntu-server


# Stuck between a rock and a HDD place
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-auto/choose_recipe select atomic

d-i partman/confirm_write_new_label boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

# Write the changes to disks and configure LVM?
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max

# No proxy, plx
d-i mirror/http/proxy string

# Default user, change
d-i passwd/user-fullname string kappataumu
d-i passwd/username string kappataumu
d-i passwd/user-password password kappataumu
d-i passwd/user-password-again password kappataumu
d-i user-setup/encrypt-home boolean false
d-i user-setup/allow-password-weak boolean true

# No language support packages.
d-i pkgsel/install-language-support boolean false

# Individual additional packages to install
d-i pkgsel/include string build-essential ssh

#For the update
d-i pkgsel/update-policy select none

# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select safe-upgrade

# Go grub, go!
d-i grub-installer/only_debian boolean true

d-i finish-install/reboot_in_progress note

1 个答案:

答案 0 :(得分:1)

没关系,我解决了。

解决方案是使用支持基于文本的安装的图像..

e.g。 ubuntu服务器,ubuntu alternate,linux server / alternate distros

这是使用gui安装程序(ubuntu桌面),因此它没有自动安装