[root@localhost ~]# yum -y groupinstall base-x Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Error: There are no enabled repos.

Error: There are no enabled repos.

I was installing Red Hat Enterprise Linux 8.0 on a Hyper-V virtual machine. After copying all the packages from the installation media and installing them onto the virtual hard drive, Anaconda booted RHEL into a blank screen.

After some research I found that the problem was a known issue listed in RHEL 8.0’s release notes as well as on Red Hat’s knowledge base:

The xorg-x11-drv-fbdev, xorg-x11-drv-vesa, and xorg-x11-drv-vmware video drivers are not installed by default

In addition, virtual machines relying on EFI for graphics support, such as Hyper-V, are also affected. If you selected the Server with GUI base environment on Hyper-V, you might be unable to log in due to a black screen displayed on reboot. To work around this problem on Hyper-v, enable multi- or single-user mode using the following steps:
Reboot the virtual machine.
During the booting process, select the required kernel using the up and down arrow keys on your keyboard.
Press the e key on your keyboard to edit the kernel command line.
Add systemd.unit=multi-user.target to the kernel command line in GRUB.
Press Ctrl-X to start the virtual machine.
After logging in, run the yum -y groupinstall base-x command.
Reboot the virtual machine to access the graphical mode.
(BZ#1687489)

So I started following the instructions, but on step #6 something unexpected happens:

[root@localhost ~]# yum -y groupinstall base-x
 Updating Subscription Management repositories.
 Unable to read consumer identity
 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
 Error: There are no enabled repos.

Well… Thing is this is a short lived disposable virtual machine and I have no plans on registering it with Red Hat Subscription Management.

Luckily, the installation media contains the two repositories introduced with RHEL 8.0: BaseOS and AppStream.

Base-x is contained in the AppStream repo. We just have to:

  1. Make sure the repositories from the installation media are accessible from the file system;
  2. Import the public keys used to sign the packages into RPM;
  3. Direct yum to install the packages from the AppStream repository.
[root@localhost ~]# mount /dev/sr0 /mnt
 mount: /mnt: WARNING: device write-protected, mounted read-only.
 [root@localhost ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
 [root@localhost ~]# yum --repofrompath AppStream,file:///mnt/AppStream -y groupinstall base-x  
Results of the package installation
base-x installed successfully

Please note the command importing Red Hat’s public keys into RPM before installing the package, otherwise the package wouldn’t have been installed and an error message would have been displayed as seen below.

[root@localhost ~]# mount /dev/sr0 /mnt
 mount: /mnt: WARNING: device write-protected, mounted read-only.
 [root@localhost ~]# yum --repofrompath AppStream,file:///mnt/AppStream -y groupinstall base-x
 Updating Subscription Management repositories.
 Unable to read consumer identity
 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
 Added AppStream repo from file:///mnt/AppStream
 You have enabled checking of packages via GPG keys. This is a good thing.
 However, you do not have any GPG public keys installed. You need to download
 the keys for packages you wish to install and install them.
 You can do that by running the command:
     rpm --import public.gpg.key
 Alternatively you can specify the url to the key you would like to use
 for a repository in the 'gpgkey' option in a repository section and DNF
 will install it for you.

Once the package is installed, rebooting the system should load the graphical user interface for the final steps of the installation process.

RHEL 8.0 Initial Setup graphical user interface
Initial Setup

Published by

Alfred Myers

I have been interested in computers since I got my hands on a magazine about digital electronics back in 1983 and programming them has been paying the bills since 1991. Having focused on Microsoft-centric technology stacks for the best part of two decades, in recent years I’ve been educating myself on open source technologies such as Linux, networking and the open web platform.