181 Commits

Author SHA1 Message Date
Steve Langasek
c02f0f0f4c Install grub-ieee1275 instead of grub2 on ppc64el; grub2 is a dummy
transitional package in universe.
2017-12-06 14:22:41 -08:00
Michael Hudson-Doyle
c24e13f8f9 install grub-ieee1275 instead of grub2 on ppc64el
grub2 is a dummy transitional package that is in universe.
2017-12-01 13:44:32 +13:00
Balint Reczey
532bd5b5ed Build minimized images in a 1GiB image 2017-11-23 20:27:16 +01:00
Balint Reczey
c45ea223b4 Use default xz compression (-6) for raspi2 image
Xz with -0 generated ~35% bigger compressed image.

LP: #1732681
2017-11-20 21:18:33 +01:00
Balint Reczey
578fa5a92d Update changelog 2017-11-14 19:04:21 +01:00
Balint Reczey
4a168af954 Skip setting up initrd for s390x when it is not generated for the image
This fixes building minimized s390x images.
2017-11-14 18:44:06 +01:00
Steve Langasek
51890b5b43 add 'file' to the axe list for minimized 2017-10-18 18:11:53 -07:00
Steve Langasek
c9b427c11b Another round of package removals for minimization 2017-10-18 17:50:56 -07:00
Steve Langasek
c0bb8d760f remove vim a little harder 2017-10-13 23:52:03 -04:00
Steve Langasek
783437f533 instead, call apt clean from the chroot 2017-10-13 21:50:26 -04:00
Steve Langasek
dec765f035 no actual point in apt clean here, since that just cleans files from the bind mount 2017-10-13 21:40:02 -04:00
Steve Langasek
bc361bc33b call apt clean separately for the squashfs 2017-10-13 17:35:33 -04:00
Steve Langasek
dc875735b8 More packages to remove when minimizing 2017-10-13 17:25:50 -04:00
Steve Langasek
add1cca991 Refactor, mark all lib'*' and python'*' packages auto-installed so they can be cleaned up as dependencies instead 2017-10-13 17:00:37 -04:00
Steve Langasek
54427d4440 When building minimized cloud images, remove various packages that we
don't want installed by default.  Some are tools that aren't needed for
non-interactive use; some are libraries whose reverse-dependencies
will have already been removed; and one, open-vm-tools, should only be
included in images that are targeted to VMWare (which is not the case
for any of the current minimal images), rather than being included
directly in the cloud-image seed.
2017-10-13 14:59:37 -04:00
Steve Langasek
ad78957f01 Remove boot/grub leftovers from our root squashfs, left behind after
grub purge.
2017-10-13 14:20:50 -04:00
Balint Reczey
549232f607 Clean up dangling /boot/initrd.img symlink when needed 2017-10-11 01:57:03 +02:00
Steve Langasek
a75cbf210b Fix the force-partuuid handling to create the file under
/etc/default/grub.d/ with a .cfg extension as grub expects; it's unclear
how this ever worked without.
2017-10-04 22:51:30 -07:00
Steve Langasek
a5e27120c0 Factor out grub-related diversions and use them consistently, so we
don't end up with wrong os-probe output in our grub.cfg.
2017-10-04 22:33:41 -07:00
Balint Reczey
f0cb85a506 When SUBPROJECT environment variable is not set assume it to be "" 2017-09-29 15:20:14 -04:00
Balint Reczey
2ef2aee456 Use SUBPROJECT=minimized name instead of SUBPROJECT=minimize for consistency 2017-09-29 15:20:14 -04:00
Balint Reczey
c5d01a6635 Force partuuid in /etc/default/grub.d/* instead of in /etc/default/grub
This prevents ucf questions upon installation of changed /etc/default/grub
2017-09-27 18:54:09 -04:00
Steve Langasek
0365171ce3 minimization handling for UEFI disk images 2017-09-26 22:39:09 -04:00
Balint Reczey
9dd615d380 Drop initramfs-tools diversion
Kernels which are able to boot without initramfs now dropped dependency
on initramfs-tools thus initramfs-tools can be removed from the image
instead of having to divert it to avoid initramfs generation.
2017-09-26 22:39:09 -04:00
Balint Reczey
d65e1edfd1 Source config/binary instead of /build/config/binary which may not exist 2017-09-26 22:39:09 -04:00
Steve Langasek
3ed1f4fdd1 In a cloud environment, we can rely on the kernel being able to boot the
root filesystem directly, without an initramfs; enable this when
building minimized.
2017-09-26 22:39:09 -04:00
Steve Langasek
786370819c Make the 999-cpc-fixes.chroot subproject-aware, so we don't try to locale-gen 2017-09-26 22:39:09 -04:00
Balint Reczey
20617c6f51 Don't ask for password and GECOS while creating vagrant user 2017-09-25 18:02:09 -04:00
Steve Langasek
bcb2bcc1cd Remove spurious call to 'sync'; we don't need to flush all disk caches
on the system to cleanly unmount a partition.
2017-09-19 13:17:26 -07:00
Dimitri John Ledkov
9c9dbda327 * Enable systemd-networkd by default.
- Usually, netplan's systemd-generator enables systemd-networkd and
  systemd-networkd-wait-online on boot. But netplan configuration is not
  yet generated at that point by cloud-init. Cloud-init generates in the
  network-pre.target and expects the network.target /
  network-online.target to work. These are already part of the ongoing
  systemd transaction, thus cannot be injected into the boot-sequency by
  cloud-init local mode. Therefore make sure cloud images include
  networkd in the initial boot transaction.
  - src:systemd will shortly not enable networkd unconditionally by
  default.
* Drop ifupdown e-n-i configuration files, no longer used.
2017-09-14 17:17:57 +01:00
Steve Langasek
7f9094170b remove another straggler udevadm+sleep 2017-09-13 22:34:11 -07:00
Robert C Jennings
83b4f5338c live-build/ubuntu-cpc/functions: Add teardown_mountpoint to reverse setup_mountpoint
* live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint,
  to reverse the work done in setup_mountpoint.  Lack of this function
  has forced users of setup_mountpoint to implement this separately
  and the implementations have diverged. (LP: #1716992)
* live-build/ubuntu-cpc/functions: Remove umount_settle function.
  The was only used where teardown_mountpoint was lacking.
2017-09-13 13:31:12 -05:00
Steve Langasek
8589d3548f live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary: call apt-get
update *before* installing packages, not after.
2017-09-12 14:39:04 -07:00
Steve Langasek
a246300940 * live-build/functions: mount tmpfs on /var/cache/apt and var/lib/apt, so
we don't have to leave empty space in our derivative images for packages
  that have been downloaded/installed/removed.  This normally isn't
  relevant for the installed system, since the root filesystem will
  auto-expand in place on the target disk, but lets us ship smaller
  images.
* live-build/functions: also call 'apt-get update' after mounting the
  blank /var/lib/apt.
2017-09-12 14:36:50 -07:00
Colin Watson
6a42148b22 Mount and unmount /dev recursively, to cope with setups where there are
interesting bind-mounts under /dev (e.g. loop devices bind-mounted by
LXD).
2017-09-08 11:48:06 +01:00
Adam Conrad
fc48e02c37 [tribaal, r=adconrad] Create vagrant user per upstream requirements
This branch changes the behavior for default users on the vagrant image,
according to much of https://www.vagrantup.com/docs/boxes/base.html

Specifically, this adds a new "vagrant" user with a know password on top
of the already existing ubuntu user.

This conforms to the expectations of the Vagrant community, despite some
security concerns. Vagrant images are not used for production systems but
for development environments, and the absence of the "standard" vagrant user
has been hurting ubuntu adoption on that platform.
2017-09-01 10:50:32 -06:00
Christopher Glass
f10cd80ebb Make sure the .ssh directory has the right permissions. 2017-09-01 18:25:41 +02:00
Christopher Glass
e798276910 Fixed review comments by Adam.
- use adduser instead of useradd.
2017-09-01 18:21:53 +02:00
Christopher Glass
3d901daef4 Fix file permission problem - the authorized_keys file was still owned by root since the chown call came before its creation. 2017-08-29 16:27:03 +02:00
Christopher Glass
e6fd2b657e Remove ubuntu user customisations.
Let's just do the absolute minimum here, the default is what people expect.
2017-08-29 09:23:33 +02:00
Steve Langasek
b1432b36be Don't reference dropped grub_modules variable in grub-install command 2017-08-25 11:18:19 -07:00
Christopher Glass
87f34122fb Remove useless diff. 2017-08-25 17:02:52 +02:00
Christopher Glass
97c8996c29 Remove the useless user and password from default config. 2017-08-25 16:57:36 +02:00
Christopher Glass
72dbb4c75d Added comments. 2017-08-25 13:19:21 +02:00
Christopher Glass
467b8c9c06 Reset the default SSH user to being vagrant.
Using "vagrant ssh" is confusing otherwise.
2017-08-25 12:59:53 +02:00
Christopher Glass
1cc6041cd6 Remove root login. Ubuntu user keeps generated password. 2017-08-25 12:05:29 +02:00
Christopher Glass
b9363e97fb Explicitely permit passworded root login over SSH. 2017-08-25 08:37:18 +02:00
Christopher Glass
c0730ef6f6 Fix typo in variable name. 2017-08-24 21:19:30 +02:00
Christopher Glass
cc8a6e2709 Turns out the user adding should be done when the chroot is available... 2017-08-24 19:17:17 +02:00
Mathieu Trudel-Lapierre
563abee702 Drop special handling of grub modules, adding a note. Modules should be included in the signed grub binaries when necessary. 2017-08-23 20:23:32 -04:00