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
, andxorg-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 theServer 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 thee
key on your keyboard to edit the kernel command line.
Addsystemd.unit=multi-user.target
to the kernel command line in GRUB.
PressCtrl-X
to start the virtual machine.
After logging in, run theyum -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:
- Make sure the repositories from the installation media are accessible from the file system;
- Import the public keys used to sign the packages into RPM;
- 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
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.