Compare commits

..

32 Commits
oracle ... r9

Author SHA1 Message Date
c116ea3368 Merge pull request 'update crashkernel setting in kernelcmdline' (#3) from tcooper/rocky-kiwi-descriptions:update-kernelcmdline into r9
Reviewed-on: sig_core/rocky-kiwi-descriptions#3
Reviewed-by: Neil Hanlon <neil@noreply@resf.org>
2024-08-22 13:56:41 +00:00
cf551a7bf2
update crashkernel setting in kernelcmdline
- `crashkernel=auto` deprecated in RHEL9
- replace with output of `echo $(sudo kdumpctl get-default-crashkernel)`
2024-08-21 13:24:50 -07:00
16d7eb00bf
adjust readme 2024-07-15 09:45:20 -07:00
bdb4b46799
remove tmp.mount mask 2024-06-24 13:51:34 -07:00
b80f7a78b2
update readme further 2024-06-23 17:43:27 -07:00
0c06d0bffd
Update readme 2024-06-23 12:53:08 -07:00
59ab7f32ec
add fixfiles step for debugging 2024-06-11 20:55:53 -07:00
674f96b394
Switch back to by-uuid to reproduce bug 2024-06-11 19:03:14 -07:00
e88070dc68
try to size them up correctly 2024-06-08 20:28:56 -07:00
2ce3f6f4d1
reduce size 2024-06-07 09:45:58 -07:00
b740f0f4a0
Reduce size by a single M for now 2024-06-07 09:16:22 -07:00
9a2b76504d
add in --setperms 2024-06-05 08:55:10 -07:00
38c80b01a4
Removing it there does not work 2024-05-22 12:59:28 -07:00
6b0903ec71
attempt to remove unneeded boot files 2024-05-22 12:37:06 -07:00
0e2005c550
fixup: make 9.4 containers match 2024-05-22 06:39:27 -07:00
695890d927
explicitly set bls to true 2024-05-15 15:15:59 -07:00
c00797f388
remove root from cmdline for now 2024-05-15 14:45:38 -07:00
a16be35d17
remove parts, force label in kernel args 2024-05-15 14:37:09 -07:00
4f6659d82f
check if root part can be customized 2024-05-15 14:28:42 -07:00
eca8b12c1f
stop trying to remove a user we removed 2024-05-15 15:52:37 -04:00
a577717827
Adjust non-LVM to use by-label 2024-05-15 12:29:20 -07:00
9529793457
Change LV name in LVM cloud variants 2024-05-15 12:08:02 -07:00
d6c5a06b2c
remove rocky user, let cloud-init do it 2024-05-15 10:32:16 -07:00
9e77db2e47
also delete the pass just in case 2024-05-09 00:43:54 -04:00
6319ddb4cf
create rocky user on cloud images 2024-05-08 23:14:33 -04:00
521737c639
add iscsi-initiator-utils to OCP 2024-05-08 17:48:11 -04:00
fe5304830d
fixup 2024-05-08 17:22:12 -04:00
e5d247357e
i don't think we need this 2024-05-08 17:14:51 -04:00
cafd04f6d0
config.sh(oracle): stop trying to start ocid 2024-05-08 16:46:35 -04:00
41e027847f
i don't know how this was removed 2024-05-08 14:57:04 -04:00
e57db9772b
fix: install lvm2 for EC2 2024-05-08 13:08:21 -04:00
8f6f096e9c
fix: install lvm2 for LVM types 2024-05-08 11:27:39 -04:00
6 changed files with 180 additions and 200 deletions

View File

@ -6,6 +6,15 @@ 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
@ -24,16 +33,61 @@ Please fork and make a PR! We're still learning how this tool works ourselves.
### How to try it out
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.
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.
**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 will need to use `--isolation=simple`.
case, you may need to use `--isolation=simple` or forego the use of mock.
#### Live Image Example (EPEL)
**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
The below makes an XFCE live image using SIG/Core packages.
@ -91,3 +145,5 @@ mock environment.
```
% bash live-build.sh --live-image XFCE --output-dir /builddir/xfce
```

View File

@ -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=auto net.ifnames=0"
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</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=auto net.ifnames=0"
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</size>
<systemdisk name="rocky" preferlvm="true">
<volume name="@root" size="9G" mountpoint="/" />
<volume name="@root=lvroot" size="9000M" 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=auto net.ifnames=0"
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</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=auto net.ifnames=0"
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</size>
<systemdisk name="rocky" preferlvm="true">
<volume name="@root" size="9G" mountpoint="/" />
<volume name="@root=lvroot" size="9000M" 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=auto net.ifnames=0"
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M 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="M">10738</size>
<size unit="G">10</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=auto net.ifnames=0"
kernelcmdline="console=ttyS0,115200n8 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M 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="M">10738</size>
<size unit="G">10</size>
<systemdisk name="rocky" preferlvm="true">
<volume name="@root" size="9G" mountpoint="/" />
<volume name="@root=lvroot" size="9000M" 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=auto net.ifnames=0"
kernelcmdline="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" console="serial" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" console="serial" timeout="1" bls="true"/>
<size unit="G">10</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=auto net.ifnames=0"
kernelcmdline="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M net.ifnames=0"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</size>
<systemdisk name="rocky" preferlvm="true">
<volume name="@root" size="9G" mountpoint="/" />
<volume name="@root=lvroot" size="9000M" 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=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10"
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"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</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=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10"
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"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</size>
<systemdisk name="rocky" preferlvm="true">
<volume name="@root" size="9G" mountpoint="/" />
<volume name="@root=lvroot" size="9000M" 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=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"
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"
devicepersistency="by-uuid"
rootfs_label="rocky">
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
<bootloader name="grub2" timeout="1"/>
<size unit="M">10738</size>
<bootloader name="grub2" timeout="1" bls="true"/>
<size unit="G">10</size>
</type>
</preferences>
<!-- End OCP -->
@ -246,12 +246,11 @@
<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="oci-utils"/>
<package name="python3-circuitbreaker"/>
<package name="python3-daemon"/>
<package name="python3-sdnotify"/>
<package name="python39-oci-sdk"/>
</packages>-->
<packages type="image" patternType="plusRecommended" profiles="Cloud-OCP-Base">
<package name="iscsi-initiator-utils"/>
</packages>
</image>

View File

@ -2,6 +2,9 @@
<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
View File

@ -145,8 +145,6 @@ 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
@ -442,160 +440,56 @@ 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 - Dracut for iscsi bypass
# OCI - YOLO
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="
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
base64 -d <<<"$OCIDRACUT" | tar -xz
check() {
return 0
}
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=="
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
base64 -d <<<"$OCICLOUDCFG" >> /etc/cloud/cloud.cfg.d/99_oci.cfg
# 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() {
@ -619,6 +513,12 @@ 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() {
@ -643,7 +543,7 @@ function common_container_steps() {
}
function minimal_container_steps() {
microdnf -y remove langpacks-en
microdnf -y remove langpacks-en || true
rm -fv /usr/share/gnupg/help*.txt
rm /usr/lib/rpm/rpm.daily
rm -rfv /usr/lib64/nss/unsupported-tools/
@ -913,8 +813,6 @@ fi
# OCP specific settings
if [[ "$kiwi_profiles" == *"OCP"* ]]; then
ocp_cloud_steps
EOF
fi
# cloud clean up

View File

@ -135,6 +135,7 @@
<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"/>
@ -144,7 +145,6 @@
<ignore name="grub*"/>
<ignore name="iptables"/>
<ignore name="kernel"/>
<ignore name="*-firmware"/>
<ignore name="libss"/>
<ignore name="os-prober"/>
<ignore name="pinentry"/>
@ -171,12 +171,16 @@
<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"/>
@ -194,15 +198,23 @@
<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 -->

12
wsl/default.xml Normal file
View File

@ -0,0 +1,12 @@
<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>