"Could not find kernel image: /install/vmlinuz"

616 views
Skip to first unread message

Kasper Marstal

unread,
Apr 25, 2014, 9:24:52 AM4/25/14
to packe...@googlegroups.com
Dear packer.io community

I'm trying to create an ubuntu x86 virtualbox image using this excellent piece of software, but I am stuck with an error that I can't google or stackoverflow myself out of. Upon entering the install command in the command line interface (to clarify, this is after starting up vm and doing <esc><esc><enter> to exit gui) I get the following error: "Could not find kernel image: /install/vmlinuz". The template I use is kindly provided by https://github.com/shiguredo/packer-templates and obviously these guys haven't encountered the same problem. ISO passes md5 check. Any suggestions as to what I'm doing wrong? Any help would be greatly appreciated. 

Below is my template.json and preseed.cfg.

Kind Regards,
Kasper

template.json

{
  "builders": [
    {
      "type": "virtualbox-iso",
      "boot_command": [
        "<esc>", // I need and extra esc don't know why
        "<esc>",
        "<esc>",
        "<enter><wait>",
        "/install/vmlinuz<wait>",
        " auto<wait>",
        " console-setup/ask_detect=false<wait>",
        " console-setup/layoutcode=gb<wait>",
        " console-setup/modelcode=pc105<wait>",
        " debconf/frontend=noninteractive<wait>",
        " debian-installer=en_GB<wait>",
        " fb=false<wait>",
        " initrd=/install/initrd.gz<wait>",
        " kbd-chooser/method=gb<wait>",
        " keyboard-configuration/layout=GB<wait>",
        " keyboard-configuration/variant=GB<wait>",
        " locale=en_GB<wait>",
        " netcfg/get_hostname=diamond-devenv<wait>",
        " netcfg/get_domain=unassigned-domain<wait>",
        " noapic<wait>",
        " preseed/url=url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
        "<wait>",
        "<enter><wait>"
      ],
      "boot_wait": "5s",
      "disk_size": 64000,
      "guest_os_type": "Ubuntu",
      "http_directory": "http",
      "iso_checksum": "c4d4d037d7d0a05e8f526d18aa25fb5e",
      "iso_checksum_type": "md5",
      "ssh_username": "ia",
      "ssh_password": "ia",
      "ssh_port": 22,
      "ssh_wait_timeout": "600s",
      "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'devenv'|sudo -S sh '/tmp/shutdown.sh'",
      "vboxmanage": [
        [ "modifyvm", "{{.Name}}", "--memory", "2048" ],
        [ "modifyvm", "{{.Name}}", "--cpus", "2" ]
      ]
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
      "override": {
        "virtualbox-iso": {
          "scripts": [
            "templates/ubuntu-14.04/scripts/base.sh",
            "templates/ubuntu-14.04/scripts/devenv.sh",
            "templates/ubuntu-14.04/scripts/virtualbox.sh",
            "templates/ubuntu-14.04/scripts/cleanup.sh",
            "templates/ubuntu-14.04/scripts/zerodisk.sh"
          ]
        }
      }
    }
  ],
  "post-processors": [
    {
      "type": "vagrant",
      "override": {
        "virtualbox": {
          "output": "ubuntu-14-04-virtualbox.box"
        }
      }
    }
  ]
}


choose-mirror-bin mirror/http/proxy string
d-i base-installer/kernel/override-image string linux-server
d-i clock-setup/utc boolean true
d-i clock-setup/utc-auto boolean true
d-i finish-install/reboot_in_progress note
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm_write_new_label boolean true

# Default user
d-i passwd/user-fullname string ia
d-i passwd/username string ia
d-i passwd/user-password password ia
d-i passwd/user-password-again password ia
d-i passwd/username string ia

# Minimum packages (see postinstall.sh)
d-i pkgsel/include string openssh-server
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select none
d-i pkgsel/upgrade select none

d-i time/zone string UTC
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false
tasksel tasksel/first multiselect standard, ubuntu-server

Alvaro Miranda Aguilera

unread,
Apr 26, 2014, 4:17:51 AM4/26/14
to packe...@googlegroups.com
that could mean the iso you are using have a different name for the kernel image

so, looks is not /install/vmlinuz

open the iso or at normal book check the parameters (with letter e)

and seems it's  /ubuntu14.04/i386/linux






--
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kasper Marstal

unread,
Apr 28, 2014, 12:36:05 PM4/28/14
to packe...@googlegroups.com
Dear Alvaro 

Thank you for your reply. It was indeed a very good suggestion to open the iso file and browse around ...

For all of you googlers out there, the root of the problem is that only the server version (which indeed does have an /install/vmlinuz) supports preceed. Automatic building of desktop images as I was trying to do is not possible using this approach.

Kasper

Rob Cameron

unread,
Apr 29, 2014, 4:02:24 PM4/29/14
to packe...@googlegroups.com
Awesome to know that I was not alone with this issue
Reply all
Reply to author
Forward
0 new messages