question

Mike Dorsett avatar image
Mike Dorsett asked

How to change (mount) the diferent volumes on the sd card from command line?

fdisk shows the following volumes on the sd card:

/dev/mmcblk0p1 * 43.7M c Win95 FAT32 (LBA)
/dev/mmcblk0p2 4935M 83 Linux
/dev/mmcblk0p3 4984M 83 Linux
/dev/mmcblk0p4 5135M 83 Linux

The terminal window is logged on to mmcblk0p4 (as far as I can make out). The files I want to look at and run are on either 0p2 or 0p3, how do I get to them from the command lie please? I've tried looking for this command on line, but the search returns nothing useful.

OS Venus 2.72~4 on Rpi 3.



Venus OSRaspberry 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.

4 Answers
Kevin Windrem avatar image
Kevin Windrem answered ·

If the files are on the "other" root partition, you can boot to that version of Venus from Settings/Firmware/Stored backup formware, then that partition will be THE root partition. You can then copy the files to /data then swap back to the Venus version you wish to run. You can then copy from /data to the desired location in the now root partition.

I suggest you set up scripts to automate this using /data/rc.local.

I'm sure you can also manually mount the alternate root partition but I'm not the one to ask how this can be done.

You can also put the SD card into a computer than can read ext4 volumes and copy files using that computer.

Note: root partitions are completely overwritten with Venus OS updates. Any persistent data or programs you wish to survive a software update must be stored in /data. Then startup scripts need to detect the software has been updated and the files copied to their active location and any programs, services or processes reinstalled.

I have a mechanism for doing this that I use for my packages like GuiMods. The package that manages the reinstallation is SetupHelper. There's a sample setup script in SetupHelper and you can also use GuiMods as an example. There's a fair amount of detail in the ReadMe files in the repos.

https://github.com/kwindrem/GuiMods

https://github.com/kwindrem/SetupHelper

I wrote SetupHelper as a generic mechanism for managing my packages. There are simpler ways to reinstall data, programs, services, etc. if you want to roll your own. Just make sure you don't repeat the installation each time the Venus device boots.

2 |3000

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

Mike Dorsett avatar image
Mike Dorsett answered ·

Point seems to be that the ssh console is logged on to a different partition than the Venus OS is actually running from. I'm trying to switch to that partition. The files I want to run are in the partition that Venus is running from - but are not autostarting. I can run them from the partition that ssh connects to, but they don't seem to work propperly from there.

2 |3000

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

Kevin Windrem avatar image
Kevin Windrem answered ·

In Venus OS, the root's home directory is linked to /data/home/root. So what you are seeing there is most likely left over from a previous install. BUT the underlying programs don't currently exist because they were wiped out by a Venus OS update when the active and backup rootfs partitions swapped roles. You need to reinstall those programs, services, utilities, etc. Then the files in ~ will function again.

Here's a brief explanation of the dual rootfs system:

https://mender.io/blog/converting-a-live-device-to-a-robust-dual-rootfs-device

There is only ONE active root partition. The other one is present for Venus OS software updates. The update is written to the "other" root partition so that the executing code isn't disturbed. If the software update was successful, the active and other root partitions swap roles and the system reboots into the newly downloaded Venus OS.


2 |3000

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

Mike Dorsett avatar image
Mike Dorsett answered ·

Yes, but *HOW* do I access other partitions from shell terminal?

1 comment
2 |3000

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

Kevin Windrem avatar image Kevin Windrem commented ·
use the mount command.

mount is fairly cryptic and I can't provide any advice on how best to do this.

Or put the SD card in another computer and do the work there.


Note that simply accessing the other root partition may not be enough. Program installation often adds or modifies files all over the root partition. The best approach is to reinstall the program you are trying to use from scratch.

0 Likes 0 ·