Hello everybody,
today I installed the community version of the ssh addon. Everything went fine, I can login using ssh, but even though I deactivated safe mode, I seem to be caught in some kind of chroot jail. I cannot see the whole file system etc.
On the physical console, this jail can be left by simply typing "login", without having to provide any credentials.
From the ssh login, however, this does not work. Using the physical console is of course not an option on a headless raspberry pi.
Regards
Thomas
#community ssh addon chroot jail
1 messages · Page 1 of 1 (latest)
Is there any way to get out of it?
No, there is no reason/use to do that either?
What would you like to do that makes you want to break out of the scope?
Well, on my virtual machine I did a small fix to a addon source (daly bms in esphome). I just edited the .cpp file. Unfortunately I am not familiar with docker and the whole build process.
Anyway, I do not feel comfortable using/owning a computer I do not have full control of
🤷♂️ I think you misunderstand how it works. There is nothing to control on the OS level
the OS level is a embedded operating system, meaning its read-only
I think you are approaching your reasoning from a normal OS perspective, which this all is not.
(and really... you should not have to edit files like that 😬 Have you raised an issue to get it fixed?)
Yes, indeed. Somebody else also did so in April and even provided a fix himself. His PR has not been merged yet - 3 monts later.
Can you point me to the PR?
Give me some minutes, I have to look it up
the original problem was described in 3086
the fix is in 3388
3452 is the issue I added yesterday, regarding the addressing problem (0x80 vs 0x40)
Hmz ok, the PR has still an unresolved build error
so it can't be merged.
left a comment on the PR
so, how you can approach this (alternatively)
is adding daly_bms as a custom component to your device
Oh, that's a pity. I would very much like to fix all this myself, but to do so, I would need a "cookbook" about all the involved (build-)processes.
That removes the need for patching "things"
Could you point me to a description on how to do this?
I am an experienced C++ programmer but did not find too much docs about the build process
https://esphome.io/components/external_components.html
Add this to your esphome device config:
external_components:
- source: github://pr#3388
components: [ daly_bms ]
That will make your device use the component from that PR directly
Which would not work of course if there is still a build error in the pr
Its a styling thing
so, not an error in terms of wrong code
Worth a shot, right? 😄
You can also copy the existing daly_bms component
ah, ok. Can I also do a fork and point the source to that fork? I have to change the addressing because the (hard coded) 0x80 does not work with my bms
and make the adjustments yourself
You can make a local folder
copy the existing daly_bms folder from esphome components into it
add:
external_components:
- source:
path: /my_path_to_the_folder_with_my_custom_components
and modify the component in there
where does this folder have to be? And where should I copy it from ?
Both ESPHome and Home Assistant have been set up to allow overrides or extension of anything.
Where you like? E.g., /config/esphome/my_components
that would make it sit next to the device yaml file, right?
And I take it from the git checkout or from somewhere in the existing installation?
yeah git, or fetch it from the source tarball of the latest release: https://github.com/esphome/esphome/archive/refs/tags/2022.6.2.zip
Ok, I'll give that a try. If I'm stuck, I will come back to you. Thanks a lot
Ok, seems to work, thank you so much! One more question: I would now like to take a backup from my (virtual) test system and restore it to my Pi. Do I have to install the addons on the Pi first or will they be installed automagically when I restore the backup?
If you take a full backup, you can also restore the full backup
it will automatically handle all add-ons as well
cool, thanks
Anyway, It will take some time for me to get comfortable with having a system I do not have full control of. That's why I do not use iPhones in the first place....
🤷♂️ Its actually, honestly, really comfortable not to worry about tons of things.
But... if time learns you are not into containers
you always switch to another installation methods 🤷♂️
But would recommend to give it chance 😄
But would recommend to give it chance
Yes, I definitely will, even more since the other installation methods are strongly deprecated all over the web site.
🤷♂️ We have 4 supported installation methods on our website. Non of the installations methods listed on our website are deprecated
95% of our user-base uses the OS or Container based installation methods
Ok, I got the impression they are - at least a little bit. Anyway, for the time being I will stick to OS. When I have much spare time (which is unlikely to happen in the near future) I will test the others
Ok, I got the impression they are - at least a little bit.
Nope, there is only personal preference. We recommend the OS, of course, as it provides the full experience we have to offer (and really, is the easiest to operate)