Mounting a SMB share to /mnt?

I’m struggling trying to understand how the core filesystem and mounts work… I’m pretty new to Linux on the desktop in general, and VERY new to Silverblue/Bluefin. But I want to learn from this new basis of how to linux :slight_smile:

I’m a homelabber, so I’m used to running Proxmox/Debian on servers… and I’m having a rough time understanding the basics. My pwd in terminal is /var … and I don’t think I can mount things to /mnt? I’m used to just mkdir -p /mnt/truenas-share and editing /etc/fstab … but that seems completely different now?

Two questions :

  1. How do I go about mounting SMB shares persistently? (is this /usr/etc?)
  2. How can I better learn about how to use Bluefin for relatively basic scenarios? I read through the Documentation link on docs.projectbluefin.io and I think I’m just missing some basics!

@zee-eff-ess I wrote an article earlier that summarizes how the rw filesystems work and are maintained across updates.

In short, /etc is writeable; /usr/etc is not - it is delivered with bootc image layers for whichever system you have booted. Details are in the article …

Remember /mnt is a symlink to /var/mnt (in case that matters). Although I have read others here suggest that mounting to /mnt does not work, I haven’t tried it.

The files in /etc, including /etc/fstab - as described in the article above - can be managed as usual. There are tools available (commands also mentioned in the article) to detect when /etc contents have varied from /usr/etc.

I use a NAS also - OMV in my case. I just connect to shares when needed using the Files GUI. I also have rsync end points configured for backups.

Back to your questions:

Just edit /etc/fstab as you normally would. I would keep a log of these kinds of changes to simplify the reinstall process though.

Try mounting to /var/mnt if you find /mnt to be problematic. But why not ~/mnt? Or /usr/local/mnt ?

The article linked to above references the official docs for ostree and rpm-ostree. Those are a treasure trove of info. I am pretty sure that is (at least part of) what you feel you are missing.

I know I did.

1 Like

This works the same, did you get an error?

1 Like

Yep… /mnt is read-only. I’m reading through the guide linked above, and it sounds like I have to just create a ~/mnt folder and do the stuffs in there. Going to give that a shot. BTW - THANK YOU @j0rge for your work on this… I watched a few of your YT videos before making the plunge. I’m not a dev, and I know that’s your starting audience, but I’m the next tier down kind of techy LOL!

(edit: attaching screenshot)

1 Like

@zee-eff-ess - FYI - /mnt (which is a symlink to /var/mnt) is owned by the root user.

You will need to use sudo to create sub-dirs in there.

$ ls -l /mnt
lrwxrwxrwx. 3 root root 7 Dec 28 04:58 /mnt -> var/mnt

$ ls -ld /var/mnt
drwxr-xr-x. 1 root root 0 Dec 28 05:01 /var/mnt

$ mkdir /mnt/my-sub-dir
mkdir: cannot create directory ‘/var/mnt/my-sub-dir’: Permission denied

$ sudo mkdir /mnt/my-sub-dir
[sudo] password for klmcw: 

$ ls -l /var/mnt
total 0
drwxr-xr-x. 1 root root 0 Apr 24 11:28 my-sub-dir

And do not forget to use chown on the dirs you create if you need that.

sudo chown klmcw:klmcw /var/mnt/my-sub-dir
[sudo] password for klmcw: 

$ ls -l /var/mnt
total 0
drwxr-xr-x. 1 klmcw klmcw 0 Apr 24 11:28 my-sub-dir

This is why I suggested ~/mnt - your user id already has control of that dir structure. And when you open the GNOME Files GUI app - it defaults to your $HOME dir. So ~/mnt will be right there for you.

Hope that helps.

1 Like

Yeah as klmcw is saying, you need to be root to write there so you need a sudo. :smiley:

1 Like

:man_facepalming:

I was overthinking it… between the permissions of the fs, with my uncertainty about how Bluefin is handling folders, plus the share permissions on the NAS…

I liked the idea of mounting to ~/mnt instead … but two things 1) I’d like to share docker-compose files from my git repo which has bind mounts set to common locations across my servers, and 2) I did this for a hot minute, and Pika decided it would be a great time to run a backup… which becuase I didn’t exclude anything, started to do a backup of all my NAS volumes too!

I ended up just doing the /mnt mounts! Thanks for all the help. I do have another issue/question about Solaar and Ignition but I’ll post that to another thread :slight_smile:

2 Likes

I have a drive that I mount to /mnt/nvme, then I bind mount a folder on that drive into my home folder so that it is close by, and I don’t have to cd /mnt/nvme/work/company/blahblahblah all the time.

/dev/disk/by-id/nvme-CT2000P5PSSD8_23113F14672B /mnt/nvme       	btrfs 	defaults,noatime,compress=zstd 0 0
/mnt/nvme/work/company                        /home/john/work 	none  	bind,x-systemd.automount 0 0

If that is more confusing, just skip it :slight_smile:

As far as your docker files, you can use a distrobox to run those containers in, and make folders within the distrobox wherever you want. If you want them to connect to a folder on your host operating system, you can use the volume option.

This is in my /etc/distrobox/distrobox.ini:

[ubuntu]
image=ghcr.io/ublue-os/ubuntu-toolbox:latest
volume=/home/linuxbrew:/home/linuxbrew
nvidia=true
pull=true

So when I enter the ubuntu distrobox, I have all my brew commands available.

~ via 🐍 v3.13.3 on ☁️  john@company.com(us-central1) 
⬢ [ubuntu] ❯ which rg
/home/linuxbrew/.linuxbrew/bin/rg

I’ve also used it to create folders for testing containers, like /app, /config, etc.

Likewise, if this is just confusing, you know what to do :slight_smile:

1 Like

Ooh I like the idea of doing a bind mount to shorten the “cd”ing LOL! Plus it’s accessible that way from anywhere, rather than where my mind went with a symlink.

For the docker side, I’ve got an extensive repo of docker compose files, and I haven’t even looked at distrobox yet. Is that like creating a LXC? I’m very well versed in docker compose, I usually use portainer for container management as I’ve got multiple hosts I need to bounce between.

I did run docker ps just to see if it was running on DX base and sure enough it is. If I had to label myself I’d say I’m more of a “devops” skillset than true dev…

I am curious about these next steps … I’m not really clear on how to think about virtualization yet in Bluefin, even from a concepts basis. Is Proxmox → Debian VM → Docker Container = Bluefin → Distrobox → Docker Container?

I’m not qualified to answer that :slightly_smiling_face:

I don’t use Docker that much. I usually use uv to manage my python environments, and use vscode. No dev containers, etc. (gasp!) because I’m a data scientist and don’t deploy things.

I do :wink: As a solutions & app architect / developer; I only dabble in devsecops (I’m retired now).

@zee-eff-ess Homework assignment for you. Create a distrobox, enter it and do a $ mount command. The output of that for me is 348 lines right now. Most of those are there because I have the nvidia=true property set in my distrobox.ini file for the box entry in question.

distrobox assemble (and friends) really does a lot of magic to make the experience as user friendly and transparent as possible.

Think about it for a moment. With nvidia=true in place, I can create a fedora-toolbox based distrobox, install the latest version of python (3.14.0a7 is about to drop) and execute a pytorch-based app that needs CUDA that is installed on the host!

Then I can export the python binary to the host and execute the same thing without even entering the distrobox. Finally, I can create a .desktop file (in ~/.local/share/applications) that will allow me to execute that script from the GNOME shell.

# distrobox.ini snippet
exported_bins="/usr/bin/python3.14"
exported_bins_path="var/home/klmcw/.local/bin"

It is just a docker (in my case, podman by default) container - so anything you can do with any other container (like bind mount) can be done with distroboxen.

This is incredibly powerful stuff.

I wrote some tools for myself to help manage distrobox creation. I publish them at:

There is merit to the last statement you make above. But that is just one possibility.

First, you can have multiple distroboxen running. Second, you can have some running with docker and others with podman. Flatpak is a kind of container virtualization technology. And LxC, qemu/virt are enabled by default, as well, at least in the bluefin-dx bootc images.

There are a lot of options for virtualization.

I’ll stop there. I hope I covered the high points of what you are thinking through.

Let me know if you would like to drill down some more.

I am in no way more qualified than all the helpful people here giving you advice already, but as an inexperienced linux user I was finding that my fstab-mounted setup would work for a while and then I would mysteriously be unable to boot because something changed somewhere. I wasn’t quite sure what change was causing fstab to prevent booting but was able to reboot after commenting out the offending drive.

Seeking more stability, I looked around and found these two posts about creating systemd units that would seamlessly auto-mount my NAS drives when called upon and do it at the user level without any fstab-exposure that I may be too inexperienced to troubleshoot.

If this sounds at all useful or applicable to your situation, here are the two links:

I’d also be interested to know from more experienced folks if there’s something in this method I ought to reconsider or account for.