Search code examples
clientupgradethindnf

rhel: dnf upgrade at a different location, upgrading a thin client


I want to upgrade a running rhel thin client that lives on the server under /opt/posterm/x86_64. Under here you have all your typical unix files that make up a running linux OS. For example:

[root@zzxxx repo]# cat /opt/posterm/x86_64/etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)

The command I run on the server to upgrade the client is

dnf --installroot=/opt/posterm/x86_64/ --setopt=reposdir=/repo/BaseOS upgrade
Error: There are no enabled repositories in "/repo/BaseOS".

How do I upgrade the client? my local repos are enabled but this error keeps looking at me.

[root@zzxxx repo]# dnf repolist
repo id                                                                     repo name
repository                                                                  localrepo
rhel_appstream                                                              rhel appstream
[root@zzxxx repo]# ll /repo
total 3722
dr-xr-xr-x. 4 root root    2048 Nov 11 16:23 AppStream
dr-xr-xr-x. 4 root root    2048 Nov 11 16:23 BaseOS
dr-xr-xr-x. 3 root root    2048 Nov 11 16:40 EFI
-r--r--r--. 1 root root    8806 Nov 11 16:16 EULA
-r--r--r--. 1 root root    1437 Nov 11 16:16 extra_files.json
-r--r--r--. 1 root root   18390 Nov 11 16:16 GPL
dr-xr-xr-x. 3 root root    2048 Nov 11 16:41 images
dr-xr-xr-x. 2 root root    2048 Nov 11 16:40 isolinux
-r--r--r--. 1 root root      91 Nov 11 16:16 media.repo
-r--r--r--. 1 root root 3760458 Nov 11 16:16 OL8-RELNOTES8-7.zip
-r--r--r--. 1 root root    3169 Nov 11 16:16 RPM-GPG-KEY
-r--r--r--. 1 root root    3169 Nov 11 16:16 RPM-GPG-KEY-oracle
-r--r--r--. 1 root root    3099 Nov 11 16:48 TRANS.TBL

Thank you!


Solution

  • Answer: once I copied the servers local.repo file to the clients /opt/posterm/x*/etc/yum.repos.d then ran

    dnf --installroot=/opt/posterm/x86_64/ upgrade 
    

    it upgraded successfully. I did try the --setopt again after I copied the local.repo file into place, but it gave me a similar error so I just removed that option as you can see above.