How I learned to stop worrying and love the chroot

So I recently completed installing OpenMandriva on my last remaining Ex-Windows PC.

All remaining vestiges have now been cut, and I can now embrace the screaming Mandrake Root with vigor and total commitment.

After my recent successes with grub console, fstab and NetworkManager, I thought I had this root in the bag. My flatpak was now brimming with an assortment of enhancements, yet one task remained. I approached the final battle perhaps a little too overconfident, but defiantly I stepped forward. I uttered that wretched spell and grimaced:

ā€œNVIDIAā€

Suddenly everything went dark. I panicked. Instinctively I cast a 3 finger interrupt but alas, time and again I found myself at back the grub branch, yet every turn was a dead end.

TLDR:

I attempted to install the ā€œNVIDIA driversā€ package from the OMA Welcome screen.

For whatever reason this did not go well with my old GeForce GTX 660 Ti.

After rebooting I was unable to boot to any of the recovery console options in grub.

Approaching the solution:

I will worry about fixing this driver issue later next week when I have more time, but for now I needed to find a way to undo the installation of the NVIDIA packages.

I booted from the liveUSB I used for installation, I mounted the drive and looked around for a while but I had no idea what to look for. Then it occurred to me, ā€œwhat if I could reverse the dnf package installation in a console, as if I was logged in as the root user?ā€

I was aware of the command chroot, I’ve had to use it once or twice in the past. I thought, being in a live session it couldn’t hurt to try…

mount /dev/sda4 /mnt
chroot /mnt
dnf remove "nvidia*"

Obviously this didn’t work, it gave some errors about ā€œNo such file or directory in /procā€œ and it was clear to me I had missed something in the chroot, as the command ā€œflatpak listā€ showed only what I had installed in the live session, not what was installed on the main system.

At this point DuckDuckGo’s search assist came to the rescue. I did a search ā€œopenmandriva remove flatpak using chrootā€. It turns out I had only missed a few crucial steps:

 ' Mount root partition to a temporary directory:
sudo mount /dev/sdXn /mnt

 ' Bind necessary filesystems:
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

 ' Chroot into the Mounted System:
sudo chroot /mnt

 ' Remove packages:
dnf remove "nvidia*"

After shutting down the live session and rebooting everything was back to normal.

And that is the story of how I failed to a bag a screaming mandrake root by casting the NVIDIA spell without first binding the ritual incantations.

3 Likes

I think the welcome app will install Nvidia’s driver. Nvidia doesn’t support their own hardware, so anything before the rtx 2000’s has been removed from their driver. You probably want the nouveaux driver.

2 Likes

Resources Index

Includes:

How to use ā€˜Live’ OMLx iso to repair broken OMLx system

How to fix broken boot-loader

Edit: Good job figuring that out. These articles include a few important tips specific to using chroot to fix things in OMLx.

2 Likes

Cheers Ben, thanks for sharing the relevant resources. What I have noticed in cases where I’ve encountered a broken system in the past, it is easy to become so focused on the symptoms that it can be hard to find the right words to describe the problem. In the case above, once I realised that chroot was the tool that I needed, I was able to find the solution in about 5 minutes. From this experience I now understand why it is necessary to bind the system tool paths before initiating the chroot

thank you, you made me dodge a bullet (am on gtx 1650 maxq -laptop and was afraid of the driver…) : D

Yup.

The reason is, the drivers are legacy and do not work with newer kernels. 55x is the only driver version that will work with the kernel we ship.

I was planning to save this discussion for a separate thread on support but since this has come up here anyway: if I understand correctly, you’re saying that the nvidia driver packages as presented on the OMA welcome screen are the ā€œ55xā€ version, which would not support older hardware like my card? And if I tried to download an older version e.g. 470 from nvidia, that wouldn’t work either?

Where @LeeTalbert suggests using the ā€œnouveauā€ driver, I’m not clear if that means something different than what is already included in the standard OMA Lx 6.0 Rock install? For example, on an old HP touchscreen PC with AMD Mobility 6550A I’ve been able watch videos and play a 2D game on Steam just fine, but on the PC with the old nvidia card, even attempting to play a video on youtube became immediately frozen on the first frame.

Back on the Coffee Break vibe, it was interesting to see Brave AI provide the following insight:

Benchmarks show the GTX 660 Ti has a 700% higher aggregate performance score compared to the HD 6550D, with significantly better results in gaming and synthetic benchmarks. The GTX 660 Ti also benefits from better driver support and more advanced technology, making it far more capable for modern gaming and demanding applications.

Yes. Thank Nvidia for that. We don’t have an older kernel version to support 4xx and below.

Both nouveau and amdgpu ship with all our releases. This means you would not have to do anything to enable them. The problem with the former will be exotic hardware configuration support and Wayland. There are little to no issues with amdgpu for most cards.

1 Like