-
Notifications
You must be signed in to change notification settings - Fork 13.5k
docs, scripts: Prevent useradd(8) from failing on Fedora Silverblue #12455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
debarshiray
wants to merge
1
commit into
ollama:main
Choose a base branch
from
debarshiray:wip/rishi/scripts-install.sh-ollama-home-ostree
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
docs, scripts: Prevent useradd(8) from failing on Fedora Silverblue #12455
debarshiray
wants to merge
1
commit into
ollama:main
from
debarshiray:wip/rishi/scripts-install.sh-ollama-home-ostree
+4
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debarshiray
added a commit
to debarshiray/ollama
that referenced
this pull request
Sep 30, 2025
On OSTree based operating systems like Fedora Siverblue [1], the /usr/share directory is part of the read-only /usr mount point. This causes the install.sh script to fail when adding the 'ollama' user with its home directory at /usr/share/ollama, because useradd(8) is unable to create the directory: $ curl -fsSL https://ollama.com/install.sh | sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... useradd: cannot create directory /usr/share/ollama >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. The /var/lib directory is an alternative for this, because /var is a read-write mount point. eg., this is used by Geoclue [2] and the GNOME Display Manager [3] for their users' home directories on Linux distributions like Arch, Fedora and Ubuntu. The install.sh script is able to use /usr/local on Fedora Silverblue, because /usr/local is not considered part of the read-only OS image, and is a symbolic link to /var/usrlocal to make it read-write. [1] https://fedoraproject.org/silverblue/ [2] https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home [3] https://wiki.gnome.org/Projects/GDM/ ollama#12455
19a8c2f to
9370ad2
Compare
debarshiray
added a commit
to debarshiray/ollama
that referenced
this pull request
Sep 30, 2025
On OSTree based operating systems like Fedora Siverblue [1], the /usr/share directory is part of the read-only /usr mount point. This causes the install.sh script to fail when adding the 'ollama' user with its home directory at /usr/share/ollama, because useradd(8) is unable to create the directory: $ curl -fsSL https://ollama.com/install.sh | sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... useradd: cannot create directory /usr/share/ollama >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. The /var/lib directory is an alternative for this, because /var is a read-write mount point. eg., this is used by Geoclue [2] and the GNOME Display Manager [3] for their users' home directories on Linux distributions like Arch, Fedora and Ubuntu. With this change the install.sh script is able to proceed further: $ sh scripts/install.sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... >>> Adding ollama user to render group... >>> Adding ollama user to video group... >>> Adding current user to ollama group... >>> Creating ollama systemd service... >>> Enabling and starting ollama service... Created symlink '/etc/systemd/system/default.target.wants/ollama.service' → '/etc/systemd/system/ollama.service'. >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. WARNING: No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode. The install.sh script is able to use /usr/local on Fedora Silverblue, because /usr/local is not considered part of the read-only OS image, and is a symbolic link to /var/usrlocal to make it read-write. [1] https://fedoraproject.org/silverblue/ [2] https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home [3] https://wiki.gnome.org/Projects/GDM/ ollama#12455
9370ad2 to
34d917b
Compare
34d917b to
83031dc
Compare
debarshiray
added a commit
to debarshiray/ollama
that referenced
this pull request
Sep 30, 2025
On OSTree based operating systems like Fedora Siverblue [1], the /usr/share directory is part of the read-only /usr mount point. This causes the install.sh script to fail when adding the 'ollama' user with its home directory at /usr/share/ollama, because useradd(8) is unable to create the directory: $ curl -fsSL https://ollama.com/install.sh | sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... useradd: cannot create directory /usr/share/ollama >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. The /var/lib directory is an alternative for this, because /var is a read-write mount point. eg., this is used by Geoclue [2] and the GNOME Display Manager [3] for their users' home directories on Linux distributions like Arch, Fedora and Ubuntu. With this change the install.sh script is able to proceed further: $ sh scripts/install.sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... >>> Adding ollama user to render group... >>> Adding ollama user to video group... >>> Adding current user to ollama group... >>> Creating ollama systemd service... >>> Enabling and starting ollama service... Created symlink '/etc/systemd/system/default.target.wants/ollama.service' → '/etc/systemd/system/ollama.service'. >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. WARNING: No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode. The install.sh script is able to use /usr/local on Fedora Silverblue, because /usr/local is not considered part of the read-only OS image, and is a symbolic link to /var/usrlocal to make it read-write. [1] https://fedoraproject.org/silverblue/ [2] https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home [3] https://wiki.gnome.org/Projects/GDM/ ollama#12455
On OSTree based operating systems like Fedora Siverblue [1], the /usr/share directory is part of the read-only /usr mount point. This causes the install.sh script to fail when adding the 'ollama' user with its home directory at /usr/share/ollama, because useradd(8) is unable to create the directory: $ curl -fsSL https://ollama.com/install.sh | sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... useradd: cannot create directory /usr/share/ollama >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. The /var/lib directory is an alternative for this, because /var is a read-write mount point. eg., this is used by Geoclue [2] and the GNOME Display Manager [3] for their users' home directories on Linux distributions like Arch, Fedora and Ubuntu. With this change the install.sh script is able to proceed further: $ sh scripts/install.sh >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ############################################################### 100.0% >>> Creating ollama user... >>> Adding ollama user to render group... >>> Adding ollama user to video group... >>> Adding current user to ollama group... >>> Creating ollama systemd service... >>> Enabling and starting ollama service... Created symlink '/etc/systemd/system/default.target.wants/ollama.service' → '/etc/systemd/system/ollama.service'. >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. WARNING: No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode. The install.sh script is able to use /usr/local on Fedora Silverblue, because /usr/local is not considered part of the read-only OS image, and is a symbolic link to /var/usrlocal to make it read-write. [1] https://fedoraproject.org/silverblue/ [2] https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home [3] https://wiki.gnome.org/Projects/GDM/ ollama#12455
83031dc to
7536f69
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On OSTree based operating systems like Fedora Siverblue [1], the
/usr/sharedirectory is part of the read-only/usrmount point. This causes theinstall.shscript to fail when adding theollamauser with its home directory at/usr/share/ollama, becauseuseradd(8)is unable to create the directory:The
/var/libdirectory is an alternative for this, because/varis a read-write mount point. eg., this is used by Geoclue [2] and the GNOME Display Manager [3] for their users' home directories on Linux distributions like Arch, Fedora and Ubuntu.With this change the
install.shscript is able to proceed further:The
install.shscript is able to use/usr/localon Fedora Silverblue, because/usr/localis not considered part of the read-only OS image, and is a symbolic link to/var/usrlocalto make it read-write.[1] https://fedoraproject.org/silverblue/
[2] https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home
[3] https://wiki.gnome.org/Projects/GDM/