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

Ubuntu 20.04 dropped d-i and kickstart support in server live ISO #52

Open
walterrowe opened this issue Mar 30, 2020 · 25 comments
Open

Comments

@walterrowe
Copy link

No description provided.

@mkinney
Copy link
Contributor

mkinney commented Mar 31, 2020

I'm guessing it is because they do daily builds of the iso until it is released on April 23, 2020.

@walterrowe
Copy link
Author

Makes sense. I am new to packer, so it forced me to learn a little. I updated the checksum and it ran fine. Feel free to close this, or keep it until the official release is out.

@geerlingguy
Copy link
Owner

@walterrowe - Yeah, sorry about that. Unfortunately short of me writing a script to update it nightly, you'll have to live with it until the official 20.04.0 release comes out :(

I'll leave this open for visibility, though, until the release comes (should be soon!)

@geerlingguy geerlingguy changed the title Ubuntu20 checksum in packer json is incorrect Ubuntu 20.04 checksum in packer.json doesn't work for current nightly ISO Apr 1, 2020
@geerlingguy
Copy link
Owner

Ubuntu 20.04 is here: https://releases.ubuntu.com/20.04/

So I'll update to the latest stable ISO and then we can close out this issue :)

@geerlingguy
Copy link
Owner

So... I can only find a server live install ISO, and the 'server-amd64' isos are stored under 'daily' and are listed as "legacy" for some reason: http://cdimage.ubuntu.com/ubuntu-server/daily/20200423/

I'm trying a build with one of those right now. The 'live-server' install ISO doesn't behave the same and I can't get it to go into kickstart mode for installation... don't know why it's so different than the 'legacy' ISO.

@geerlingguy
Copy link
Owner

Oh. https://discourse.ubuntu.com/t/server-installer-plans-for-20-04-lts/13631

With 20.04 LTS, we will be completing the transition to the live server installer and discontinuing the classic server installer based on debian-installer (d-i), allowing us to focus our engineering efforts on a single codebase. The next-generation subiquity server installer brings the comfortable live session and speedy install of Ubuntu Desktop to server users.

@geerlingguy
Copy link
Owner

geerlingguy commented Apr 23, 2020

So, the new auto-installer is documented here: https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls

And a Quick Start guide is available here: https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/QuickStart

Though it seems like it's a little different if booting the ISO in Packer—it looks like the quick start guide assumes you're building a new image / install from within an existing instance, not building on top of something that's already running.

In other words, I give up for now on moving to this new installer—I'll likely take a look again soon, but for now, I'll leave up the 0.9.0 box with a few weeks-old nightly build, because it's going to be at least a couple hours' work to try to figure out this new unattended installation system, and translate all the old d-i and preseed/kickstart stuff into it.

@geerlingguy
Copy link
Owner

The official Packer documentation probably needs to be updated too: https://www.packer.io/guides/automatic-operating-system-installs/preseed_ubuntu.html

Bento hasn't been updated so I can't steal any ideas from there yet, either: https://github.com/chef/bento/tree/master/packer_templates/ubuntu

@geerlingguy
Copy link
Owner

For now, I'm sticking with a legacy daily server image build: http://cdimage.ubuntu.com/ubuntu-server/daily/20200423/focal-legacy-server-amd64.iso

@geerlingguy geerlingguy changed the title Ubuntu 20.04 checksum in packer.json doesn't work for current nightly ISO Ubuntu 20.04 dropped d-i and kickstart support in server live ISO Apr 23, 2020
@walterrowe
Copy link
Author

walterrowe commented Apr 23, 2020

Bring up your Ubuntu 20.04 vagrant instance and look in the install logs dir there. You will find an autoinstall file that matches the anaconda configs for that machine. If I read the docs correctly, you can use that auto-install file for the autoinstall method. You still need to figure out how to initiate an auto-install vs d-i, and point it to the autoinstall file. It is basically YAML format.

Note this comment in the autoinstall docs for creating an autoinstall config file:

The snap described here does not yet exist

Also, if you change your headless from true to false you will see install screens in vBox as they play.

@geerlingguy
Copy link
Owner

geerlingguy commented Apr 23, 2020

you will see install screens in vBox as they play

@walterrowe - Yeah, was doing that and I was trying to manually get into an automated install mode but was unsuccessful after a few minutes digging around. But I'll likely get around to it again soon.

@tmepple
Copy link

tmepple commented Apr 23, 2020

@geerlingguy Instead of using the daily link pinned at 20200423 (which they might prune) should we use the more permanent build at http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04-legacy-server-amd64.iso?

I assume they plan to keep releasing legacy versions using d-i through the 20.04 lifetime so we have plenty of time to transition to the new installer.

@walterrowe
Copy link
Author

According to the Installer section of the 20.04 LTS release notes, the Live Installer is now the preferred install method.

@basictheprogram
Copy link
Contributor

@nickcharlton
Copy link

I've been looking into this problem, and after a weekend of experiments have gotten it working using the new automated installer.

It's a bit late here in the UK as I write this, so I've run out of time to open the PR I wanted to but I'd like to come back tomorrow with one.

In the mean time, if someone wants to take a look at this, I've written up my notes which have a working configuration: https://nickcharlton.net/posts/automating-ubuntu-2004-installs-with-packer.html

basictheprogram added a commit to basictheprogram/packer-boxes that referenced this issue Apr 27, 2020
Quick fix to change the iso_urls to a url that dosn't change each day see
geerlingguy#52 (comment)
for details
geerlingguy added a commit that referenced this issue Apr 27, 2020
@geerlingguy
Copy link
Owner

@nickcharlton - Awesome, thanks for posting! For the shorter-term I merged @basictheprogram's PR which uses the more stable (non-nightly) legacy build ISO.

@rubenst2013
Copy link

rubenst2013 commented Apr 27, 2020

@nickcharlton how did you get the installer to execute the user-data yaml formated file?
I did as you described in your blog post but its simply stuck at language selection.
I noticed once it reaches the first interactive screen with language selection there is no hot key f6...only f2 to jump into the command line.

Increased the boot wait time, because at 5s it was typing #somewhere(tm) in the middle of the installer startup.
And of course added the vars for the http server and port. No luck.

Edit: a difference between our two setup I should mention is I am using the virtualbox-iso builder.

Edit 2: After some more experimenting I found my error, doh. The commands in your blog post are related to the ISO's grub boot loader and not the ubuntu installer itself. 😃
they simply flew by so fast, I couldn't even see grub.
Now it loads the user-data file.

I previously generated the user-data file on a manual installation and adjusted it according to the installers documentation...but...

now there is the issue with packer loosing the ssh connection, saying:
virtualbox-iso: Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [password none], no supported methods remain
From what I gather during installer startup is that it generates a user "installer" with a random password to ssh into the installer session. I think packer picks up on that and tries to logon with its ubuntu or vagrant user, depending on the settings - and fails when it is ultimately rejected.

@nickcharlton
Copy link

@rubenst2013, I was seeing random failures with that problem, too. Sometimes Packer would try and connect, get a failure and quit. Other times it'd finish fine.

If you try using pause_before_connecting, does that help?

@rubenst2013
Copy link

Hi @nickcharlton,

Thanks for the heads-up about this setting. Though I just tried it and the VM was closed by packer again, regardless of that setting. 😢

@rubenst2013
Copy link

I made a pull request, which implements the necessary changes and worked locally.

Please let me knwo how this works for you. Thanks!

#61

@nickcharlton
Copy link

Right, yeah. I found the same yesterday too. pause_before_connecting doesn't behave the way I thought it did: It doesn't wait for SSH, instead it keeps trying to connect and when it eventually can it then pauses.

Instead, I found that expanding the ssh_handshake_attempts achieves the right thing, by allowing it to keep failing longer.

@ghost
Copy link

ghost commented Jul 22, 2020

@geerlingguy As a little help, I managed to get this going via cloud-init. Ubuntu 20.04 pickups the user-data correctly. Take a look at my repo, especially at boot_command and ssh_handshake_attempt (I set it to 40, but maybe it could be set lover - didn't had time to test it)

@walterrowe
Copy link
Author

Is this fixed / closed?

@geerlingguy
Copy link
Owner

@walterrowe - I've been using my workaround since the beginning—but I'd still like to go back to the smaller ISO and maybe save some space and setup time, so I'm leaving it open :)

@maroskukan
Copy link

Hey folks. would you still be interested in "live installer" template for Ubuntu 20.04? I have something like this on the radar. Perhaps I could do a PR afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants