Page 1 of 1
brew for linux
Posted: 17 Aug 2021, 20:46
by Cafsenra
I managed to install brew for linux on tnas. However I had to mount /mnt/md0/Users/.linuxbrew in /home/linuxbrew/.linuxbrew (default brew location) with the command mount bind. Nevertheless when I restart the server I lose this until I mount again the folder. I tried to setup fstab to do this on system startup but I couldn’t do this due, I suspect, raid limitations. Can anyone assist me on how to make permanent the command mount bind?
the corresponding mtab entry is:
/dev/mapper/vg0-lv0 /home/linuxbrew/.linuxbrew btrfs rw,relatime,space_cache=v2,metadata_ratio=50,subvolid=5,subvol=/User/.linuxbrew 0 0
Thank you!

Re: brew for linux
Posted: 17 Aug 2021, 21:19
by TMA
Hello! You need to write the mount script in the corresponding configuration file to add the system auto-start item
Re: brew for linux
Posted: 17 Aug 2021, 23:56
by Cafsenra
Thank you for your reply
I guess you are talking about create a script to /etc/init.d or /etc/rc.d directories. I am not very familiar with these startup scripts (think that they should be LSB complient). Any chance to get help on this? The command I want to startup is:
mount --bind /mnt/md0/User/.linuxbrew/ /home/linuxbrew/.linuxbrew/
Re: brew for linux
Posted: 18 Aug 2021, 00:42
by Cafsenra
I remembered that there is the option to add the command to the crontab with the option @reboot that apparently sove this issue. What I did is to add a new file to cron.d and insert a line @reboot /bin/mount --bind /mnt/md0/User/.linuxbrew/ /home/linuxbrew/.linuxbrew/
It works but not sure if it is the right solution for this case. Any help is welcome

Re: brew for linux
Posted: 18 Aug 2021, 01:03
by Cafsenra
For all
advanced users that might want to have brew on their TNAS the trick is to link (ln -s) the git and the ter_curl to /usr/bin/git and /usr/bin/curl. Mount the default homebrew folder as instructed before (you will have to create the empty folder first). Logged as admin, create a .curlrc with the path to tnas certificate: cacert /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. As admin execute: export HOMEBREW_CURLRC=1; git config --system http.sslCAInfo /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. Finally, as admin run the install brew command script present in homebrew site. Cheers
