[GH-ISSUE #7891] Ubuntu Server 22.04 with Out of memory boot failure. #5049

Closed
opened 2026-04-12 16:08:35 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @vahid67 on GitHub (Nov 30, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7891

What is the issue?

Hello,

This bug is related to a boot failure on Ubuntu Server 22.04 with an Out of memory error.

I'm trying to install Ollama on Ubuntu Server 22.04 to run a local dedicated server and the specs are Corei9 12900 + 32GB DDR5 + 3080 RTX.
I can install nvidia driver using this method:

sudo ubuntu-drivers install --gpgpu

This command came from this page: https://ubuntu.com/server/docs/nvidia-drivers-installation

Everything works and I can reboot the server.
Now If I install Ollama using the official command it works perfectly and all the step works and I can run Ollama, pull a model then communicate with that and it perfectly uses GPU for the process but as soon as a reboot I can't boot to linux with the mentioned error and even I can't boot using the recovery mode!

I formatted the drive and installed Ubuntu again but this time I changed the installation order, first I installed Ollama but it failed to install Cuda drivers but Ollama itself installed then I manually installed CUDA drivers from this page https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local

It was installed without any problem but again after reboot, the Out of memory error came back.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

v0.4.6 and v0.4.5

Originally created by @vahid67 on GitHub (Nov 30, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7891 ### What is the issue? Hello, This bug is related to a boot failure on Ubuntu Server 22.04 with an `Out of memory` error. I'm trying to install Ollama on Ubuntu Server 22.04 to run a local dedicated server and the specs are Corei9 12900 + 32GB DDR5 + 3080 RTX. I can install nvidia driver using this method: `sudo ubuntu-drivers install --gpgpu` This command came from this page: https://ubuntu.com/server/docs/nvidia-drivers-installation Everything works and I can reboot the server. Now If I install Ollama using the official command it works perfectly and all the step works and I can run Ollama, pull a model then communicate with that and it perfectly uses GPU for the process but as soon as a reboot I can't boot to linux with the mentioned error and even I can't boot using the recovery mode! I formatted the drive and installed Ubuntu again but this time I changed the installation order, first I installed Ollama but it failed to install Cuda drivers but Ollama itself installed then I manually installed CUDA drivers from this page https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local It was installed without any problem but again after reboot, the `Out of memory` error came back. ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version v0.4.6 and v0.4.5
GiteaMirror added the bug label 2026-04-12 16:08:35 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 30, 2024):

Ollama is not involved in the boot process. If you could provide more in the way of logs it might be possible to see what's going wrong.

<!-- gh-comment-id:2508920534 --> @rick-github commented on GitHub (Nov 30, 2024): Ollama is not involved in the boot process. If you could provide more in the way of logs it might be possible to see what's going wrong.
Author
Owner

@vahid67 commented on GitHub (Nov 30, 2024):

I can't login to server anymore to get logs...I think there are some problems or conflicts after installing the cuda driver.
I'll try to test the process on Ubuntu Desktop to see if there's any differences.

<!-- gh-comment-id:2508934467 --> @vahid67 commented on GitHub (Nov 30, 2024): I can't login to server anymore to get logs...I think there are some problems or conflicts after installing the cuda driver. I'll try to test the process on Ubuntu Desktop to see if there's any differences.
Author
Owner

@vahid67 commented on GitHub (Nov 30, 2024):

I tried to install on Ubuntu Desktop 22.04 and It worked!
After installing Ubuntu, I installed the nvidia driver using these commands for anyone that reads this topic on furure:
sudo apt install ubuntu-drivers-common
sudo ubuntu-drivers devices (To find recommended version)
sudo apt install nvidia-driver-xxx (recommended version)
sudo reboot now
After reboot ubuntu boot noramally
Then I installed the ollama using the original download script from website but this time it didn't download anything for nvidia cuda driver and it returned the NVIDIA GPU installed message, after reboot there was no out of memory error.
I will to test this method on Ubuntu Server too.

<!-- gh-comment-id:2508954021 --> @vahid67 commented on GitHub (Nov 30, 2024): I tried to install on Ubuntu Desktop 22.04 and It worked! After installing Ubuntu, I installed the nvidia driver using these commands for anyone that reads this topic on furure: `sudo apt install ubuntu-drivers-common` `sudo ubuntu-drivers devices` (To find recommended version) `sudo apt install nvidia-driver-xxx` (recommended version) `sudo reboot now` After reboot ubuntu boot noramally Then I installed the ollama using the original download script from website but this time it didn't download anything for nvidia cuda driver and it returned the `NVIDIA GPU installed` message, after reboot there was no `out of memory` error. I will to test this method on Ubuntu Server too.
Author
Owner

@vahid67 commented on GitHub (Dec 4, 2024):

This problem has nothing to do with Ollama, Its a know bug from the nvidia driver and linux that cause 'Out of memory' problem.
I just installed a fresh linux 22.04 and after just installing the nvidia driver I could not boot Linux.

<!-- gh-comment-id:2516395431 --> @vahid67 commented on GitHub (Dec 4, 2024): This problem has nothing to do with Ollama, Its a know bug from the nvidia driver and linux that cause 'Out of memory' problem. I just installed a fresh linux 22.04 and after just installing the nvidia driver I could not boot Linux.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5049