I'm trying to add rpms to harvester OS, as well as...
# harvester
p
I'm trying to add rpms to harvester OS, as well as make OS level network config changes that will be persistent. It seems the root filesystem is read only during installation, is that correct? Any advice is appreciated.
b
That is correct. There's a couple of ways to make changes to the OS. The easiest way is to edit the
/oem/90_custom.yaml
We do this all the time, for example, there's a backend network we use for building boxes and we like using it as a backdoor for ssh as well, but we don't want wicked applying a route to the network interface. So we set up DHCP for the network and add the following block to the
90_custom.yaml
:
Copy code
- path: /etc/sysconfig/network/ifcfg-eno1
              permissions: 384   
              owner: 0  
              group: 0  
              content: |   
                STARTMODE='auto'   
                BOOTPROTO='dhcp'   
                DHCLIENT_SET_DEFAULT_ROUTE='no'   
              encoding: ""
              ownerstring: ""
That drops the cfg into etc on boot and wicked activates during the systemd startup.
If you need to do more than that, there's other yaml you'll need as a hack and you'll have to add
rd.cos.rwdebug
to the kernel line in the grub boot to trigger the overlays getting applied (aka not applied) correctly.
ProTip: Leave
/var
immutable to avoid screwing up the
var/lib/harvester/defaultdisk
path at boot. If you don't, just be sure to umount and delete the directory it creates.
🙌 1
p
Thank you @bland-article-62755. Installing an rpm like atop will be a bit of a challenge but it sounds doable.
b
Security wise I think it's worth it. 🙂
p
i agree...i just have to develop a process so it can be done when needed and what the impacts are from an upgrade perspective