Greetings, I am new in Fedora (and Linux) and I’ve installed the f37 on a brand new laptop. Everything was running smoothly, I’ve been doing some dnf installation and updates, regular stuffs, but I needed to install the Virtualbox in order to use another linux distro (that I wasn’t able to install properly), but Virtualbox gave me an error when I’ve tried to run the Virtual Image of such distro:
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system’s documentation for more information.
Then I’ve found a topic that it seems solving this issue, and so I’ve run those two lines:
Now, the Virtualbox is successfully running the VM and the linux distro I wanted, but everything is broken. Graphical glitches, Wi-fi not recognized at all and so not able to connect to internet, overall instability, etc. I’ve basically messed up my OS just to solve a problem for a simple tool.
How can I fix this issue? Is there any solution to revert back to a previous version of the Kernel, or undo what I did? Keep in mind that the Wi-Fi is not working anymore, plus my laptop doesn’t have an Ethernet port. I cannot connect to internet basically. Thanks
There also is a fedora virtual machine manager that is native to the distro.
QEMU/KVM is available and all that is required to get it working is to install libvirt and virt-manager then use the installed VMM (virtual machine manager) to create and run the VMs. sudo dnf install libvirt virt-manager
I’ve got it, thanks for the information, I will follow these instruction for a VM instead to have the VirtualBox installed. But how can I solve my problem?
I’ve already executed such commands on Terminal, and now it seems my Kernel is totally broken. As I’ve said, no Wi-Fi connection (and I don’t have an Ethernet port on my laptop), graphical glitches and furthermore is not possible to turn off or restart the OS, only option is Sleep.
Is there anyway to revert back to a previous status of the OS without having the laptop connected on internet? Or is too late and I need to re-install Fedora from scratch?
Thanks a lot ilikelinux, I’ve tried to press Esc while the system was starting up and I’ve been prompted to the kernel selection. These are the ones showing up:
Fedora Linux (6.1.10-200.fc37.x86_64)
Fedora Linux (6.1.9-200.fc37.x86_64)
Fedora Linux (6.0.7-301.fc37.x86_64)
Obviously I didn’t include the rescue option and UEFI firmware settings. Now, if I select the Kernel version 6.1.9, I am able to restore the system as it was before, so everything working smoothly, Wi-Fi recognized, etc. The VirtualBox is not working anymore now, since I have reverted to a previous Kernel version, but I care less because I will try your solution instead. The problem now is that if I restart the system, it will be selected automatically the version 6.1.10 and so I have the same problem as before.
How can I make Fedora selecting by default the version of the Kernel 6.1.9? Is there a way to remove the 6.1.10 version?
Also, since you have asked it and I do apologies for not having mentioned it before, my laptop is an Asus Vivobook 16X R5 16GB. It came with Windows 11 pre-installed but I have totally formatted the system to have Fedora only. And since I am studying CyberSecurity, it was requested to use Kali Linux, but I wasn’t able to install it since it seems there is an issue with Kali Linux installer and the Wi-Fi card of my Laptop not being recognized, so the installer was stuck. I’ve been able to run Kali on VirtualBox tho, but as I’ve said, the Kernel was messing Fedora.
And by the way, I am totally happy to stay with Fedora, I’ve heard lots of great things about this OS, so I want to learn more about it.
To get the index number of all the installed kernels:
sudo grubby --info=ALL | grep -E "^kernel|^index"
The output should be something like this:
Now we can change the default kernel by using the index number:
sudo grubby --set-default-index=1
Verify that the right kernel has been set as default:
sudo grubby --default-title
The output will be the default kernel title:
Fedora Linux (5.15.10-lqx1.0.fc35.x86_64) 35 (Workstation Edition)
That method of setting the index number as default works, but has one flaw.
When the next kernel is installed it will become index 0 and each of the others already installed get bumped down on number in the index, so what was index 1 is now index 2 and what was index 0 is now index 1. The end result is that the kernel you chose as index 1 is no longer index 1, so the method of selecting the kernel by index number is only a temporary solution.
I found that if you edit /etc/default/grub which should already have the statement
and you add the statement
then run the command sudo grub2-mkconfig -o /boot/grub2/grub.cfg
The effect will be to select whichever kernel you choose from the grub menu when you boot and set it as default for future boots, independent of its location in the indexing.
Thank you everyone, I’ve managed to fix the Kernel and now Fedora is running perfectly. I’ve decided first to run the correct kernel by pressing Esc from the boot phase. Then I’ve followed the instruction to remove the Kernel that I didn’t wanted, so it was index 0. By removing the index 0, the Kernel indexed 1 automatically became 0 so I didn’t need to set the preferred Kernel following the instructions provided by @computersavvy . So for my situation, the instructions provided by @ilikelinux are all what I needed, but it depends obviously by the case.
Now I will follow the instructions to set up a VM by using only the pre-installed tool Boxes in Fedora. Cheers!