[SOLVED] HASSOS mount NAS network share

Yeah as it is read only its not possible because i don’t know how their update system work to do the same. Commands for squashfs are not working in hassos login terminal neather through ssh.
So the only way is to make ISO. I have everything to do it. It will just take some time. Home stuff need to sort out :smiley:

i have the same as you, but frigate i don’t have automatic turn on. So eveerytime i check if nas is online then i turn on. As i reboot hass not so often,its fine for me.

Good news everyone :smiley: So i made the script. working perfectly.
Now i need to make the ISO image here are some manuals and you need to install squashfs-tools inside the iso image and recreate the image to make it functional and ofcourse add the script to it.

Updated code is on github

https://gparted.org/add-packages-in-gparted-live.php
https://www.techwalla.com/articles/how-to-add-files-to-an-iso-image-in-linux

Looks good! Next OS update I will create a lightweight VM and give it a crack…

1 Like

I updated the script to check if mnt is already in fstab. because after update on one of the partition the fstab is untouched :>

I’m finished :slight_smile: working nicely

now i know how to build an image, maybe in the future i can check the script in config so no need to rewrite it all the time :smiley:

fstab survived CORE update, i am impressed :stuck_out_tongue:

Where do we actually run this from? Your instruction say to download and run the image, but where? on which device? the HA server?

I really want to get all my music saved on my NAS to show up in the HA Media Browser but I’m far from a Linux tech guru so need some clearer instructions… cheers

Hello, okay.Lets do this :smiley:
First you need to tell me how are you managing yout HASS, is it virtual machine? Explain a bit.

Hi @ukro , did have that detail explained previously hence didn’t list again, but that was some time ago / far up the thread.

I’m running HA OS on a NUC (NUC/generic image)

So without proxmox right?

Correct. Standard NUC / generic (it’s name recently changed) image, no VM or anything involved.

Then you have 2 option.
1.Don’t bother with my solution and just add the lines to fstab manualy

//${theip}/${theshare}	/mnt/data/supervisor/media	cifs	nofail,username=${theuser},password=${thepass},iocharset=utf8,x-systemd.after=network-online.target	0	0

With changed data ofcourse

2.Make a USB bootable image of my iso
and just insert it , change boot order in bios,boot from it.
After that you just run the commands as mentioned in github.

let me know how it goes or if you have problems.

Ok thanks. I’ll have a crack at editing the FSTAB first I suppose. That is accessible with HAOS? I know I fumbled my way to editing it back when I previously ran a Supervised install on Ubuntu. I’ll try on standard my HAOS install and see how I go.

so for me I’d imagine the entry should be:

//$192.168.0.15/$media/music /mnt/data/supervisor/media cifs nofail,username=$homeassistant,password=$mysupersecurepassword,iocharset=utf8,x-systemd.after=network-online.target 0 0

I tried something very similar with the startupd add-on but it didn’t work for me, hence ending up here.

//192.168.0.15/media/music /mnt/data/supervisor/media cifs nofail,username=homeassistant,password=mysupersecurepassword,iocharset=utf8,x-systemd.after=network-online.target 0 0

Yeah just remove the $signs
Aaaand reboot :slight_smile:

Awesome, thanks. I’ll give it try. Really appreciate your assistance :+1:

1 Like

TL;DR: Read the bold text.

I’m sorry if this was already mentioned, but I haven’t read the whole 35 replies. Also, I have more experience with HA running on a Raspberry Pi, I didn’t even know about PROXMOX. So, adapt this information according to your needs.

The Home Assistant OS (HASSOS is an outdated name, it can be sometimes abbreviated to HAOS, but it’s better to use the full non-abbreviated name) partition layout includes two pairs of kernel+system partitions. It’s implemented this way because the system can boot from one pair, install an update on the other pair, try to boot from them, and revert back to booting from the older pair in case the new one fails to boot. That’s why you have kernels on sda2 and sda4, and systems on sda3 and sda5.

So, if you manually modify the system on either sda3 or sda5, you’re doomed to have your changes lost on each OS update. User changes can be saved on sda7 (the overlay partition), and those will be preserved across updates. Not sure if changes to /etc/fstab in the overlay partition will work, because I don’t if the system re-reads the fstab after the overlay partition is mounted during the startup. It’s worth trying; if it doesn’t work you can try adding the mount command to some startup script.

What’s the overlay partition? Consider the system partition as the “baseline”, the overlay partition is mounted on top of it. When reading a file, the system first looks at the overlay, and only looks at the base partition if not found in the overlay. When writing a file, the system writes to the overlay (as the base partition is a read-only squashfs). EDIT: Well, what I described in this paragraph is true for some setups, but is probably not correct to HA OS.

Ohh i see what you mean. Yeah the solution could be if i will make that fstab on overlay therefor after update it would stay. Thank you for idea, on next update will go deeper :heart:

I was so looking forward for your idea to work!!! But unfortunately no. The overlay didn’t go over with fstab. There is /etc/host and some other things but fstab is not taking…Will try to find the script on github and make a pull request to merge so that fstab will be taking

I made a pull request. Let’s wait and see. Thank you for pointing me to right direction.
If they will merge this, then everything will be resolved. :slight_smile: