User Tools

Site Tools


ccgx:root_access

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
ccgx:root_access [2019-12-23 16:30] – [Hooks to install/run own code at boot] mvaderccgx:root_access [2020-05-28 15:49] – [Available disk space] mvader
Line 26: Line 26:
 https://github.com/victronenergy/venus/wiki/swupdate-project https://github.com/victronenergy/venus/wiki/swupdate-project
  
-==== Available disk space ==== +==== Partitions and available disk space ====
-See https://github.com/victronenergy/venus/wiki/machines.+
  
-And see ''/opt/victronenergy/swupdate/resize2fs.sh'', as explained [[https://github.com/victronenergy/meta-victronenergy/commit/9110beead383c22523512da992e2572c176febef|in this commit]]Source file for the script is [[https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-support/swupdate-scripts/files/resize2fs.sh|here]].+On a GX Device, there are three partitions that matter: 
 + 
 +  * rootfs partition one 
 +  * rootfs partition two 
 +  * the data partition 
 + 
 +Only one of the two rootfs partitions will be in use. When doing a firmware update, it will be installed on the other, and the subsequent reboot will reboot the device onto that other partition. 
 + 
 +The data partition is not touched during a firmware update, except maybe some migration scripts that run at boot. 
 + 
 +When doing modifications, make sure both the data partition and the rootfs do not run out of space. We don't design or test for that situation. 
 + 
 +With regards to the size of the data partition, thats easy to check using the ''df'' utility. But not so for the rootfs: 
 + 
 +After logging into a GX device, and checking the free disk space on the rootfs(! thats not the data partition), you might get a bit disappointed at first. Don't worry too much, by design there will always be only 5% of free space. 
 + 
 +The reason behind is that a firmware update replaces the full filesystem on the rootfs (as an image). And its then not expanded to the full available space of the partition reserved for the rootfs. 
 + 
 +To see the full space, run ''/opt/victronenergy/swupdate/resize2fs.sh''. It will expand the filesystem to use all of the available space. 
 + 
 +For actual available diskspace on our GX Devicessee https://github.com/victronenergy/venus/wiki/machines. 
 + 
 +To see what resize2fs.sh is doing, without having to log into your Venus OS, see it also [[https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-support/swupdate-scripts/files/resize2fs.sh|here]]
 + 
 +Note that a firmware update will replace all of the rootfs, as also explained above. Which implies that you'll need to run resize2fs.sh again after doing a firmware update.
  
 ==== 1. Set access level to Superuser ==== ==== 1. Set access level to Superuser ====
ccgx/root_access.txt · Last modified: 2024-02-09 17:06 by dfaber

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki