Commit Graph

105 Commits

Author SHA1 Message Date
Neal Gompa
ec56783946 Revert "Add the fstrim to post and avoid 40GB Vagrant files"
It doesn't work in the image creation environment.

This reverts commit bc7e8ce561.

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
2021-07-16 09:56:38 -04:00
Neal Gompa
dc9b56098f Revert "Remove zeroing the disk, use fstrim+sync to trim the disk"
fstrim doesn't work at all in the image creation environment.

This reverts commit 8cad6efa4e.
2021-07-16 09:49:22 -04:00
Neal Gompa
8cad6efa4e Remove zeroing the disk, use fstrim+sync to trim the disk
This should be functionally equivalent with less I/O burden.

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
2021-07-16 08:44:01 -04:00
Neal Gompa
49753d125b Set up the zeros file as nodatacow to disable CoW and compression
This makes it so that we can effectively zero out the filesystem.

Fixes: ad8e04aacb

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
2021-07-15 10:10:35 -04:00
Neal Gompa
b4015b7dba Force the filesystem to sync to disk before trimming
This ensures that data discard works properly.

Fixes: bc7e8ce561

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
2021-07-15 05:26:39 -04:00
Neal Gompa
ad8e04aacb Revert "Remove 'zeroing out empty space' section"
This actually led to the filesystems being bigger.
The most recent Fedora Rawhide images were ~900MB instead of ~300MB.

Clearly, we need this to make it smaller.

This reverts commit d4d8bffb2c.

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
2021-07-15 04:03:44 -04:00
Chris Murphy
d4d8bffb2c Remove 'zeroing out empty space' section
This section is unnecessary due to commit bc7e8ce, but also inhibits that fix.
So just remove it.

Fixes: https://pagure.io/cloud-sig/issue/340#comment-743041
Signed-off-by: Chris Murphy chrismurphy@fedoraproject.org
2021-07-13 05:05:47 +00:00
David Duncan
bc7e8ce561 Add the fstrim to post and avoid 40GB Vagrant files
Fixes:https://pagure.io/cloud-sig/issue/340

Signed-off-by: David Duncan <davdunc@amazon.com>
2021-07-08 17:01:00 -07:00
Neal Gompa
6a37d23859 Ensure Fedora Cloud has grub installed for BIOS boot on x86_64
Without this, there is no guarantee that BIOS would
be correctly set up if the install environment is UEFI.

Fixes: 611edda149

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2021-07-06 15:00:54 -04:00
Neal Gompa
611edda149 Configure Fedora Cloud with GPT with Hybrid Boot
Fedora Cloud is now set up so that it builds the disk with
GPT partitioning and has a specific partitioning layout so
that the resulting images are equipped to boot either with
legacy BIOS or UEFI.

Reference: https://fedoraproject.org/wiki/Changes/FedoraCloudHybridBoot

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2021-07-02 21:33:02 -04:00
David Duncan
c970f81e4e enable zram-based swap
https://pagure.io/cloud-sig/issue/324

Signed-off-by: David Duncan <davdunc@amazon.com>
2021-06-19 14:52:36 +00:00
Neal Gompa
6de08b413c Use Btrfs for Fedora Cloud Edition
Reference: https://fedoraproject.org/wiki/Changes/FedoraCloudBtrfsByDefault

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2021-06-16 12:15:30 -04:00
David Duncan
1e02ceba06 Improve ambiguous comment per review 2021-01-05 03:40:53 +00:00
David Duncan
569b5c6eb1 Enable qemu-guest-agent on cloud, not GCP. cloud-sig/issue/319
Signed-off-by: David Duncan <davdunc@amazon.com>
2020-12-22 01:46:33 +00:00
Dusty Mabe
a7f9177599
cloud: remove geolite2 packages
These collectively have 66MiB of data in /usr/share/GeoIP.
Let's drop it for now.
2020-09-02 18:22:22 -04:00
Dusty Mabe
99f3ec5d72
cloud: update comments and minor rework for kspost
This should make things a little clearer.
2020-09-02 18:22:22 -04:00
Dusty Mabe
f4c7f67ece
cloud: move firewalld remove to package list
It works in the package list so let's remove it there so it never
gets installed in the first place rather than the dnf erase hack
we have now.
2020-09-02 18:22:22 -04:00
Dusty Mabe
4a6850e465
cloud: rework package list, add comments
This reworks the package list to add comments and remove some things
that didn't need to be explicitly removed.

- remove +systemd-udev -> already included by default
- remove -biosdevname -> not included by default
- remove -iprutils -> not included by default
- remove -uboot-tools -> not included by default

There are no packages added or removed from the built cloud image as
part of this change. Just updating the input package list to be more
meaningful.
2020-09-02 18:22:21 -04:00
Dusty Mabe
10573df5c2
cloud: remove instLang hacks
`%packages --instLangs=en` works as intended now.
2020-09-02 18:22:21 -04:00
Dusty Mabe
54d53e8439
cloud: clean up networking configuration
We're no longer using legacy network scripts to bring up networking.
We're using NetworkManager and now in F33+ networkmanager will even
default to writing out new configuration as NM keyfiles in
/etc/NetworkManager/system-connections/. We don't need to lay down
a networking config for eth0. Either cloud-init will do that for us
or NetworkManager will default to DHCP anyway.

We also don't need to populate /etc/hosts as that will get done on
boot too with the same content we were writing there already.
2020-09-02 18:22:21 -04:00
Dusty Mabe
c94861c9e8
cloud: remove a bunch of cruft
Pretty much all of it is obsolete or not needed any longer because
bugs were fixed at one time or another.
2020-09-02 18:22:21 -04:00
Chris Murphy
23d107947f Cloud edition prefers noswap for now.
Discussions ongoing upstream in
https://pagure.io/cloud-sig/issue/307

Signed-off-by: Chris Murphy <chrismurphy@fedoraproject.org>
2020-07-09 23:22:28 +00:00
Lubomir Rintel
84d28df1b2 Include size in package lists, sort them
This is done so that it's easy spot large packages that are not
necessary and identify packages that have grown in size too much
by diffing the image compose logs.

  sed "s/rpm -qa/rpm -qa --qf '%{size}\\\\t%{name}-%{version}-%{release}.%{arch}\\\\n' |sort -rn/" -i *.ks
2020-06-17 13:22:02 +02:00
Peter Robinson
6841b8b115 Remove auth line from kickstarts
The "auth --useshadow --passalgo=sha512" is long default and auth option
itself has moved to authselect and is obsolete so this actually pulls
in extra dependencies. Drop it as the shadaow and sha512 are defaults.

Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2019-12-06 22:22:48 +00:00
Damian Wrobel
68b6257e0e Unify obtaining 'relesever'
Continuation of https://pagure.io/fedora-kickstarts/c/19a7b3b113d97db14d27f6a86db3c7479453a5ea?branch=master
but across entire repository.
2019-07-17 10:55:01 +02:00
Zbigniew Jędrzejewski-Szmek
86e0dc18cf Use dnf instead of yum
I left the instructions for yum-langpacks around, because I'm not sure
how the dnf replacement looks. But all references to yum-the-executable
are gone.

https://fedoraproject.org/wiki/Changes/Retire_YUM_3
https://bugzilla.redhat.com/show_bug.cgi?id=1682910
2019-02-26 11:38:44 +01:00
Joe Doss
00d745bd6c Remove -NetworkManager to fix BZ#1596062 2018-07-12 15:54:19 -05:00
Joe Doss
1479547c67 Clean up some unneeded whitespace. 2018-07-12 15:52:52 -05:00
Kevin Fenzi
bfe2b24660 When building cloud images oz uses dracut to setup networking and it
in turn makes a ifcfg-en<something> file with this config. We don't
want to use this, we want to always use ifcfg-eth0 so it's the same
on all images. So, we remove ifcfg-en* (They are different on each
arch we make cloud images for, but en* gets them all).
Additionally we were using some old udev tricks to get eth0, but this
is error prone and already incorrect as systemd-udev has moved files
around, so instead we just switch to net.ifnames=0 on the boot line,
which should continue working.
2018-03-19 16:23:29 -07:00
Ralph Bean
d702d27389 Fix links to this example TDL file.
Signed-off-by: Ralph Bean <rbean@redhat.com>
2017-07-07 15:58:34 -04:00
Dusty Mabe
68804358d8
atomic, cloud: remove rhgb by removing plymouth
a59dfe5 caused us a few problems:
  - sed was breaking the symlink on atomic systems
  - /boot/grub2/grub.cfg is not the right file on a UEFI system
  - etc..

We'll solve this problem a different way by just not installing
plymouth in our systems, which is another way [1] to make sure
rhgb/quiet don't appear on your kernel command line.

[1] ee91db6fa3/pyanaconda/payload/__init__.py (L722-L726)
2017-05-24 01:41:20 -04:00
Dusty Mabe
ba950669f1
cloud: fix errors that happen on UEFI systems
We are seeing an error on aarch64 cloud image creation because
of the vfat filesystem and the fixfiles command failing:

+ /usr/sbin/fixfiles -R -a restore
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/fonts/unicode.pf2:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/gcdaa64.efi:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/grub.cfg:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/grubaa64.efi:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/grubenv:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/BOOT/BOOTAA64.EFI:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/BOOT/fallback.efi:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/BOOT.CSV:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/MokManager.efi:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/shim-fedora.efi:  Operation not supported
/sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/shim.efi:  Operation not supported
2017-05-24 01:39:49 -04:00
Peter Robinson
00e6c35287 cloud/docker: move to autopart with the new no home/swap/boot options to enable generic architecture images
Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2017-05-15 17:30:43 +01:00
Dusty Mabe
a59dfe5f40
atomic, cloud: disable rhgb/quiet on boot
We want more verbose output on boot.

See https://bugzilla.redhat.com/show_bug.cgi?id=510523
2017-05-08 11:35:19 -04:00
Dusty Mabe
4948e8c002
atomic, cloud: don't create none user
Anaconda doesn't seem to require it anymore so no need to create it
and then delete it.
2017-05-08 11:35:16 -04:00
Dusty Mabe
fc0a635bc4
zero out resolv.conf during install
Anaconda is writing an /etc/resolv.conf from the install environment.
The system should start out with an empty file, otherwise cloud-init
will try to use this information and may error:
https://bugs.launchpad.net/cloud-init/+bug/1670052
2017-03-28 16:20:25 -04:00
Peter Robinson
c9fceb1c03 Fix the vagrant and bigdata cloud images
With moving to grub2 we now need to remove the extlinux bits from the
other cloud images. They were missed in the move

Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2017-03-28 16:04:52 +01:00
Peter Robinson
15a6627e09 Add bits required for aarch64 images
We drop the explicit grub2 as aarch64 only has grub2-efi but anaconda will
sort that out and ensure all the right bits are installed during the install
so we should get the right grub2 bootloader options for each arch OOTB.

Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2017-03-03 17:48:29 +00:00
Peter Robinson
2077c2935d Minor inline docs updates
Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2017-03-03 15:24:05 +00:00
Peter Robinson
bea832564f switch cloud images permanently to grub2
The main reason for cloud to use extlinux is the size of deps being
pulled in by grub2-tools. This will be fixed in F-26 with the ability
to use grub2/grub2-efi without the tools package and it's deps fixing
this issue for good. There will no doubt need to be be some tweaking
required here.

We need grub2 in cloud images for non x86 as well as for the increasing
x86 cloud platforms that require the support of uEFI which extlinux
doesn't support.

Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2017-03-03 15:24:01 +00:00
Colin Walters
9912269d88 all: Correct path to /var/lib/systemd/random-seed
At least for Atomic Host, AFAICS it isn't actually in the final
image; not entirely sure why.  But we should be using the right
path here anyways.

https://bugzilla.redhat.com/show_bug.cgi?id=1424404
2017-02-17 15:05:13 -05:00
Dusty Mabe
f6ecdc348a
docker, cloud: don't use cmdline for install mode
cmdline makes it so that %post --erroronfail won't actually stop the
installation in a way that imagefactory will detect the problem and
fail the build. See [1] for more details.

[1] https://github.com/rhinstaller/anaconda/issues/931
2017-01-19 20:57:24 -05:00
Pavel Raiskup
fa73086cf1 Don't hack 'override_install_langs' yum option
This shouldn't be needed, re-defining %_install_langs should be
enough.
2016-11-24 11:23:06 +01:00
Peter Robinson
30c3f7e721 Touch the machine-id file
So is seems that if you remove the machine-id file it won't regenerate the file
but if you touch the file and leave it empty on boot it'll put a new machine-id
in the empty file. So work around this bug ("feature"?) by touching the file
so we don't have other issues in the process.

We're track the outcome of this in RHBZ 1379800
2016-09-27 20:17:46 +01:00
Peter Robinson
890829fdbb Remove machine-id on pre generated images so it's unique on each deployed device
As referenced on the arm list [1] and as already being done on the docker image we
should remove the unique /etc/machine-id file on compose artifacts to ensure it's
regenerated and unique on each deployed host/device. This unifies the process across
all base ks so it's inherited for each artifact.

[1] https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/message/Q3YZVF5P2OLLPUJQ2LYZSTKWGGDIU6QO/

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2016-09-13 09:11:57 +01:00
Kevin Fenzi
99727567b0 Switch cloud base back to extlinux from grub2.
We need to unset the 64bit option on ext4 to make extlinux work.
See https://bugzilla.redhat.com/show_bug.cgi?id=1369934
and http://www.syslinux.org/wiki/index.php/Filesystem#ext
2016-08-30 10:44:02 -06:00
Kevin Fenzi
7a37fb6304 Merge #54 Switch the cloud base image back to grub2 for now. 2016-08-24 21:40:25 +00:00
Kevin Fenzi
a28a951979 Switch the cloud base image back to grub2 for now.
For some reason extlinux isn't working right to boot the image.
See bug https://bugzilla.redhat.com/show_bug.cgi?id=1369934
2016-08-24 14:43:30 -06:00
Adam Williamson
aca01e6eea drop rsyslog service from all cloud kickstarts
it's no longer pulled in by cloud-init (since 2014...). None
of these kickstarts has it in %packages, and it's not in any
of the cloud environment or package groups in comps either. So
it seems like no-one particularly wants rsyslog in the cloud
images.

From compose logs, it looks like trying to enable a non-existent
service in anaconda in Fedora 24 and earlier wasn't a fatal
error (anaconda more or less logged a warning and continued),
but in Fedora 25 and later it does seem to be fatal. It at least
causes one anaconda thread to crash, though the image compose
completes. I think possibly at least the way anaconda's run
in the Cloud compose process, the main thread manages to exit,
but it seems pretty likely the thread crash will result in
problems in the produced image.

Needed on master and f25.
2016-08-24 11:11:01 -07:00
Adam Williamson
4af7364074 manipulate network service in %post (#1369794)
Due to #1369794 , anaconda cannot currently manipulate sysv
services in F25+. So to work around this, take 'network' out of
the services lines in all kickstarts and instead manipulate
it in the %post section, with chkconfig.

Also remove rsyslog from the Atomic image services line because
it doesn't appear to be included in the OStree tree at present
and so attempting to enable the service breaks Atomic image
compose, see e.g.:

https://kojipkgs.fedoraproject.org//work/tasks/9022/15349022/oz-x86_64.log

also correct the name of the ssh service in fedora-arm-base.ks;
it's sshd not ssh.
2016-08-24 11:27:40 -06:00