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

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

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

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

skonto opened this issue May 10, 2016 · 8 comments
Labels

Comments

@skonto
Copy link

@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
Copy link
Collaborator

@rickard-von-essen 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
Copy link
Author

@skonto skonto commented May 10, 2016

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

@rickard-von-essen
Copy link
Collaborator

@rickard-von-essen rickard-von-essen commented May 10, 2016

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

@skonto
Copy link
Author

@skonto 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
Copy link
Collaborator

@rickard-von-essen 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
Copy link
Author

@skonto 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
Copy link
Author

@skonto skonto commented May 10, 2016

@cbednarski
Copy link
Contributor

@cbednarski 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.

@cbednarski cbednarski closed this May 10, 2016
@hashibot hashibot bot locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants