tylert / packer-build

Packer Automated VM Image and Vagrant Box Builds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix ubuntu preseed files to pull in updates while building

tylert opened this issue · comments

The debian templates all pull in the latest updates while building. Find out why the ubuntu ones fail to do this too.

Ubuntu seems to ignore the following:

ubiquity ubiquity/download_updates boolean true
ubiquity ubiquity/use_nonfree boolean true

It would appear that d-i pkgsel/upgrade select full-upgrade also doesn't work properly either.

It may be necessary to remove the junk at the beginning of all the ubuntu preseed files (the junk that was copied from the official ISO).

We trigger updates using a preseed/late_command coupled with an additional script hosted alongside the preseed file (which Packer happily serves but can be tricky to access without knowing the IP of the preseed server from the host instance, I'm not sure if the Packer .HTTPIP var shows up inside the preseed environment).

This could be done with an inline command. I was just hoping not to have to do that since it's a bit ugly. The ubiquity/debian installer has such a command--ubiquity just seems to ignore it for some reason.

Might be the same "fix" as proposed for #9--cull the "official" goop at the beginning of the preseed files.

Are you using the desktop ISO or the server one? I thought Ubiquity was
only for the desktop versions of the installers. I typically only use the
d-i commands when building from the server ISO as those consistently work
with only a few exceptions.

On Thu, Mar 3, 2016 at 4:25 PM, Tyler Tidman notifications@github.com
wrote:

This could probably be done with an inline command. I'm was just hoping
not to have to do that since it's a bit ugly. The ubiquity/debian installer
has such a command--ubiquity just seems to ignore it for some reason.

Might be the same "fix" as proposed for #9
#9 the "official"
goop at the beginning of the preseed files.


Reply to this email directly or view it on GitHub
#7 (comment).

I typically use this to run a final stage update

d-i preseed/late_command string \
  in-target rm -rf /var/lib/apt/lists ; \
  in-target apt-get update ; \
  in-target apt-get -y upgrade ; \
  in-target apt-get -y dist-upgrade ; \
  in-target apt-get -y autoremove ; \
  in-target apt-get autoclean ; \
  in-target apt-get clean

Pretty sure that http://cdimage.ubuntu.com/netboot/ is going to be a slightly better and less hackish way of making sure all updates are yanked in at build time.

This might also get around some of the stupidity of ubiquity as well and allow better automation for building desktop images too.