Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
976a5562d8 |
66
README.md
66
README.md
@ -6,15 +6,6 @@ Kiwi descriptions for Rocky Linux 9.
|
||||
changed to deal with live images (as kiwi doesn't seem to support using the
|
||||
--kiwi-file option for iso).
|
||||
|
||||
### What can I build?
|
||||
|
||||
At the time of this writing, you can create cloud images, live images, and
|
||||
containers. You can run any of the scripts to do so:
|
||||
|
||||
* cloud-build.sh
|
||||
* container-build.sh
|
||||
* live-build.sh
|
||||
|
||||
### Can't you use the same config.xml? Why are you symlinking?
|
||||
|
||||
Yes and the reason why we're symlinking is that "name" and "displayname" are
|
||||
@ -33,61 +24,16 @@ Please fork and make a PR! We're still learning how this tool works ourselves.
|
||||
|
||||
### How to try it out
|
||||
|
||||
You can run this on a running system, in a mock root, or a podman container. In
|
||||
fact, most builds may fail in mock due to loop devices being unusable.
|
||||
You can actually do this in mock pretty easily. You could also probably get
|
||||
this running in a podman container or otherwise. As of this writing, we
|
||||
haven't tried it yet. Theory says it should work.
|
||||
|
||||
**Note**: SELinux must be set to permissive.
|
||||
|
||||
**Note**: There may be cases where a build will fail in mock. If this is the
|
||||
case, you may need to use `--isolation=simple` or forego the use of mock.
|
||||
case, you will need to use `--isolation=simple`.
|
||||
|
||||
**Note**: If you receive an error about loop devices while running in mock, run
|
||||
this on the host instead.
|
||||
|
||||
#### Live Image Example on Rocky Linux 9 without using mock
|
||||
|
||||
```
|
||||
# Use SIG/Core
|
||||
% dnf install rocky-release-core
|
||||
% dnf install kiwi-cli git \
|
||||
dracut-kiwi-live \
|
||||
kiwi-systemdeps-{bootloaders,containers,core,disk-images,filesystems,image-validation,iso-media}
|
||||
|
||||
% sudo setenforce 0
|
||||
% git clone https://git.resf.org/sig_core/rocky-kiwi-descriptions -b r9
|
||||
% cd rocky-kiwi-descriptions
|
||||
% ln -sf configs/live-xfce.xml config.xml
|
||||
% kiwi-ng --debug --type="iso" \
|
||||
--profile="XFCE-Live" \
|
||||
--color-output system \
|
||||
build \
|
||||
--description="./" \
|
||||
--target-dir /builddir/lmc
|
||||
```
|
||||
|
||||
If you wish to use EPEL instead...
|
||||
|
||||
```
|
||||
% dnf install epel-release -y
|
||||
% crb enable
|
||||
% dnf install kiwi-cli git \
|
||||
dracut-kiwi-live \
|
||||
kiwi-systemdeps-{bootloaders,containers,core,disk-images,filesystems,image-validation,iso-media} \
|
||||
distribution-gpg-keys
|
||||
|
||||
% sudo setenforce 0
|
||||
% git clone https://git.resf.org/sig_core/rocky-kiwi-descriptions -b r9
|
||||
% cd rocky-kiwi-descriptions
|
||||
% ln -sf configs/live-xfce.xml config.xml
|
||||
% kiwi-ng --debug --type="iso" \
|
||||
--profile="XFCE-Live" \
|
||||
--color-output system \
|
||||
build \
|
||||
--description="./" \
|
||||
--target-dir /builddir/lmc
|
||||
```
|
||||
|
||||
#### Live Image Example (EPEL) using mock
|
||||
#### Live Image Example (EPEL)
|
||||
|
||||
The below makes an XFCE live image using SIG/Core packages.
|
||||
|
||||
@ -145,5 +91,3 @@ mock environment.
|
||||
```
|
||||
% bash live-build.sh --live-image XFCE --output-dir /builddir/xfce
|
||||
```
|
||||
|
||||
|
||||
|
@ -31,30 +31,30 @@
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="Cloud-GenericCloud-LVM" arch="x86_64,aarch64">
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
<systemdisk name="rocky" preferlvm="true">
|
||||
<volume name="@root=lvroot" size="9000M" mountpoint="/" />
|
||||
<volume name="@root" size="9G" mountpoint="/" />
|
||||
</systemdisk>
|
||||
</type>
|
||||
</preferences>
|
||||
@ -63,30 +63,30 @@
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" firmware="ofw"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="Cloud-GenericCloud-LVM" arch="ppc64le">
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" firmware="ofw"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
<systemdisk name="rocky" preferlvm="true">
|
||||
<volume name="@root=lvroot" size="9000M" mountpoint="/" />
|
||||
<volume name="@root" size="9G" mountpoint="/" />
|
||||
</systemdisk>
|
||||
</type>
|
||||
</preferences>
|
||||
@ -95,30 +95,30 @@
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="zipl" targettype="CDL" timeout="1"/>
|
||||
<size unit="G">10</size>
|
||||
<size unit="M">10738</size>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="Cloud-GenericCloud-LVM" arch="s390x">
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="zipl" targettype="CDL" timeout="1"/>
|
||||
<size unit="G">10</size>
|
||||
<size unit="M">10738</size>
|
||||
<systemdisk name="rocky" preferlvm="true">
|
||||
<volume name="@root=lvroot" size="9000M" mountpoint="/" />
|
||||
<volume name="@root" size="9G" mountpoint="/" />
|
||||
</systemdisk>
|
||||
</type>
|
||||
</preferences>
|
||||
@ -128,30 +128,30 @@
|
||||
<type image="oem" format="vhd-fixed" formatoptions="force_size"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" console="serial" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" console="serial" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="Cloud-Azure-LVM" arch="x86_64,aarch64">
|
||||
<type image="oem" format="vhd-fixed" formatoptions="force_size"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
|
||||
kernelcmdline="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
<systemdisk name="rocky" preferlvm="true">
|
||||
<volume name="@root=lvroot" size="9000M" mountpoint="/" />
|
||||
<volume name="@root" size="9G" mountpoint="/" />
|
||||
</systemdisk>
|
||||
</type>
|
||||
</preferences>
|
||||
@ -161,30 +161,30 @@
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="Cloud-EC2-LVM" arch="x86_64,aarch64">
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10"
|
||||
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
<systemdisk name="rocky" preferlvm="true">
|
||||
<volume name="@root=lvroot" size="9000M" mountpoint="/" />
|
||||
<volume name="@root" size="9G" mountpoint="/" />
|
||||
</systemdisk>
|
||||
</type>
|
||||
</preferences>
|
||||
@ -194,14 +194,14 @@
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
kernelcmdline="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10"
|
||||
kernelcmdline="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=auto net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10"
|
||||
devicepersistency="by-uuid"
|
||||
rootfs_label="rocky">
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
<bootloader name="grub2" timeout="1" bls="true"/>
|
||||
<size unit="G">10</size>
|
||||
<bootloader name="grub2" timeout="1"/>
|
||||
<size unit="M">10738</size>
|
||||
</type>
|
||||
</preferences>
|
||||
<!-- End OCP -->
|
||||
@ -246,11 +246,12 @@
|
||||
<package name="WALinuxAgent"/>
|
||||
<package name="hyperv-daemons"/>
|
||||
</packages>
|
||||
<packages type="image" patternType="plusRecommended" profiles="Cloud-GenericCloud-LVM,Cloud-Azure-LVM,Cloud-OCP-Base,Cloud-EC2-LVM">
|
||||
<package name="lvm2"/>
|
||||
</packages>
|
||||
<!-- There isn't a way to exclude packages from a certain repo -->
|
||||
<packages type="image" patternType="plusRecommended" profiles="Cloud-OCP-Base">
|
||||
<package name="iscsi-initiator-utils"/>
|
||||
</packages>
|
||||
<!--<packages type="image" patternType="plusRecommended" profiles="Cloud-OCP-Base">
|
||||
<package name="oci-utils"/>
|
||||
<package name="python3-circuitbreaker"/>
|
||||
<package name="python3-daemon"/>
|
||||
<package name="python3-sdnotify"/>
|
||||
<package name="python39-oci-sdk"/>
|
||||
</packages>-->
|
||||
</image>
|
||||
|
@ -2,9 +2,6 @@
|
||||
<users profiles="Cloud-Azure-Base,Cloud-Azure-LVM,Cloud-EC2-Base,Cloud-EC2-LVM,Cloud-GenericCloud-Base,Cloud-GenericCloud-LVM,Cloud-OCP-Base,Live-Base">
|
||||
<user name="root" groups="root" password="linux" home="/root" pwdformat="plain" />
|
||||
</users>
|
||||
<!-- <users profiles="Cloud-Azure-Base,Cloud-Azure-LVM,Cloud-EC2-Base,Cloud-EC2-LVM,Cloud-GenericCloud-Base,Cloud-GenericCloud-LVM,Cloud-OCP-Base">
|
||||
<user name="rocky" groups="rocky,wheel" password="thereisnopassword" home="/home/rocky" pwdformat="encrypted" />
|
||||
</users> -->
|
||||
<!-- Only for SBC -->
|
||||
<users profiles="Core-Pi">
|
||||
<user password="$6$ggstAnji$tPNhSHa/OG4UrJ0P77ZHlCunu.pueMXtXgAER51mTJ7bpXl/onDplJXd0usMSlFP4gOn/A7BM7cGoVw/WcCKS." home="/home/rocky" name="rocky" groups="rocky,wheel"/>
|
||||
|
200
config.sh
200
config.sh
@ -145,6 +145,8 @@ EOF
|
||||
|
||||
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
|
||||
|
||||
systemctl mask tmp.mount
|
||||
|
||||
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
|
||||
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
|
||||
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg
|
||||
@ -440,56 +442,160 @@ EOF
|
||||
# OCI - Virtio drivers
|
||||
echo 'add_drivers+=" virtio virtio_blk virtio_net virtio_pci virtio_ring virtio_scsi virtio_console "' > /etc/dracut.conf.d/virtio.conf
|
||||
|
||||
# OCI - YOLO
|
||||
# OCI - Dracut for iscsi bypass
|
||||
mkdir -p /usr/lib/dracut/modules.d/95oci
|
||||
OCIDRACUT="H4sIAGtFHmMAA+2WWW/bOBCA/Vr+illZzQXoluPUhgMURYrmpS02fevuGpJIWYQVUiWpJoHr/15S
|
||||
crLZZBs3QA8U5QfYosQ5NUNSrRRBTfMAi6xoVXDOcVsT6ePg2YgXNBh8C0LNeDTqrpq7124cpfF4
|
||||
nIzT8fhwEEaj+HA8gNE38b6FVqpMAAwE5+ohuW3zvyjtw/UnLMtr4lFZSOrlV00mpS+rR/rYUv84
|
||||
StJBlIx10ZNREscD/SRNkwGE3yXjO/zm9R/+EeSUBbJCQ/AOPNANQCYgK1LXniwEbdQUKMOEKU9l
|
||||
ufT6eUbrqRby8kzSwuNlKYmaQDo1JrQhcjkBJWdHIC9mKUg9TIEoKGlN1FVDZtobGr7NVFFB11nm
|
||||
3YLikNU1v4A8ozXwVgEtQVUEullM5RKKjGkZQTJ8BTmBkrcMo6Eg5QTeiCxvFxMYJmESxWGYImRc
|
||||
wYLo8i7gOMDkY8Dauob4eCeCT5/Ah1uN7+mhbmx0+vrs5M93s10kZo67Mp6Hec2L5WTtIB1Oby3n
|
||||
vIYQBPa76P1+XcDODrwHj4DjCgf+nprYGSDQlFwA69KgDNy93ooERpR5uD8FzDs5w3utv+qEnz6d
|
||||
HKwdmIHTudE2TdgFZ4qyltwodGk2mZBk3snNO0dfTlh7vc722sQ9bcftInCMmiCqFQyiG+lN2HPC
|
||||
ipm7J5WYC9LUWUH+VXMC/fsrLp39TgtzRuAe3RQpKr5JcAJnS9o0lC3AveXD930HjnfiR4lDl/7y
|
||||
XC5uqUkjT7CZdgJ13gSdHbP+FcHebSNOr3VJFYSopGgXfWX1S21ZmgV109c3rYCuwzgxe6oJ+/Ts
|
||||
xdkpbPR5oyhn15l+leR/kuw13L6BdeFAEgwehd3gn7fP372a+QdusBK9ilSYmniq9RTc1eU0MBKB
|
||||
HnwI11P9n6x3/ycP3QsXme4E56VeoNr4g9GZt/az9zbLdrac//29p7f3tnn8wb9h2/dfchjdOf/D
|
||||
OIns+f8j2Jz/+iD/4V8ARUWK5d4+rNCTzRkTojVCmDSEYXl/gjJdqrruJ8zNvOJ8CY0gXqt3NTg6
|
||||
0vufjg5T8YXvVkeb+dkv3GKxWCwWi8VisVgsFovFYrFYLBaLxWL5jnwGdMMrBgAoAAA="
|
||||
|
||||
base64 -d <<<"$OCIDRACUT" | tar -xz
|
||||
cat << OCIMODULESETUP > /usr/lib/dracut/modules.d/95oci/module-setup.sh
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
OCICLOUDCFG="IyBPQ0kgY2xvdWQtaW5pdCBjb25maWd1cmF0aW9uCmRhdGFzb3VyY2VfbGlzdDogWydPcmFjbGUn
|
||||
LCAnT3BlblN0YWNrJ10KZGF0YXNvdXJjZToKICBPcGVuU3RhY2s6CiAgICBtZXRhZGF0YV91cmxz
|
||||
OiBbJ2h0dHA6Ly8xNjkuMjU0LjE2OS4yNTQnXQogICAgdGltZW91dDogMTAKICAgIG1heF93YWl0
|
||||
OiAyMAoKIyBzd2FwIGZpbGUKc3dhcDoKICAgZmlsZW5hbWU6IC8uc3dhcGZpbGUKICAgc2l6ZTog
|
||||
ImF1dG8iCgpjbG91ZF9pbml0X21vZHVsZXM6CiMgT0NJOiBkaXNrX3NldHVwIGlzIGRpc2FibGVk
|
||||
CiMtIGRpc2tfc2V0dXAKIC0gbWlncmF0b3IKIC0gYm9vdGNtZAogLSB3cml0ZS1maWxlcwojIE9D
|
||||
STogVGhlIGdyb3dwYXJ0IG1vZHVsZSBpcyBkaXNhYmxlZCBieSBkZWZhdWx0LiBUbyBlbmFibGUg
|
||||
YXV0b21hdGljIGJvb3Qgdm9sdW1lIHJlc2l6aW5nLCB1bmNvbW1lbnQKIyB0aGUgYmVsb3cgZW50
|
||||
cnkgZm9yICctIGdyb3dwYXJ0JyBhbmQgcmVib290LiBBbGwgdGhlIGRlcGVuZGVudCBwYWNrYWdl
|
||||
cyBmb3IgdGhlIGdyb3dwYXJ0CiMgbW9kdWxlIHRvIHdvcmsgc3VjaCBhcyBjbG91ZC11dGlscy1n
|
||||
cm93cGFydCBhbmQgZ2Rpc2sgYXJlIGFscmVhZHkgaW5jbHVkZWQgaW4gdGhlIGltYWdlLgojLSBn
|
||||
cm93cGFydAogLSByZXNpemVmcwojIE9DSTogc2V0X2hvc3RuYW1lLCB1cGRhdGVfaG9zdG5hbWUs
|
||||
IHVwZGF0ZV9ldGNfaG9zdHMgYXJlIGRpc2FibGVkCiMtIHNldF9ob3N0bmFtZQojLSB1cGRhdGVf
|
||||
aG9zdG5hbWUKIy0gdXBkYXRlX2V0Y19ob3N0cwogLSByc3lzbG9nCiAtIHVzZXJzLWdyb3Vwcwog
|
||||
LSBzc2gKCmNsb3VkX2NvbmZpZ19tb2R1bGVzOgogLSBtb3VudHMKIC0gbG9jYWxlCiAtIHNldC1w
|
||||
YXNzd29yZHMKIyBPQ0k6IHJoX3N1YnNjcmlwdGlvbiBpcyBkaXNhYmxlZAojLSByaF9zdWJzY3Jp
|
||||
cHRpb24KIC0geXVtLWFkZC1yZXBvCiAtIHBhY2thZ2UtdXBkYXRlLXVwZ3JhZGUtaW5zdGFsbAog
|
||||
LSB0aW1lem9uZQogLSBudHAKIC0gcHVwcGV0CiAtIGNoZWYKIC0gc2FsdC1taW5pb24KIC0gbWNv
|
||||
bGxlY3RpdmUKIC0gZGlzYWJsZS1lYzItbWV0YWRhdGEKIC0gcnVuY21kCgpjbG91ZF9maW5hbF9t
|
||||
b2R1bGVzOgogLSByaWdodHNjYWxlX3VzZXJkYXRhCiAtIHNjcmlwdHMtcGVyLW9uY2UKIC0gc2Ny
|
||||
aXB0cy1wZXItYm9vdAogLSBzY3JpcHRzLXBlci1pbnN0YW5jZQogLSBzY3JpcHRzLXVzZXIKIC0g
|
||||
c3NoLWF1dGhrZXktZmluZ2VycHJpbnRzCiAtIGtleXMtdG8tY29uc29sZQogLSBwaG9uZS1ob21l
|
||||
CiAtIGZpbmFsLW1lc3NhZ2UKIyBPQ0k6IHBvd2VyLXN0YXRlLWNoYW5nZSBpcyBkaXNhYmxlZAoj
|
||||
LSBwb3dlci1zdGF0ZS1jaGFuZ2UKCg=="
|
||||
check() {
|
||||
return 0
|
||||
}
|
||||
|
||||
base64 -d <<<"$OCICLOUDCFG" >> /etc/cloud/cloud.cfg.d/99_oci.cfg
|
||||
depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
install() {
|
||||
inst_hook pre-udev 88 "$moddir/enable-iscsi-bypass.sh"
|
||||
}
|
||||
OCIMODULESETUP
|
||||
|
||||
cat << OCIISCSIBYPASS > /usr/lib/dracut/modules.d/95oci/enable-iscsi-bypass.sh
|
||||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
#Patch iscsiroot to allow bail out if the root disk can already be found
|
||||
#ref: Orabug: #30312004
|
||||
|
||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
INSERT='
|
||||
r="${root#block:}"
|
||||
if getargbool 0 rd.iscsi.bypass && [ -e "$r" ]; then
|
||||
for nroot in $(getargs netroot); do
|
||||
[ "${nroot%%:*}" = "iscsi" ] || continue
|
||||
type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||
parse_iscsi_root "$nroot" || return 1
|
||||
netroot_enc=$(str_replace "$nroot" "/" "\2f")
|
||||
done
|
||||
echo "iscsi: Skipping $netroot_enc..." >&2
|
||||
echo "iscsi: Skipping $netroot_enc..." > /dev/kmsg
|
||||
echo "skipped" > "/tmp/iscsistarted-$netroot_enc"
|
||||
exit 0
|
||||
fi
|
||||
'
|
||||
|
||||
if getargbool 0 rd.iscsi.bypass && [ -f "/sbin/iscsiroot" ]; then
|
||||
echo "Enabling ISCSI bypass option" >&2
|
||||
echo "Enabling ISCSI bypass option" > /dev/kmsg
|
||||
echo "$INSERT" | sed -i '/^PATH=.*$/{r /dev/stdin
|
||||
h}; ${x;/PATH/{x;q0};x;q3}\ "/sbin/iscsiroot" || warn "Failed Enabling ISCSI bypass option"
|
||||
fi
|
||||
OCIISCSIBYPASS
|
||||
|
||||
cat << OCICLOUDCONFIG > /etc/cloud/cloud.cfg.d/99_oci.cfg
|
||||
# OCI cloud-init configuration
|
||||
datasource_list: ['Oracle', 'OpenStack']
|
||||
datasource:
|
||||
OpenStack:
|
||||
metadata_urls: ['http://169.254.169.254']
|
||||
timeout: 10
|
||||
max_wait: 20
|
||||
|
||||
# swap file
|
||||
swap:
|
||||
filename: /.swapfile
|
||||
size: "auto"
|
||||
|
||||
cloud_init_modules:
|
||||
# OCI: disk_setup is disabled
|
||||
#- disk_setup
|
||||
- migrator
|
||||
- bootcmd
|
||||
- write-files
|
||||
# OCI: The growpart module is disabled by default. To enable automatic boot volume resizing, uncomment
|
||||
# the below entry for '- growpart' and reboot. All the dependent packages for the growpart
|
||||
# module to work such as cloud-utils-growpart and gdisk are already included in the image.
|
||||
#- growpart
|
||||
- resizefs
|
||||
# OCI: set_hostname, update_hostname, update_etc_hosts are disabled
|
||||
#- set_hostname
|
||||
#- update_hostname
|
||||
#- update_etc_hosts
|
||||
- rsyslog
|
||||
- users-groups
|
||||
- ssh
|
||||
|
||||
cloud_config_modules:
|
||||
- mounts
|
||||
- locale
|
||||
- set-passwords
|
||||
# OCI: rh_subscription is disabled
|
||||
#- rh_subscription
|
||||
- yum-add-repo
|
||||
- package-update-upgrade-install
|
||||
- timezone
|
||||
- ntp
|
||||
- puppet
|
||||
- chef
|
||||
- salt-minion
|
||||
- mcollective
|
||||
- disable-ec2-metadata
|
||||
- runcmd
|
||||
|
||||
cloud_final_modules:
|
||||
- rightscale_userdata
|
||||
- scripts-per-once
|
||||
- scripts-per-boot
|
||||
- scripts-per-instance
|
||||
- scripts-user
|
||||
- ssh-authkey-fingerprints
|
||||
- keys-to-console
|
||||
- phone-home
|
||||
- final-message
|
||||
# OCI: power-state-change is disabled
|
||||
#- power-state-change
|
||||
OCICLOUDCONFIG
|
||||
|
||||
|
||||
# Remove system.devices because Oracle does things.
|
||||
rm -fv /etc/lvm/devices/system.devices
|
||||
|
||||
|
||||
# Copyright (C) 2020 Oracle Corp., Inc. All rights reserved.
|
||||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
|
||||
#
|
||||
# /usr/lib/oci-linux-config/cloud/scripts/initramfs-mod/net.sh
|
||||
#
|
||||
|
||||
echo "$(date) - OCI initramfs network modification script started."
|
||||
# Symlink network config files where cloud-init >= 19.4 expects them
|
||||
DRACUT_CFG=/run/initramfs/state/etc/sysconfig/network-scripts
|
||||
CI_DIR=/run
|
||||
if [ -d $DRACUT_CFG ]; then
|
||||
FILE_COUNT=`ls $DRACUT_CFG | wc -l`
|
||||
if [ $FILE_COUNT -eq 0 ]; then
|
||||
# Create dummy file if dracut did not create network device config
|
||||
dummycfg=$CI_DIR/net-dummy.conf
|
||||
echo "DEVICE=\"dummy\"" > $dummycfg
|
||||
echo "BOOTPROTO=dhcp" >> $dummycfg
|
||||
echo "$(date) - Creating dummy config $dummycfg."
|
||||
else
|
||||
for dcfg in $DRACUT_CFG/*; do
|
||||
filename=${dcfg##*/}
|
||||
devname=${filename##ifcfg-}
|
||||
cicfg=$CI_DIR/net-$devname.conf
|
||||
if [ ! -e $cicfg ]; then
|
||||
echo "$(date) - Creating symlink from $dcfg to $cicfg."
|
||||
ln -s $dcfg $cicfg
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
echo "$(date) - OCI initramfs network modification script done."
|
||||
}
|
||||
|
||||
function cloud_cleanup_steps() {
|
||||
@ -513,12 +619,6 @@ function cloud_cleanup_steps() {
|
||||
cloud-init clean
|
||||
waagent -force -deprovision+user
|
||||
fi
|
||||
|
||||
# Attempt to fix file permissions
|
||||
for x in $(rpm -qa); do rpm --setperms "${x}" ; done
|
||||
|
||||
# Attempt to fix labeling
|
||||
/usr/sbin/fixfiles -R -a restore
|
||||
}
|
||||
|
||||
function azure_cleanup_steps() {
|
||||
@ -543,7 +643,7 @@ function common_container_steps() {
|
||||
}
|
||||
|
||||
function minimal_container_steps() {
|
||||
microdnf -y remove langpacks-en || true
|
||||
microdnf -y remove langpacks-en
|
||||
rm -fv /usr/share/gnupg/help*.txt
|
||||
rm /usr/lib/rpm/rpm.daily
|
||||
rm -rfv /usr/lib64/nss/unsupported-tools/
|
||||
@ -813,6 +913,8 @@ fi
|
||||
# OCP specific settings
|
||||
if [[ "$kiwi_profiles" == *"OCP"* ]]; then
|
||||
ocp_cloud_steps
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
# cloud clean up
|
||||
|
@ -135,7 +135,6 @@
|
||||
<package name="glibc-minimal-langpack"/>
|
||||
<package name="rocky-release"/>
|
||||
<package name="util-linux"/>
|
||||
<ignore name="*-firmware"/>
|
||||
<ignore name="dosfstools"/>
|
||||
<ignore name="e2fsprogs"/>
|
||||
<ignore name="firewalld"/>
|
||||
@ -145,6 +144,7 @@
|
||||
<ignore name="grub*"/>
|
||||
<ignore name="iptables"/>
|
||||
<ignore name="kernel"/>
|
||||
<ignore name="*-firmware"/>
|
||||
<ignore name="libss"/>
|
||||
<ignore name="os-prober"/>
|
||||
<ignore name="pinentry"/>
|
||||
@ -171,16 +171,12 @@
|
||||
<package name="tar"/>
|
||||
<package name="usermode"/>
|
||||
<package name="vim-minimal"/>
|
||||
<package name="yum"/>
|
||||
<ignore name="brotli"/>
|
||||
<ignore name="kexec-tools"/>
|
||||
</packages>
|
||||
<!-- End Base -->
|
||||
<!-- Minimal -->
|
||||
<packages type="bootstrap" profiles="Container-Minimal">
|
||||
<package name="langpacks-core-en"/>
|
||||
<package name="langpacks-core-font-en"/>
|
||||
<package name="langpacks-en"/>
|
||||
<package name="microdnf"/>
|
||||
<ignore name="brotli"/>
|
||||
<ignore name="hostname"/>
|
||||
@ -198,23 +194,15 @@
|
||||
<package name="crypto-policies-scripts"/>
|
||||
<package name="curl-minimal"/>
|
||||
<package name="dnf"/>
|
||||
<package name="findutils"/>
|
||||
<package name="gawk-all-langpacks"/>
|
||||
<package name="gdb-gdbserver"/>
|
||||
<package name="glibc-gconv-extra"/>
|
||||
<package name="glibc-langpack-en"/>
|
||||
<package name="gzip"/>
|
||||
<package name="langpacks-en"/>
|
||||
<package name="libcurl-minimal"/>
|
||||
<package name="libxcrypt-compat"/>
|
||||
<package name="python-unversioned-command"/>
|
||||
<package name="rootfiles"/>
|
||||
<package name="rpm-plugin-systemd-inhibit"/>
|
||||
<package name="systemd"/>
|
||||
<package name="tar"/>
|
||||
<package name="vim-minimal"/>
|
||||
<package name="which"/>
|
||||
<package name="yum"/>
|
||||
<ignore name="kexec-tools"/>
|
||||
</packages>
|
||||
<!-- End UBI -->
|
||||
|
@ -1,12 +0,0 @@
|
||||
<image>
|
||||
<profiles>
|
||||
<profile name="XFCE-Live" description="Rocky Linux XFCE">
|
||||
<requires profile="Live-Base"/>
|
||||
<requires profile="XFCE-Desktop"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
<packages type="bootstrap" patternType="plusRecommended" profiles="XFCE-Live">
|
||||
<package name="rocky-release"/>
|
||||
<package name="epel-release"/>
|
||||
</packages>
|
||||
</image>
|
Loading…
Reference in New Issue
Block a user