d3m3zs Posted October 15, 2023 Share Posted October 15, 2023 (edited) Hi! I switched from OMV to Unraid, continue setup process and did not get a few things: 1. Why after each reboot my mc and htop looks like default, all previous settings just disappeared. And if for mc I can see that settings present in path before reboot /root/.config/mc/ (probably I have to copy them to somewhere), but for htop folder /root/.config/htop/ is empty. For example I setup everything in htop But it looks like stored somewhere else. 2. I pasted a few files (for fast access from console) in folder /usr/local/bin/ But again after reboot they disappear. All these manipulations I made as root. Thanks in advance. Edited October 15, 2023 by d3m3zs Quote Link to comment
itimpi Posted October 15, 2023 Share Posted October 15, 2023 Those locations are only in RAM (like most of Unraid OS) which is why they do not survive a reboot. You need to add something to the Unraid boot sequence (such as entries in the config/go file) to re-instate any such changes after the Unraid OS has been loaded into RAM. Quote Link to comment
d3m3zs Posted October 15, 2023 Author Share Posted October 15, 2023 4 minutes ago, itimpi said: Those locations are only in RAM (like most of Unraid OS) which is why they do not survive a reboot. You need to add something to the Unraid boot sequence (such as entries in the config/go file) to re-instate any such changes after the Unraid OS has been loaded into RAM. Do we have plugin for this? Which folders are RAM folders? I see probably 1 option - write script that will copy all my files and settings to RAM folders after each reboot. Quote Link to comment
itimpi Posted October 15, 2023 Share Posted October 15, 2023 Just now, d3m3zs said: Do we have plugin for this? Which folders are RAM folders? I see probably 1 option - write script that will copy all my files and settings to RAM folders after each reboot. in principle anything that is not under /boot or /mnt is normally RAM based. you may find this section of the online documentation accessible via the ‘Manual’ link at the bottom of the GUI or the DOCS link at the top of each forum page helps with understanding this. The Unraid OS->Manual section in particular covers most features of the current Unraid release. Quote Link to comment
d3m3zs Posted October 16, 2023 Author Share Posted October 16, 2023 On 10/16/2023 at 12:15 AM, itimpi said: in principle anything that is not under /boot or /mnt is normally RAM based. It is interesting, because I pasted in root/.ssh/ my file 'authorized_keys' from previous server and it is successfully saved after each reboot. Ah, probably because I found the same file in path /boot/config/ssh/root/ So, the question is - what is the best place where I have to store my files and copy after each start? And also I don`t understand why even .bash_history and other very useful files don`t stored somewhere as default behavior? In my point of view it would be a good practice. Quote Link to comment
itimpi Posted October 16, 2023 Share Posted October 16, 2023 16 minutes ago, d3m3zs said: It is interesting, because I pasted in root/.ssh/ my file 'authorized_keys' from previous server and it is successfully saved after each reboot. That is because special action is taken for that case. I think that the /boot location is linked to the /root one as part of the Unraid boot process so they are effectively the same. You should store your own files on the flash drive under the /boot location. Exactly where under there is up to you. Quote Link to comment
d3m3zs Posted October 16, 2023 Author Share Posted October 16, 2023 Just now, itimpi said: That is because special action is taken for that case. I think that the /boot location is linked to the /root one so they are effectively the same. I did not find answer, probably is only my issue and nobody cares about this logic. Is it possible to somehow reach devs or create a ticket for such useful and easy feature, maybe create a plugin to store your folders between reboots? Quote Link to comment
d3m3zs Posted October 17, 2023 Author Share Posted October 17, 2023 #!/bin/bash source_dir="/boot/config/my_custom_scripts/" yes | cp -rf "$source_dir"telegramCodeHTML.sh "/usr/local/bin/" & yes | cp -rf "$source_dir"ncdu "/usr/local/bin/" & yes | cp -rf "$source_dir"btop "/usr/local/bin/" & yes | cp -rf "$source_dir"HDSentinel "/usr/local/bin/" & yes | cp -rf "$source_dir"mc/* "/root/.config/mc/" & yes | cp -rf "$source_dir"htop/* "/root/.config/htop/" & yes | cp -rf "$source_dir"btop_settings/* "/root/.config/btop/" & wait echo "🎉 scripts are copied" chmod +x /usr/local/bin/telegramCodeHTML.sh chmod +x /usr/local/bin/ncdu chmod +x /usr/local/bin/btop chmod +x /usr/local/bin/HDSentinel telegramCodeHTML.sh "✅ Scripts" Wrote such script and scheduled "At Startup of Array". Checked - works. Hope /boot/config/my_custom_scripts/ is ok place. Will add one more and schedule "At Stopping Array" Quote Link to comment
d3m3zs Posted October 17, 2023 Author Share Posted October 17, 2023 (edited) And unfortunately all these lines dont update settings, first need to execute each tool and then copy config. yes | cp -rf "$source_dir"mc/* "/root/.config/mc/" & yes | cp -rf "$source_dir"htop/* "/root/.config/htop/" & yes | cp -rf "$source_dir"btop_settings/* "/root/.config/btop/" & So, updated to: #!/bin/bash source_dir="/boot/config/my_custom_scripts/" yes | cp -rf "$source_dir"telegramCodeHTML.sh "/usr/local/bin/" & yes | cp -rf "$source_dir"ncdu "/usr/local/bin/" & yes | cp -rf "$source_dir"btop "/usr/local/bin/" & yes | cp -rf "$source_dir"HDSentinel "/usr/local/bin/" & wait chmod +x /usr/local/bin/btop # execute mc & btop & htop & # just in case sleep 5 # close pkill mc pkill btop pkill htop yes | cp -rf "$source_dir"mc/* "/root/.config/mc/" & yes | cp -rf "$source_dir"htop/* "/root/.config/htop/" & yes | cp -rf "$source_dir"btop_settings/* "/root/.config/btop/" & wait echo "🎉 scripts are copied" chmod +x /usr/local/bin/telegramCodeHTML.sh chmod +x /usr/local/bin/ncdu chmod +x /usr/local/bin/HDSentinel telegramCodeHTML.sh "✅ my_configs➡️ system " Edited October 17, 2023 by d3m3zs Quote Link to comment
L0k1 Posted October 17, 2023 Share Posted October 17, 2023 Unraid runs from RAM the files in /root won't be saved. Instead of copying them back and forth i'd just softlink to them, e.g. put; ln -s /boot/custom/.config /root/.config In your /boot/config/go file. This behavior is by design, to minimize reading/writing to the boot flash drive. Quote Link to comment
d3m3zs Posted October 17, 2023 Author Share Posted October 17, 2023 3 minutes ago, L0k1 said: Unraid runs from RAM the files in /root won't be saved. Instead of copying them back and forth i'd just softlink to them, e.g. put; ln -s /boot/custom/.config /root/.config In your /boot/config/go file. This behavior is by design, to minimize reading/writing to the boot flash drive. I am not sure how ln -s will be working in my case? It will be working only with telegramCodeHTML.sh ncdu HDSentinel But settings for mc, btop, htop anyway should be copied. Or I am wrong? Quote Link to comment
L0k1 Posted October 17, 2023 Share Posted October 17, 2023 (edited) "ln -s /boot/custom/.config /root/.config" was just an example, you'd have to create the /boot/custom/.config directory and put your files there. You can also do something like; ln -s /boot/config/my_custom_scripts/telegramCodeHTML.sh /usr/local/bin/ Edited October 17, 2023 by L0k1 Quote Link to comment
d3m3zs Posted October 17, 2023 Author Share Posted October 17, 2023 21 minutes ago, L0k1 said: "ln -s /boot/custom/.config /root/.config" was just an example, you'd have to create the /boot/custom/.config directory and put your files there. You can also do something like; ln -s /boot/config/my_custom_scripts/telegramCodeHTML.sh /usr/local/bin/ but with such softlink I will be exactly reading from boot area each time and you just mentioned that I have to minimize reading/writing to the boot flash drive. So, that looks like no difference if I just copy FROM boot to another folder or your option with creating softlink, I just read once per session and your approach - read many times. Quote Link to comment
L0k1 Posted October 17, 2023 Share Posted October 17, 2023 Some read/writes are going to happen (lots of writing is the thing you really want to avoid to prolong the life of the USB). I wouldn't worry about a few small config files. You can do it either way but copying everything back and forth everytime you make a change is too much of a PITA if you ask me. Quote Link to comment
d3m3zs Posted October 17, 2023 Author Share Posted October 17, 2023 1 minute ago, L0k1 said: Some read/writes are going to happen (lots of writing is the thing you really want to avoid to prolong the life of the USB). I wouldn't worry about a few small config files. You can do it either way but copying everything back and forth everytime you make a change is too much of a PITA if you ask me. Got it, thanks, no I prepared all configs and will be only copy from boot each reboot and nothing write back. Quote Link to comment
Masterwishx Posted March 28 Share Posted March 28 On 10/18/2023 at 12:10 AM, d3m3zs said: /usr/local/bin/HDSentinel Do you have kernel trap on 6.12.9 with HDSentinel? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.