Preseed and Bypass Try/Install screen in ubuntu 14.04, 16.04 #3521

Closed
skonto opened this Issue May 10, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@skonto

skonto commented May 10, 2016

Hello im packer newbie.

Preseeding seems not working in desktop versions and 16.04 server version, i cannot get the try it/install screen bypassed. Is there something im missing? I have seen there was an issue with the boot command in 16.04.
Still hard to find a properly working example with packer.

  • Packer Version 0.10.0
  • Host platform Xenial 16.04
    Virtualbox 5.0.18

Packer json template:
https://gist.github.com/skonto/14430bf86ce4ab10851f159c7c0fe1e3

@rickard-von-essen

This comment has been minimized.

Show comment
Hide comment
@rickard-von-essen

rickard-von-essen May 10, 2016

Collaborator

See chef/bento#482

You have to use a boot_command something like:

    "boot_command": [
        "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "/install/vmlinuz<wait>",
        " auto<wait>",
        " console-setup/ask_detect=false<wait>",
        " console-setup/layoutcode=us<wait>",
        " console-setup/modelcode=pc105<wait>",
        " debconf/frontend=noninteractive<wait>",
        " debian-installer=en_US<wait>",
        " fb=false<wait>",
        " initrd=/install/initrd.gz<wait>",
        " kbd-chooser/method=us<wait>",
        " keyboard-configuration/layout=USA<wait>",
        " keyboard-configuration/variant=USA<wait>",
        " locale=en_US<wait>",
        " netcfg/get_domain=vm<wait>",
        " netcfg/get_hostname=vagrant<wait>",
        " grub-installer/bootdev=/dev/sda<wait>",
        " noapic<wait>",
        " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>",
        " -- <wait>",
        "<enter><wait>"
      ],
Collaborator

rickard-von-essen commented May 10, 2016

See chef/bento#482

You have to use a boot_command something like:

    "boot_command": [
        "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "/install/vmlinuz<wait>",
        " auto<wait>",
        " console-setup/ask_detect=false<wait>",
        " console-setup/layoutcode=us<wait>",
        " console-setup/modelcode=pc105<wait>",
        " debconf/frontend=noninteractive<wait>",
        " debian-installer=en_US<wait>",
        " fb=false<wait>",
        " initrd=/install/initrd.gz<wait>",
        " kbd-chooser/method=us<wait>",
        " keyboard-configuration/layout=USA<wait>",
        " keyboard-configuration/variant=USA<wait>",
        " locale=en_US<wait>",
        " netcfg/get_domain=vm<wait>",
        " netcfg/get_hostname=vagrant<wait>",
        " grub-installer/bootdev=/dev/sda<wait>",
        " noapic<wait>",
        " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>",
        " -- <wait>",
        "<enter><wait>"
      ],
@skonto

This comment has been minimized.

Show comment
Hide comment
@skonto

skonto May 10, 2016

cool thnx! Is there an option that bypasses the initial screen in desktop iso?

skonto commented May 10, 2016

cool thnx! Is there an option that bypasses the initial screen in desktop iso?

@rickard-von-essen

This comment has been minimized.

Show comment
Hide comment
@rickard-von-essen

rickard-von-essen May 10, 2016

Collaborator

I think this should work across all flavours of Ubuntu, but I haven't tried it.

Collaborator

rickard-von-essen commented May 10, 2016

I think this should work across all flavours of Ubuntu, but I haven't tried it.

@skonto

This comment has been minimized.

Show comment
Hide comment
@skonto

skonto May 10, 2016

Unfortunately it does not work with the desktop iso, i just tried it, while with the server one everything runs smoothly.

skonto commented May 10, 2016

Unfortunately it does not work with the desktop iso, i just tried it, while with the server one everything runs smoothly.

@rickard-von-essen

This comment has been minimized.

Show comment
Hide comment
@rickard-von-essen

rickard-von-essen May 10, 2016

Collaborator

I think you can just use the server iso and then run sudo apt-get install ubuntu-desktop in one of your provisioners.

Collaborator

rickard-von-essen commented May 10, 2016

I think you can just use the server iso and then run sudo apt-get install ubuntu-desktop in one of your provisioners.

@skonto

This comment has been minimized.

Show comment
Hide comment
@skonto

skonto May 10, 2016

I managed to get to the advanced page (as in the server case) with a modified version of what you posted:

"<enter><wait><f6><esc><f6><enter><esc><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
 "boot=casper noapic ",
 "debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait> ",
 "hostname={{ .Name }} <wait> ",
 "fb=false debconf/frontend=noninteractive <wait> ",
 "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false <wait> ",
 "initrd=/casper/initrd.lz<wait> ",
 "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait> ",
 " -- <wait>",
 "<down><enter><wait>"

But the problem i think is the installer itself which is graphical anyway. Even if i pass the boot options then after <down><enter><wait> it will start the normal welcome screen (although now try it/install is missing).
Note also you need initrd=/casper/initrd.lz boot=casper /install/vmlinuz and initrd=/install/initrd.gz will not work.

I thought of manually installing the desktop but it would be best if there was a workaround.
Thnx btw.

skonto commented May 10, 2016

I managed to get to the advanced page (as in the server case) with a modified version of what you posted:

"<enter><wait><f6><esc><f6><enter><esc><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
 "boot=casper noapic ",
 "debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait> ",
 "hostname={{ .Name }} <wait> ",
 "fb=false debconf/frontend=noninteractive <wait> ",
 "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false <wait> ",
 "initrd=/casper/initrd.lz<wait> ",
 "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait> ",
 " -- <wait>",
 "<down><enter><wait>"

But the problem i think is the installer itself which is graphical anyway. Even if i pass the boot options then after <down><enter><wait> it will start the normal welcome screen (although now try it/install is missing).
Note also you need initrd=/casper/initrd.lz boot=casper /install/vmlinuz and initrd=/install/initrd.gz will not work.

I thought of manually installing the desktop but it would be best if there was a workaround.
Thnx btw.

@skonto

This comment has been minimized.

Show comment
Hide comment
@cbednarski

This comment has been minimized.

Show comment
Hide comment
@cbednarski

cbednarski May 10, 2016

Contributor

@skonto Yeah unfortunately there are quite a few bugs in the 16.04 installer, so some things that should work, don't. The long list of backspaces is one of them, because the normal text-input boot command doesn't work.

Sounds like you've got things figured out, and there are lots of good examples to look at online if you need more reference material. Please feel free to re-open if you're still having trouble.

Contributor

cbednarski commented May 10, 2016

@skonto Yeah unfortunately there are quite a few bugs in the 16.04 installer, so some things that should work, don't. The long list of backspaces is one of them, because the normal text-input boot command doesn't work.

Sounds like you've got things figured out, and there are lots of good examples to look at online if you need more reference material. Please feel free to re-open if you're still having trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment