Update the example livemedia-creator kickstarts for RHEL8
Rename them to rhel-*, update urls to reference BaseOS and AppStream. rhel-livemedia will boot into a live GNOME desktop. Resolves: rhbz#1650295
This commit is contained in:
parent
f3638762fe
commit
1a8591fdd5
@ -53,13 +53,13 @@ Quickstart
|
|||||||
Run this to create a bootable live iso::
|
Run this to create a bootable live iso::
|
||||||
|
|
||||||
sudo livemedia-creator --make-iso \
|
sudo livemedia-creator --make-iso \
|
||||||
--iso=/extra/iso/boot.iso --ks=./docs/fedora-livemedia.ks
|
--iso=/extra/iso/boot.iso --ks=./docs/rhel-livemedia.ks
|
||||||
|
|
||||||
You can run it directly from the lorax git repo like this::
|
You can run it directly from the lorax git repo like this::
|
||||||
|
|
||||||
sudo PATH=./src/sbin/:$PATH PYTHONPATH=./src/ ./src/sbin/livemedia-creator \
|
sudo PATH=./src/sbin/:$PATH PYTHONPATH=./src/ ./src/sbin/livemedia-creator \
|
||||||
--make-iso --iso=/extra/iso/boot.iso \
|
--make-iso --iso=/extra/iso/boot.iso \
|
||||||
--ks=./docs/fedora-livemedia.ks --lorax-templates=./share/
|
--ks=./docs/rhel-livemedia.ks --lorax-templates=./share/
|
||||||
|
|
||||||
You can observe the installation using vnc. The logs will show what port was
|
You can observe the installation using vnc. The logs will show what port was
|
||||||
chosen, or you can use a specific port by passing it. eg. ``--vnc vnc:127.0.0.1:5``
|
chosen, or you can use a specific port by passing it. eg. ``--vnc vnc:127.0.0.1:5``
|
||||||
@ -202,7 +202,7 @@ the current directory or in the directory used for --logfile
|
|||||||
|
|
||||||
Example cmdline:
|
Example cmdline:
|
||||||
|
|
||||||
``sudo livemedia-creator --make-iso --no-virt --ks=./fedora-livemedia.ks``
|
``sudo livemedia-creator --make-iso --no-virt --ks=./rhel-livemedia.ks``
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Using no-virt to create a partitioned disk image (eg. --make-disk or
|
Using no-virt to create a partitioned disk image (eg. --make-disk or
|
||||||
@ -225,7 +225,7 @@ that it would work with livemedia-creator.
|
|||||||
|
|
||||||
Example cmdline:
|
Example cmdline:
|
||||||
|
|
||||||
``sudo livemedia-creator --make-ami --iso=/path/to/boot.iso --ks=./docs/fedora-livemedia-ec2.ks``
|
``sudo livemedia-creator --make-ami --iso=/path/to/boot.iso --ks=./docs/rhel-livemedia-ec2.ks``
|
||||||
|
|
||||||
This will produce an ami-root.img file in the working directory.
|
This will produce an ami-root.img file in the working directory.
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ The created image can be imported into libvirt using:
|
|||||||
|
|
||||||
You can also create qcow2 appliance images using ``--image-type=qcow2``, for example::
|
You can also create qcow2 appliance images using ``--image-type=qcow2``, for example::
|
||||||
|
|
||||||
sudo livemedia-creator --make-appliance --iso=/path/to/boot.iso --ks=./docs/fedora-minimal.ks \
|
sudo livemedia-creator --make-appliance --iso=/path/to/boot.iso --ks=./docs/rhel-minimal.ks \
|
||||||
--image-type=qcow2 --app-file=minimal-test.xml --image-name=minimal-test.img
|
--image-type=qcow2 --app-file=minimal-test.xml --image-name=minimal-test.img
|
||||||
|
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ no-virt modes of operation. Previously it was only available with no-virt.
|
|||||||
|
|
||||||
Kickstarts should have a single / partition with no extra mountpoints.
|
Kickstarts should have a single / partition with no extra mountpoints.
|
||||||
|
|
||||||
``livemedia-creator --make-fsimage --iso=/path/to/boot.iso --ks=./docs/fedora-minimal.ks``
|
``livemedia-creator --make-fsimage --iso=/path/to/boot.iso --ks=./docs/rhel-minimal.ks``
|
||||||
|
|
||||||
You can name the output image with ``--image-name`` and set a label on the filesystem with ``--fs-label``
|
You can name the output image with ``--image-name`` and set a label on the filesystem with ``--fs-label``
|
||||||
|
|
||||||
@ -327,8 +327,8 @@ As with ``--make-fsimage`` the kickstart should be limited to a single / partiti
|
|||||||
|
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
livemedia-creator --make-tar --iso=/path/to/boot.iso --ks=./docs/fedora-minimal.ks \
|
livemedia-creator --make-tar --iso=/path/to/boot.iso --ks=./docs/rhel-minimal.ks \
|
||||||
--image-name=fedora-root.tar.xz
|
--image-name=rhel-root.tar.xz
|
||||||
|
|
||||||
|
|
||||||
Live Image for PXE Boot
|
Live Image for PXE Boot
|
||||||
@ -349,7 +349,7 @@ using Atomic installer iso with local repo included in the image can be found
|
|||||||
in docs/rhel-atomic-pxe-live.ks.
|
in docs/rhel-atomic-pxe-live.ks.
|
||||||
|
|
||||||
The PXE images can also be created with ``--no-virt`` by using the example
|
The PXE images can also be created with ``--no-virt`` by using the example
|
||||||
kickstart in docs/fedora-atomic-pxe-live-novirt.ks. This also works inside the
|
kickstart in docs/rhel-atomic-pxe-live-novirt.ks. This also works inside the
|
||||||
mock environment.
|
mock environment.
|
||||||
|
|
||||||
|
|
||||||
@ -394,16 +394,16 @@ group.
|
|||||||
``url points to the correct repo``
|
``url points to the correct repo``
|
||||||
|
|
||||||
7. Init the mock
|
7. Init the mock
|
||||||
``mock -r fedora-rawhide-x86_64 --old-chroot --init``
|
``mock -r rhel-8-x86_64 --old-chroot --init``
|
||||||
|
|
||||||
8. Copy the kickstart inside the mock
|
8. Copy the kickstart inside the mock
|
||||||
``mock -r fedora-rawhide-x86_64 --old-chroot --copyin ./fedora-minimal.ks /root/``
|
``mock -r rhel-8-x86_64 --old-chroot --copyin ./rhel-minimal.ks /root/``
|
||||||
|
|
||||||
9. Make a minimal iso::
|
9. Make a minimal iso::
|
||||||
|
|
||||||
mock -r fedora-rawhide-x86_64 --old-chroot --chroot -- livemedia-creator --no-virt \
|
mock -r rhel-8-x86_64 --old-chroot --chroot -- livemedia-creator --no-virt \
|
||||||
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \
|
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \
|
||||||
--make-iso --ks /root/fedora-minimal.ks
|
--make-iso --ks /root/rhel-minimal.ks
|
||||||
|
|
||||||
Results will be in ./results/try-1 and logs under /results/logs/try-1/
|
Results will be in ./results/try-1 and logs under /results/logs/try-1/
|
||||||
including anaconda logs and livemedia-creator logs. The new iso will be
|
including anaconda logs and livemedia-creator logs. The new iso will be
|
||||||
@ -448,19 +448,19 @@ group.
|
|||||||
``url points to the correct repo``
|
``url points to the correct repo``
|
||||||
|
|
||||||
7. Init the mock
|
7. Init the mock
|
||||||
``mock -r fedora-rawhide-x86_64 --old-chroot --init``
|
``mock -r rhel-8-x86_64 --old-chroot --init``
|
||||||
|
|
||||||
8. Copy the kickstart inside the mock
|
8. Copy the kickstart inside the mock
|
||||||
``mock -r fedora-rawhide-x86_64 --old-chroot --copyin ./fedora-minimal.ks /root/``
|
``mock -r rhel-8-x86_64 --old-chroot --copyin ./rhel-minimal.ks /root/``
|
||||||
|
|
||||||
9. Copy the Anaconda boot.iso inside the mock
|
9. Copy the Anaconda boot.iso inside the mock
|
||||||
``mock -r fedora-rawhide-x86_64 --old-chroot --copyin ./boot.iso /root/``
|
``mock -r rhel-8-x86_64 --old-chroot --copyin ./boot.iso /root/``
|
||||||
|
|
||||||
10. Make a minimal iso::
|
10. Make a minimal iso::
|
||||||
|
|
||||||
mock -r fedora-rawhide-x86_64 --old-chroot --chroot -- livemedia-creator \
|
mock -r rhel-8-x86_64 --old-chroot --chroot -- livemedia-creator \
|
||||||
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \
|
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \
|
||||||
--make-iso --ks /root/fedora-minimal.ks --iso /root/boot.iso
|
--make-iso --ks /root/rhel-minimal.ks --iso /root/boot.iso
|
||||||
|
|
||||||
Results will be in ./results/try-1 and logs under /results/logs/try-1/
|
Results will be in ./results/try-1 and logs under /results/logs/try-1/
|
||||||
including anaconda logs and livemedia-creator logs. The new iso will be
|
including anaconda logs and livemedia-creator logs. The new iso will be
|
||||||
@ -480,39 +480,39 @@ You need to have access to an OpenStack provider that allows image uploads, or
|
|||||||
setup your own using the instructions from the `RDO Project
|
setup your own using the instructions from the `RDO Project
|
||||||
<https://www.rdoproject.org/Quickstart>`_.
|
<https://www.rdoproject.org/Quickstart>`_.
|
||||||
|
|
||||||
The example kickstart, fedora-openstack.ks, is only slightly different than the
|
The example kickstart, rhel-openstack.ks, is only slightly different than the
|
||||||
fedora-minimal.ks one. It adds the cloud-init and cloud-utils-growpart
|
rhel-minimal.ks one. It adds the cloud-init and cloud-utils-growpart
|
||||||
packages. OpenStack supports setting up the image using cloud-init, and
|
packages. OpenStack supports setting up the image using cloud-init, and
|
||||||
cloud-utils-growpart will grow the image to fit the instance's disk size.
|
cloud-utils-growpart will grow the image to fit the instance's disk size.
|
||||||
|
|
||||||
Create a qcow2 image using the kickstart like this:
|
Create a qcow2 image using the kickstart like this:
|
||||||
|
|
||||||
``sudo livemedia-creator --make-disk --iso=/path/to/boot.iso --ks=/path/to/fedora-openstack.ks --image-type=qcow2``
|
``sudo livemedia-creator --make-disk --iso=/path/to/boot.iso --ks=/path/to/rhel-openstack.ks --image-type=qcow2``
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
On the RHEL7 version of lmc ``--image-type`` isn't supported. You can only create a bare partitioned disk image.
|
On the RHEL7 version of lmc ``--image-type`` isn't supported. You can only create a bare partitioned disk image.
|
||||||
|
|
||||||
Import the resulting disk image into the OpenStack system, either via the web UI, or glance on the cmdline::
|
Import the resulting disk image into the OpenStack system, either via the web UI, or glance on the cmdline::
|
||||||
|
|
||||||
glance image-create --name "fedora-openstack" --is-public true --disk-format qcow2 \
|
glance image-create --name "rhel-openstack" --is-public true --disk-format qcow2 \
|
||||||
--container-format bare --file ./fedora-openstack.qcow2
|
--container-format bare --file ./rhel-openstack.qcow2
|
||||||
|
|
||||||
If qcow2 wasn't used then ``--disk-format`` should be set to raw.
|
If qcow2 wasn't used then ``--disk-format`` should be set to raw.
|
||||||
|
|
||||||
|
|
||||||
Docker Image Creation
|
Container Image Creation
|
||||||
---------------------
|
------------------------
|
||||||
|
|
||||||
Use lmc to create a tarfile as described in the `TAR File Creation`_ section, but substitute the
|
Use lmc to create a tarfile as described in the `TAR File Creation`_ section, but substitute the
|
||||||
fedora-docker.ks example kickstart which removes the requirement for core files and the kernel.
|
rhel-container.ks example kickstart which removes the requirement for core files and the kernel.
|
||||||
|
|
||||||
You can then import the tarfile into docker like this (as root):
|
You can then import the tarfile into podman or docker like this:
|
||||||
|
|
||||||
``cat /var/tmp/fedora-root.tar.xz | docker import - fedora-root``
|
``podman import /var/tmp/root.tar.xz rhel-root``
|
||||||
|
|
||||||
And then run bash inside of it:
|
And then run bash inside of it:
|
||||||
|
|
||||||
``sudo docker run -i -t fedora-root /bin/bash``
|
``podman run -i -t rhel-root /bin/bash``
|
||||||
|
|
||||||
|
|
||||||
Open Container Initiative Image Creation
|
Open Container Initiative Image Creation
|
||||||
@ -523,7 +523,7 @@ The OCI is a new specification that is still being worked on. You can read more
|
|||||||
OCI images using the following command::
|
OCI images using the following command::
|
||||||
|
|
||||||
sudo livemedia-creator --make-oci --oci-config /path/to/config.json --oci-runtime /path/to/runtime.json \
|
sudo livemedia-creator --make-oci --oci-config /path/to/config.json --oci-runtime /path/to/runtime.json \
|
||||||
--iso=/path/to/boot.iso --ks=/path/to/fedora-minimal.ks
|
--iso=/path/to/boot.iso --ks=/path/to/rhel-minimal.ks
|
||||||
|
|
||||||
You must provide the config.json and runtime.json files to be included in the bundle,
|
You must provide the config.json and runtime.json files to be included in the bundle,
|
||||||
their specifications can be found `on the OCI github project <https://github.com/opencontainers/specs>`_
|
their specifications can be found `on the OCI github project <https://github.com/opencontainers/specs>`_
|
||||||
@ -539,7 +539,7 @@ Vagrant Image Creation
|
|||||||
`Vagrant <https://www.vagrantup.com/>`_ images can be created using the following command::
|
`Vagrant <https://www.vagrantup.com/>`_ images can be created using the following command::
|
||||||
|
|
||||||
sudo livemedia-creator --make-vagrant --vagrant-metadata /path/to/metadata.json \
|
sudo livemedia-creator --make-vagrant --vagrant-metadata /path/to/metadata.json \
|
||||||
--iso=/path/to/boot.iso --ks=/path/to/fedora-vagrant.ks
|
--iso=/path/to/boot.iso --ks=/path/to/rhel-vagrant.ks
|
||||||
|
|
||||||
The image created is a `vagrant-libvirt
|
The image created is a `vagrant-libvirt
|
||||||
<https://github.com/pradels/vagrant-libvirt>`_ provider image and needs to have
|
<https://github.com/pradels/vagrant-libvirt>`_ provider image and needs to have
|
||||||
@ -579,7 +579,7 @@ but it amounts to:
|
|||||||
Now you can run livemedia-creator with ``--virt-uefi`` to boot and install using UEFI::
|
Now you can run livemedia-creator with ``--virt-uefi`` to boot and install using UEFI::
|
||||||
|
|
||||||
sudo livemedia-creator --make-disk --virt-uefi --iso=/path/to/boot.iso \
|
sudo livemedia-creator --make-disk --virt-uefi --iso=/path/to/boot.iso \
|
||||||
--ks=/path/to/fedora-minimal.ks
|
--ks=/path/to/rhel-minimal.ks
|
||||||
|
|
||||||
Make sure that the kickstart you are using creates a /boot/efi partition by including this::
|
Make sure that the kickstart you are using creates a /boot/efi partition by including this::
|
||||||
|
|
||||||
@ -588,7 +588,7 @@ Make sure that the kickstart you are using creates a /boot/efi partition by incl
|
|||||||
.. note::
|
.. note::
|
||||||
When using the resulting image with the current version of OVMF (edk2.git-ovmf-x64-0-20151103.b1295.ge5cffca)
|
When using the resulting image with the current version of OVMF (edk2.git-ovmf-x64-0-20151103.b1295.ge5cffca)
|
||||||
it will not boot automatically because there is a problem with the fallback path.
|
it will not boot automatically because there is a problem with the fallback path.
|
||||||
You can boot it by entering the UEFI shell and running EFI/fedora/shim.efi and
|
You can boot it by entering the UEFI shell and running EFI/redhat/shim.efi and
|
||||||
then using efibootmgr to setup the correct boot entry.
|
then using efibootmgr to setup the correct boot entry.
|
||||||
|
|
||||||
|
|
||||||
@ -635,6 +635,6 @@ Development on this will take place as part of the lorax project, and on the
|
|||||||
anaconda-devel-list mailing list, and `on github <https://github.com/rhinstaller/lorax>`_
|
anaconda-devel-list mailing list, and `on github <https://github.com/rhinstaller/lorax>`_
|
||||||
|
|
||||||
Feedback, enhancements and bugs are welcome. You can use `bugzilla
|
Feedback, enhancements and bugs are welcome. You can use `bugzilla
|
||||||
<https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=lorax>`_ to
|
<https://bugzilla.redhat.com/enter_bug.cgi?product=Red Hat Enterprise Linux 8&component=lorax>`_ to
|
||||||
report bugs against the lorax component.
|
report bugs against the lorax component.
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ needs 3 things:
|
|||||||
the compose directory to the results directory.
|
the compose directory to the results directory.
|
||||||
|
|
||||||
The ``partitioned-disk.ks`` is pretty similar to the example minimal kickstart
|
The ``partitioned-disk.ks`` is pretty similar to the example minimal kickstart
|
||||||
in ``./docs/fedora-minimal.ks``. You should remove the ``url`` and ``repo``
|
in ``./docs/rhel-minimal.ks``. You should remove the ``url`` and ``repo``
|
||||||
commands, they will be added by the compose process. Make sure the bootloader
|
commands, they will be added by the compose process. Make sure the bootloader
|
||||||
packages are included in the ``%packages`` section at the end of the kickstart,
|
packages are included in the ``%packages`` section at the end of the kickstart,
|
||||||
and you will want to leave off the ``%end`` so that the compose can append the
|
and you will want to leave off the ``%end`` so that the compose can append the
|
||||||
|
@ -12,7 +12,9 @@ part / --fstype="ext4" --size=6000
|
|||||||
|
|
||||||
shutdown
|
shutdown
|
||||||
|
|
||||||
ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=https://dl.fedoraproject.org/pub/fedora/linux/atomic/24/ --ref=fedora-atomic/rawhide/x86_64/docker-host
|
# Replace OSTREE-REPO with the url to an ostree repo
|
||||||
|
# Replace OSTREE-REFERENCE with an ostree reference to pull
|
||||||
|
ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=OSTREE-REPO --ref=OSTREE-REFERENCE
|
||||||
|
|
||||||
services --disabled=cloud-init,cloud-init-local,cloud-final,cloud-config,docker-storage-setup
|
services --disabled=cloud-init,cloud-init-local,cloud-final,cloud-config,docker-storage-setup
|
||||||
|
|
||||||
@ -24,5 +26,7 @@ cat /dev/null > /etc/fstab
|
|||||||
|
|
||||||
%post --erroronfail
|
%post --erroronfail
|
||||||
rm -f /etc/ostree/remotes.d/fedora-atomic.conf
|
rm -f /etc/ostree/remotes.d/fedora-atomic.conf
|
||||||
ostree remote add --set=gpg-verify=false fedora-atomic 'https://dl.fedoraproject.org/pub/fedora/linux/atomic/24/'
|
|
||||||
|
# Replace OSTREE-REPO with the url to an ostree repo
|
||||||
|
ostree remote add --set=gpg-verify=false fedora-atomic 'OSTREE-REPO'
|
||||||
%end
|
%end
|
@ -1,12 +1,13 @@
|
|||||||
# Minimal Disk Image
|
# Minimal install for containers
|
||||||
|
|
||||||
# Use network installation
|
# Use network installation
|
||||||
url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/"
|
url --url="http://URL-TO-BASEOS/"
|
||||||
|
repo --name=appstream --baseurl="http://URL-TO-APPSTREAM/"
|
||||||
|
# Network information
|
||||||
|
network --bootproto=dhcp --device=link --activate
|
||||||
|
|
||||||
# Root password
|
# Root password
|
||||||
rootpw --plaintext replace-this-pw
|
rootpw --plaintext removethispw
|
||||||
# Network information
|
|
||||||
network --bootproto=dhcp --activate
|
|
||||||
# System authorization information
|
# System authorization information
|
||||||
auth --useshadow --passalgo=sha512
|
auth --useshadow --passalgo=sha512
|
||||||
# System keyboard
|
# System keyboard
|
||||||
@ -31,9 +32,14 @@ part / --fstype="ext4" --size=3000
|
|||||||
%post
|
%post
|
||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
rm /var/lib/systemd/random-seed
|
rm /var/lib/systemd/random-seed
|
||||||
|
|
||||||
|
# Clear /etc/machine-id
|
||||||
|
rm /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%packages --nocore --instLangs en
|
%packages --nocore --instLangs en
|
||||||
httpd
|
httpd
|
||||||
-kernel
|
-kernel
|
||||||
|
policycoreutils
|
||||||
%end
|
%end
|
@ -10,7 +10,8 @@ timezone US/Eastern
|
|||||||
lang en_US.UTF-8
|
lang en_US.UTF-8
|
||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
firewall --enabled --service=mdns
|
firewall --enabled --service=mdns
|
||||||
url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/"
|
url --url="http://URL-TO-BASEOS"
|
||||||
|
repo --name=appstream --baseurl="http://URL-TO-APPSTREAM"
|
||||||
# Network information
|
# Network information
|
||||||
network --bootproto=dhcp --device=link --activate
|
network --bootproto=dhcp --device=link --activate
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ auth --useshadow --passalgo=sha512
|
|||||||
selinux --enforcing
|
selinux --enforcing
|
||||||
|
|
||||||
# System services
|
# System services
|
||||||
services --disabled="network,sshd" --enabled="NetworkManager,ModemManager"
|
services --disabled="sshd" --enabled="NetworkManager"
|
||||||
|
|
||||||
# livemedia-creator modifications.
|
# livemedia-creator modifications.
|
||||||
shutdown
|
shutdown
|
||||||
@ -143,7 +144,7 @@ if [ -n "\$configdone" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add fedora user with no passwd
|
# add liveuser with no passwd
|
||||||
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
||||||
passwd -d liveuser > /dev/null
|
passwd -d liveuser > /dev/null
|
||||||
usermod -aG wheel liveuser > /dev/null
|
usermod -aG wheel liveuser > /dev/null
|
||||||
@ -266,7 +267,8 @@ EOF
|
|||||||
rm -f /var/lib/rpm/__db*
|
rm -f /var/lib/rpm/__db*
|
||||||
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
|
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
|
||||||
basearch=$(uname -i)
|
basearch=$(uname -i)
|
||||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
|
||||||
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
|
||||||
echo "Packages within this LiveCD"
|
echo "Packages within this LiveCD"
|
||||||
rpm -qa
|
rpm -qa
|
||||||
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
||||||
@ -290,23 +292,46 @@ rm /var/lib/systemd/random-seed
|
|||||||
# Remove the rescue kernel and image to save space
|
# Remove the rescue kernel and image to save space
|
||||||
# Installation will recreate these on the target
|
# Installation will recreate these on the target
|
||||||
rm -f /boot/*-rescue*
|
rm -f /boot/*-rescue*
|
||||||
|
|
||||||
|
# Remove machine-id on pre generated images
|
||||||
|
rm -f /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||||
|
|
||||||
|
# disable gnome-software automatically downloading updates
|
||||||
# disable updates plugin
|
|
||||||
cat >> /usr/share/glib-2.0/schemas/org.gnome.software.gschema.override << FOE
|
cat >> /usr/share/glib-2.0/schemas/org.gnome.software.gschema.override << FOE
|
||||||
[org.gnome.software]
|
[org.gnome.software]
|
||||||
download-updates=false
|
download-updates=false
|
||||||
FOE
|
FOE
|
||||||
|
|
||||||
|
# don't autostart gnome-software session service
|
||||||
|
rm -f /etc/xdg/autostart/gnome-software-service.desktop
|
||||||
|
|
||||||
|
# disable the gnome-software shell search provider
|
||||||
|
cat >> /usr/share/gnome-shell/search-providers/org.gnome.Software-search-provider.ini << FOE
|
||||||
|
DefaultDisabled=true
|
||||||
|
FOE
|
||||||
|
|
||||||
# don't run gnome-initial-setup
|
# don't run gnome-initial-setup
|
||||||
mkdir ~liveuser/.config
|
mkdir ~liveuser/.config
|
||||||
touch ~liveuser/.config/gnome-initial-setup-done
|
touch ~liveuser/.config/gnome-initial-setup-done
|
||||||
|
|
||||||
|
# suppress anaconda spokes redundant with gnome-initial-setup
|
||||||
|
cat >> /etc/sysconfig/anaconda << FOE
|
||||||
|
[NetworkSpoke]
|
||||||
|
visited=1
|
||||||
|
|
||||||
|
[PasswordSpoke]
|
||||||
|
visited=1
|
||||||
|
|
||||||
|
[UserSpoke]
|
||||||
|
visited=1
|
||||||
|
FOE
|
||||||
|
|
||||||
# make the installer show up
|
# make the installer show up
|
||||||
if [ -f /usr/share/applications/liveinst.desktop ]; then
|
if [ -f /usr/share/applications/liveinst.desktop ]; then
|
||||||
# Show harddisk install in shell dash
|
# Show harddisk install in shell dash
|
||||||
@ -356,24 +381,20 @@ EOF
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%packages
|
%packages
|
||||||
@anaconda-tools
|
|
||||||
@base-x
|
@base-x
|
||||||
@core
|
|
||||||
@firefox
|
|
||||||
@fonts
|
@fonts
|
||||||
@guest-desktop-agents
|
@guest-desktop-agents
|
||||||
@hardware-support
|
@hardware-support
|
||||||
@libreoffice
|
|
||||||
@multimedia
|
@multimedia
|
||||||
@networkmanager-submodules
|
@networkmanager-submodules
|
||||||
@printing
|
|
||||||
@workstation-product
|
@workstation-product
|
||||||
|
@gnome-desktop
|
||||||
|
firefox
|
||||||
gnome-terminal
|
gnome-terminal
|
||||||
aajohan-comfortaa-fonts
|
aajohan-comfortaa-fonts
|
||||||
anaconda
|
anaconda
|
||||||
dracut-config-generic
|
dracut-config-generic
|
||||||
dracut-live
|
dracut-live
|
||||||
fedora-productimg-workstation
|
|
||||||
glibc-all-langpacks
|
glibc-all-langpacks
|
||||||
grub2-efi
|
grub2-efi
|
||||||
kernel
|
kernel
|
||||||
@ -384,8 +405,6 @@ memtest86+
|
|||||||
syslinux
|
syslinux
|
||||||
-@dial-up
|
-@dial-up
|
||||||
-@input-methods
|
-@input-methods
|
||||||
-@standard
|
|
||||||
-gfs2-utils
|
-gfs2-utils
|
||||||
-reiserfs-utils
|
|
||||||
|
|
||||||
%end
|
%end
|
@ -1,10 +1,10 @@
|
|||||||
# Minimal Disk Image
|
# Minimal Disk Image
|
||||||
#
|
#
|
||||||
sshpw --username=root --plaintext randOmStrinGhERE
|
|
||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
firewall --enabled
|
firewall --enabled
|
||||||
# Use network installation
|
# Use network installation
|
||||||
url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/"
|
url --url="http://URL-TO-BASEOS/"
|
||||||
|
repo --name=appstream --baseurl="http://URL-TO-APPSTREAM/"
|
||||||
# Network information
|
# Network information
|
||||||
network --bootproto=dhcp --device=link --activate
|
network --bootproto=dhcp --device=link --activate
|
||||||
|
|
||||||
@ -29,8 +29,8 @@ bootloader --location=mbr
|
|||||||
# Partition clearing information
|
# Partition clearing information
|
||||||
clearpart --all --initlabel
|
clearpart --all --initlabel
|
||||||
# Disk partitioning information
|
# Disk partitioning information
|
||||||
part / --fstype="ext4" --size=4000
|
part / --fstype="ext4" --size=1500
|
||||||
part swap --size=1000
|
part swap --size=512
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove root password
|
# Remove root password
|
||||||
@ -38,6 +38,10 @@ passwd -d root > /dev/null
|
|||||||
|
|
||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
rm /var/lib/systemd/random-seed
|
rm /var/lib/systemd/random-seed
|
||||||
|
|
||||||
|
# Clear /etc/machine-id
|
||||||
|
rm /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%packages
|
%packages
|
@ -1,10 +1,10 @@
|
|||||||
# Minimal Disk Image -- Example of image-minimizer usage in %post
|
# Minimal Disk Image -- Example of image-minimizer usage in %post
|
||||||
#
|
#
|
||||||
sshpw --username=root --plaintext randOmStrinGhERE
|
|
||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
firewall --enabled
|
firewall --enabled
|
||||||
# Use network installation
|
# Use network installation
|
||||||
url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/"
|
url --url="http://URL-TO-BASEOS/"
|
||||||
|
repo --name=appstream --baseurl="http://URL-TO-APPSTREAM/"
|
||||||
# Network information
|
# Network information
|
||||||
network --bootproto=dhcp --device=link --activate
|
network --bootproto=dhcp --device=link --activate
|
||||||
|
|
||||||
@ -38,6 +38,10 @@ passwd -d root > /dev/null
|
|||||||
|
|
||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
rm /var/lib/systemd/random-seed
|
rm /var/lib/systemd/random-seed
|
||||||
|
|
||||||
|
# Clear /etc/machine-id
|
||||||
|
rm /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%packages
|
%packages
|
@ -3,12 +3,13 @@
|
|||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
firewall --enabled
|
firewall --enabled
|
||||||
# Use network installation
|
# Use network installation
|
||||||
url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/"
|
url --url="http://URL-TO-BASEOS/"
|
||||||
|
repo --name=appstream --baseurl="http://URL-TO-APPSTREAM/"
|
||||||
|
# Network information
|
||||||
|
network --bootproto=dhcp --device=link --activate
|
||||||
|
|
||||||
# Root password
|
# Root password
|
||||||
rootpw --plaintext replace-this-pw
|
rootpw --plaintext replace-this-pw
|
||||||
# Network information
|
|
||||||
network --bootproto=dhcp --activate
|
|
||||||
# System authorization information
|
# System authorization information
|
||||||
auth --useshadow --passalgo=sha512
|
auth --useshadow --passalgo=sha512
|
||||||
# System keyboard
|
# System keyboard
|
||||||
@ -35,6 +36,10 @@ part / --fstype="ext4" --size=3000
|
|||||||
%post
|
%post
|
||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
rm /var/lib/systemd/random-seed
|
rm /var/lib/systemd/random-seed
|
||||||
|
|
||||||
|
# Clear /etc/machine-id
|
||||||
|
rm /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%packages
|
%packages
|
@ -4,9 +4,10 @@
|
|||||||
# Firewall configuration
|
# Firewall configuration
|
||||||
firewall --enabled
|
firewall --enabled
|
||||||
# Use network installation
|
# Use network installation
|
||||||
url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/"
|
url --url="http://URL-TO-BASEOS/"
|
||||||
|
repo --name=appstream --baseurl="http://URL-TO-APPSTREAM/"
|
||||||
# Network information
|
# Network information
|
||||||
network --bootproto=dhcp --activate
|
network --bootproto=dhcp --device=link --activate
|
||||||
|
|
||||||
# Root account is locked, access via sudo from vagrant user
|
# Root account is locked, access via sudo from vagrant user
|
||||||
rootpw --lock
|
rootpw --lock
|
||||||
@ -41,6 +42,10 @@ part swap --size=1000
|
|||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
rm /var/lib/systemd/random-seed
|
rm /var/lib/systemd/random-seed
|
||||||
|
|
||||||
|
# Clear /etc/machine-id
|
||||||
|
rm /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
|
|
||||||
# Setup sudoers for Vagrant
|
# Setup sudoers for Vagrant
|
||||||
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||||
sed -i 's/Defaults\s*requiretty/Defaults !requiretty/' /etc/sudoers
|
sed -i 's/Defaults\s*requiretty/Defaults !requiretty/' /etc/sudoers
|
Loading…
Reference in New Issue
Block a user