How do I load a driver in Linux from a .run file WITHOUT restarting?
I am on a physical machine that has an Nvidia GPU and no hdd and no ssd. Using the USB stick, I boot Linux Mint 20.1 Cinnamon with an option called "-toram" (that way everything is loaded into RAM for speed, but nothing is saved upon shutdown). I am able to use GUI to go to driver manager and use the mouse to select the GPU driver that I want.
When I select the radio-button and click "Apply Changes", Linux Mint is able to download and install the driver WITHOUT restarting.
I was able to find the same driver on Nvidia website and I downloaded it. Its a .run file. I saved it to my Downloads. (in RAM)
I tried to:
mint@mint:~/Downloads$ chmod +x ./NVIDIA-Linux-x86_64-495.44.run
mint@mint:~/Downloads$ sudo ./NVIDIA-Linux-x86_64-495.44.run
But got this message (1 of 2)
Error 2 of 2
(I do not want to install anything to USB drive, I just use USB drive as a boot device)
How do I install that driver from the command line and launch it WITHOUT restarting the OS?
Well, there are limitations to what you can keep running, but you don't technically have to restart. You do have to stop X server though. And this will close all GUI applications.
- Press
Ctrl-Alt-F2
(or anything below F6) to access one of the virtual terminals. - Stop MDM with
sudo service mdm stop
Update: should besudo service lightdm stop
systemctl isolate multi-user.target
- Install driver (make sure you use absolute path!) `sudo ./home/(your username)/Downloads/NVIDIA-Linux-x86_64-495.44.run
systemctl isolate graphical.target
- Restart lightdm
sudo service lightdm start
- Give X time to start! Not long usually.
- You're still in Virtual Terminal. Your X server is probably on 7 so try
Ctrl-Alt-F7
but be prepared that it may be on F1 or even F8 or F9!
Also, you don't have to use Ctrl-Alt-Function keys. You could type chvt 7
instead of Ctrl-Alt-F7
for instance.