Unsupported use of Photon OS packages in WSL2 system distribution - dcasota/photonos-scripts GitHub Wiki
When starting WSL2 system distribution with wsl --distribution Ph5 --system --user root
the cbl-mariner distribution is started.
The following recipe is non-persistent. This means the changes will be lost with wsl --shutdown
.
-
Copy from a Photon OS installation the files VMWARE-RPM-GPG-KEY and VMWARE-RPM-GPG-KEY-4096 in directory
/etc/pki/rpm-gpg/
.
Copy the files temporarily stored on Windows e.g. bycp /mnt/c/Users/Public/VMWARE-RPM-GPG* /etc//pki/rpm-gpg
. -
Run the following commands.
cat <<EOF >/etc/yum.repos.d/photon.repo [photon] name=Photon OS $basearch baseurl=https://packages.vmware.com/photon/5.0/photon_5.0_\$basearch gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY-4096 gpgcheck=1 repo_gpgcheck=0 enabled=1 skip_if_unavailable=True sslverify=0 EOF tdnf makecache tdnf remove bind-libs -y tdnf remove xorg-x11-server-Xwayland -y tdnf remove ca-certificates-shared -y tdnf remove pam -y tdnf clean all --releasever=5.0 tdnf install openssl-libs --releasever=5.0 -y tdnf install openssl --releasever=5.0 -y tdnf install network-config-manager --releasever=5.0 -y tdnf install photon-repos --releasever=5.0 -y tdnf install tdnf --releasever=5.0 -y