question

martin-liska avatar image
martin-liska asked

large venus 2.92 only allows local terminal shell access

hello community !
I do have serious issues with Venus 2.92 large images (both raspberry 2 and raspberry 4,
and also using 16 and 32GB SDcards from different suppliers).
After burning the flashcard as described using the wic.gz (which gets unzipped automatically when balena-etching , the raspi would boot fine, get its IP address (connected via ethernet cable) and is pingable from the LAN and WAN.

When using the browser to start the GUI vial LAN, a message pops up telling me that i should
first enable the LAN interface access ... so, the GUI process on the raspi obviously works, but the default setting is not to allow LAN access.
Fine, i thought, lets try ssh to the device ... failed, 'connection refused' => i.e. there is 'noone' listening on port 22.

I then connected HDMI monitor and usb mouse & kbd to the raspberry and am presented with the Victron logo and the root shell prompt ("#").
First thing i noticed is that the file system is not using all the flash card space.
Normally, one can fix this using raspi-config - yet, there is no 'raspi-config' command available :-(

Second thing i noticed is that the root filesystem is mounted read-only ... is this a feature or a bug ?
Because i found that /etc/fstab indeed has the 'ro' option for the '/' filesystem.
next step was to re-mount the root file system to 'read-write' and change the fstab entry for root to rw.
i also followed some community advise to create a 'ssh' file in the root folder of the drive to allow ssh access.

After reboot of the raspi, i get the same behaviour: no web-gui and no ssh to the device.
So, after some more browsing, googling, 'find' and 'grep' on the now 'rw' - mounted filesystem, i found a 'settings.xml' file somewhere in /opt/victronenergy, where i nano'ed the configs to allow LAN access and also 'service' access level.

After that, and another reboot, i was able to access the web-gui.
First thing appeared was the error message, that the storage system is 'corrupt' ... ok, i thought, that may be because i had changed the root file ssytem to be mounted 'rw' - so, i changed that fstab back to be 'ro' - reboot ... same errormessage.
This was when i tried the same using a raspbi4 and another sdcard - you never know, dont you ;-) ?
Believe it or not, with the (now all-new and smaller) SD-card and raspi4, i got the exact same issues as with the Raspi3 (raspberry2-large image) ... indeed, this was raising my eyebrowes, especially as i did not find similar reports from other users in the web (not just here in the forum ...).

Now, after getting the Raspi4 to work with the GUI, i changed the time (timezone left to UTC) and IP address to manual - and some other stuff.

Next reboot i had to experience, that the operating system settings made through the GUI were just gone ... again time was 1st january 1970 and the IP address on DHCP (while some Victron-specific settings interestingly remained persistent ...) Just for completeness, i tried this iwth root filesystem mounted 'rw' as well as 'ro' - no difference in behaviour .

To translate this long story into a short question: Does anyone else expereince such issues as well ?
and: what did i possibly do wrong when setting up that Raspberry with VenusOS-large-raspberry-2.92 ?

Thanks for any insight or help ,
sincerely, Martin

Raspberry Pi
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

8 Answers
Kevin Windrem avatar image
Kevin Windrem answered ·

Many of your questions and recommended procedures are discussed here:

https://www.victronenergy.com/live/ccgx:root_access

There is also a command to remount root for write access if you don't use resize2fs.sh:

/opt/victronenergy/swupdate-scripts/remount-rw.sh

It can be tricky getting a Raaspberry PI running Venus OS up and running without a local display and keyboard.

Avoid editing files like fstab and settings.xml. There are other ways to do what you are attempting with these edits.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bathnm avatar image
bathnm answered ·

You are certainly seeing some very strange behaviour. However to answe your questions….

On a freshly installed system, connected to LAN you should be able to point your browser at Venus.local and gain access to the GUI remotely. From here you can do everything you need to do.

The root file system is setup as RO as it is an embedded operating system and writing files to the root file system is not recommended. Likewise modifying any file in the root file system is not sensible as it will not persist across a firmware updates. A firmware update overrights the entire root file system with a new one. Any file that must persist an upgrade should be stored under /data

If you do not have LAN access and only Wi-Fi, then using Bluetooth and the VictronConnect application will allow you to connect to the system and setup the Wi-Fi. Then you can access the GUI using your web browser by browsing to Venus.local.

To expand the file system to use the entire space, again you are correct raspi-config will not work as it is not part of the system. The RPI is running a Victron unix distribution called VenusOS which is designed as an embedded OS with just the Victron software installed. To expand the file system you need to use the tool /opt/victronenergy/swupdate-scripts/resize2fs.sh


Do you have strange behaviour, too difficult based on your description to know. So some good resource might be

https://www.victronenergy.com/live/ccgx:root_access

https://github.com/victronenergy/venus/wiki/raspberrypi-install-venus-image

Having reviewed these if you still have issues post again, this should work out the box, but that depends on what your definition of work means and if you are using the system in the way it is designed and built. I did a fresh install for some testing and following the initial boot, connected via Bluetooth using the VictronConnect app, configured the Wi-Fi and went to Venus.local in my browser, gui was presented and went to the settings menu and system. Set SSH for LAN and a password and ssh’d into the box without any issue. All done in less than 5 minutes from inserting the fresh SDCard.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

martin-liska avatar image
martin-liska answered ·

Thanks for quick responses - i am going to re-do as described and start off with the bluetooth - initial - config option. will keep you posted upon success . just one question - just for my understanding - how can the manual IP address setting through the Venus GUI be persistent when the root file system is moutned R/O ? maybe you can share the link to some flowchart, how the boot process of the VenusOS on Raspi is working, i.e. which files are read / written at which stage of the boot and (GUI) configuration process ? thanks a million !!

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bathnm avatar image
bathnm answered ·

@Martin Liska You will need to deduce that flow chart yourself. Nothing exists in the public domain, as I referred earlier this is an embedded OS based on Linux and while there is capability for open access to the underlying components of the system the documentation is not readily available as it would lead to a support night mare. It is really only for advanced users that know what they are doing. While it is based on linux, VenusOS is not a full unix based distribution and should not be seen as such.

The network interfaces are managed by unix deamon called conman, this is heavily dependant on dbus, as is the rest of the system. The persistent data in dbus on it's startup is populated by data that is stored in the /data partition.

The system is setup so that the root file system is only needed to be read. At runtime stuff is either copied into a /tmpfs if it needs to be written to and the system is configured to look for those files accordingly or they are stored in the persistent partition /data

On firmware update an entirely new root file system is created. It will pick up persisiatnt configuration from what has been stored in the data partition.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

martin-liska avatar image
martin-liska answered ·

Update: after new try with Raspi4 large image, i am able to use victronConnect app on Android to detect and connect to the Raspberry. There, the only setting i can change is the 'Networking' - which sucessfully took the new IP address and also survived a reboot. root partition is r/o. using the gui (to IP address) is successful, and i can set the required changes (like ssh enable, root password and node-red support). only thing still exists is the "Hardware problem detected #42 Alarm - Storage is corrupt on this device" - any idea howto get rid of this ?

next step is to connect some Multiplus-2 using the MK3-Dongle and a MPPT-150/100 charger (via bluetooth , since i dont have a CAN-HAT for the Raspberry yet).

Many thanks again for quick response and explanation about the embedded Venus-into-Linux system !

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bathnm avatar image
bathnm answered ·

@Martin Liska Have you done a search on the community forum or google for that error message?

maybe take a look at this link

There is an issue with the /data partition. I suspect an fsck of that partition will fix the issue.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

martin-liska avatar image
martin-liska answered ·

hello @Bathnm - thanks for the hint - indeed, the /data partition seems to be mounted r/o as when trying to use node-red, it throws an errormessage that it cannot store any flows, etc. what i do not really get (maybe just not educated enough on linux ...) is, that there is a mountpoint /data/log , which is writeable, but there is o visible mountpoint /data , although it is listed in fstab and also a ls -al /data produces output - see attached. of course, unmounting /data/log or /data does not work, since the "Device or Resource busy" message is displayed and i dont have an idea howto 'stop' the VenusOS embedded system.

what i am also scratching my head about is that the 'mmcblk0p4' partition, where the /data mountpoint is supposed to point to, is not mentioned in 'dmesg' output and does not even seem to exist on the disk:
:~# fdisk -l
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors
486192 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 * 64,0,1 724,2,22 8192 92757 84566 41.2M c Win95 FAT32 (LBA)
/dev/mmcblk0p2 768,0,1 1023,63,32 98304 16044031 15945728 7786M 83 Linux
/dev/mmcblk0p3 1023,63,32 1023,63,32 16044032 31115263 15071232 7359M 83 Linux

~# ls -al /dev/mm*
brw-rw---- 1 root disk 179, 0 Jan 1 1970 /dev/mmcblk0
brw-rw---- 1 root disk 179, 1 Jan 1 1970 /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 2 Jan 1 1970 /dev/mmcblk0p2
brw-rw---- 1 root disk 179, 3 Jan 1 1970 /dev/mmcblk0p3

Having said that, i am going to remove the sdcard and try to fschk the partition on another linux system, then see where i am getting with that. What still makes me raise my eyebrowes is that this seems to happen with any SD-card i am etching the .wic.rc file to ... will keep posting - thanks again for quick responses.

VenusOS-Raspi4-dmesg_20230106-01.txtVenusOS-Raspi4-show-fs_20230106-01.txt


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bathnm avatar image
bathnm answered ·
I'd create a new SDCard from the original Victron Image. Looks like something has not worked correctly.
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.