Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot_command not sent properly #2933

Closed
budric opened this issue Nov 12, 2015 · 5 comments
Closed

boot_command not sent properly #2933

budric opened this issue Nov 12, 2015 · 5 comments
Labels
invalid Out of scope/alignment with the project, or issue is expected, intended behavior

Comments

@budric
Copy link

budric commented Nov 12, 2015

I am using packer version 0.8.6, VirtualBox version 5.0.10 on Windows. I'm trying to build an ubuntu box.

The boot command gets broken up and typed incorrectly (see screenshot attached)
clipboard01

My boot command is:

"boot_command": "<esc><esc><enter><wait> /install/vmlinuz noapic preseed/url=http://{{ .HTTPIP }}: {{ .HTTPPort }}/ubuntu-server-15.10.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>"

I have also tried boot command split over multiple lines in a JSON array (array of strings is typically what tutorials give you). I have tried Packer 0.7.5 on Windows. I have tried Arch Linux and VirtualBox 5.0.8-3. I get exactly same error with breaks in the boot command in same places.

@rickard-von-essen
Copy link
Collaborator

I don't think this is actually a bug. It's probably due to VirtualBox + Ubuntu not agreeing on the width of your screen, but that should not cause any problems. Can you describe what the problem you have (I guess it don't start the preseed install) and supply a gist to your packer template + scripts to reproduce.

@budric
Copy link
Author

budric commented Nov 12, 2015

It doesn't get to preseed or any of the provisioning scripts because the boot command is invalid and the screen goes back to "select language" screen of Ubuntu installer. Therefore I removed those lines from this test template. I'd appreciate someone confirming whether they see same problem on their end.

My template is:

{
    "variables": {
        "ssh_name": "vagrant",
        "ssh_pass": "vagrant",
        "hostname": "test",
        "domain": "lan"
    },
    "builders": [{
            "vm_name": "test.lan",
            "type": "virtualbox-iso",

            "iso_url": "c:/temp/ubuntu-15.10-server-amd64.iso",
            "iso_checksum": "fb4eef05edcabfc5cccd4cb44f3f9b48",
            "iso_checksum_type": "md5",

            "headless": false,

            "http_directory" : "http_server_dir",
            "http_port_min" : 9000,
            "http_port_max" : 9500,

            "ssh_username": "{{user `ssh_name`}}",
            "ssh_password": "{{user `ssh_pass`}}",
            "ssh_wait_timeout": "8000s",

            "shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
            "guest_os_type": "Ubuntu_64",
            "vboxmanage": [
                ["modifyvm", "{{.Name}}", "--vram", "12"],
                ["modifyvm", "{{.Name}}", "--memory", "4096"],
                ["modifyvm", "{{.Name}}", "--nictype1", "virtio"],
                ["modifyvm", "{{.Name}}", "--cpus", "4"]
            ],
            "boot_command": "<esc><esc><enter><wait> /install/vmlinuz noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-server-15.10.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>"
        }],
    "post-processors": [{
            "type": "vagrant",
            "output": "./ubuntu-server-15.10-mysql-tomcat-x11.box",
            "only": ["virtualbox-iso"]
        }]
}

@budric
Copy link
Author

budric commented Nov 12, 2015

I just noticed that I don't have this problem with 14.04.01 Ubuntu server iso I had lying around. Don't understand what's different.

@rickard-von-essen
Copy link
Collaborator

Got it, you hit a bug in the Ubuntu 15.10 installer.

Ubuntu text mode installer is broken and the boot_command from the workaround in boxcutter/ubuntu#22 (comment) is needed. See Ubuntu bugs - debian-installer #1505839 and boxcutter/ubuntu#22.

And see chef/bento#483 for a working Ubuntu 15.10 vagrant build.

@rickard-von-essen rickard-von-essen added invalid Out of scope/alignment with the project, or issue is expected, intended behavior and removed stage/waiting-reply labels Nov 12, 2015
@budric
Copy link
Author

budric commented Nov 12, 2015

Thank you very much. That works.

@budric budric closed this as completed Nov 12, 2015
@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid Out of scope/alignment with the project, or issue is expected, intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants