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

Find out why ubuntu wily and xenial base templates fail to get past the boot command key presses #2

Closed
tylert opened this issue Jan 28, 2016 · 13 comments

Comments

@tylert
Copy link
Owner

tylert commented Jan 28, 2016

At the moment, the wily and xenial base templates fail to automate the keypresses to get past the initial boot command part so it never actually starts off the install process.

  1. extract the official server seed file from the wily and xenial ISOs to confirm they haven't changed
  2. merge any changes with the existing wily and xenial preseed files in use here
  3. if this doesn't fix it, keep applying various blunt instruments to ubuntu to make it work again
@mcclurmc
Copy link

I ran into this problem just now. I noticed that when vagrant is typing out the preseed url for xenial, the url gets a line split after the ub, so that the url is broken. The line split doesn't happen on precise. I can take a screencap if you want. Hope that helps your debugging.

@tylert
Copy link
Owner Author

tylert commented Jan 31, 2016

I haven't had much opportunity to look at this yet--your help is very much appreciated. At first glance, this would appear to be an issue with Packer itself rather than the templates. It may be possible that this bug has already been fixed in the 5+ months between Packer 0.8.6 and Packer 0.9.0. I am somewhat doubtful that the problem lies in the ubiquity installer on wily and xenial.

I currently use VirtualBox 5.0.14 on Mac OS X (El Capitan), VirtualBox 4.3.36 on Linux (Debian 8.x) and qemu-kvm 2.1.2 on Linux (Debian 8.x) for testing.

@tylert
Copy link
Owner Author

tylert commented Jan 31, 2016

Oh, I did confirm that the "ubuntu.seed" file (or whatever it was named; look in the preseed folder) packed inside the official Wily and Xenial server amd64 ISO files is identical to the ones that I am using (plus my added customizations).

@tylert
Copy link
Owner Author

tylert commented Jan 31, 2016

I just tried this using qemu-kvm and the same newline after "ub" occurred there too for Wily.

@mcclurmc
Copy link

My versions are VirtualBox 5.0.8r103449 and Vagrant 1.8.1 on OSX, haven't tried this on Linux yet. I've got some errands to run, but I might be able to building packer from source to see if that fixes things.

@tylert
Copy link
Owner Author

tylert commented Jan 31, 2016

Sounds good.

Typing in the boot command manually results in the same failure so maybe it is something else.

@mcclurmc
Copy link

Hey @tylert, do you have a WIP branch that resolves #4? I just built a new packer, and I figured I'd check with you before trying to update the xenial.json myself.

Of course, if you think that your manual test shows that the bug is upstream Ubuntu, maybe the bug isn't actually in Packer? Think I should hold off on further testing for now?

@tylert
Copy link
Owner Author

tylert commented Jan 31, 2016

Issue #4 is mostly since I am waiting for precisely 1 new Packer feature to enter the mainline stable version--to stop it from renaming the ISOs that it downloads; For me, the hashed filenames are not optimal--I want the original filenames preserved. If you also want this functionality, you may pull my "foo" branch and use that. Otherwise, you may perform all your Xenial tests for issue #2 against the "master" branch. I didn't have much luck getting HEAD of Packer to work correctly when I tried last week but you may have more luck than me.

My quick-and-dirty initial manual tests above were simply to fire things up using packer, let it try and fail to send the key presses and then to jump in at the keyboard to type them in again (using the packer template boot command string as a guide). I think we can rule out the issue being in the virtualbox-iso or qemu packer builders themselves, however, it doesn't mean the problem isn't elsewhere in the packer code (i.e.: the code responsible for sending the keypresses or the code that sends the file over http perhaps). I only confirmed that the Wily ubiquity installer seems to behave the same when using packer + qemu and packer + vbox.

A better test might be to make the "base-64.seed" preseed file available via http (perhaps using the sow.py python script provided) and to attempt to bypass packer completely to try to rule that out. As in, get VirtualBox to boot the wily server ISO + manually type in the boot command string to fetch the preseed file over http. If you don't have a quick way to do this, you may do so if you have Python installed by typing:

cd packer-build
./sow.py

Anyway, thanks for taking the time to help out.

@tylert
Copy link
Owner Author

tylert commented Feb 1, 2016

Well, ok, this would actually appear to be a regression in the Ubuntu installer...

The workaround/fix is to change the boot_command string to stop it from dropping to text mode interface and use the F6 append string to send it a crap ton of "bs" keypresses instead before sending it the normal boot strings.

@tylert
Copy link
Owner Author

tylert commented Feb 1, 2016

Fixed in master.

@tylert tylert closed this as completed Feb 1, 2016
@mcclurmc
Copy link

mcclurmc commented Feb 1, 2016

Hey @tylert, thanks for the update! And thanks for maintaining a tool that does exactly the thing I need :)

@tylert
Copy link
Owner Author

tylert commented Feb 1, 2016

Heh... Glad somebody is using it :)

@Ajedi32
Copy link

Ajedi32 commented Aug 12, 2016

Specifically, this is fixed by 32d9faa

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

3 participants