Vera extroot

could you recommend some SSD disk that would not need external power?

Pretty much any modern SSD will operate from the Vera USB port and the added USB adapter consumes very little power. 120 GB SSD usually run about 0.6Watts in read mode; 1.3Watts in write mode. I’m running with a 120 GB (what I had in the parts box) and I’ve had no problems with power.

Another question is around USB logging. Can I still enable that? Or just leave it disabled as it’ll be logging to the external drive anyway.

Still wondering about datamine as well.

I’m considering doing this on my Vera Plus even though I’m not having any memory issues. Amazon has a Transcend 32Gb SSD for $23. I can’t imagine needing more space than this with my Vera. A Sabrent SATA to USB 3.0 adapter is only $9. I’m a bit concerned about handling future Vera firmware updates.

I honestly do not know about datamine. I have only had a short experience with it and decided it was too much for the vera to take back when I tried on a vera lite and never tried again.
On the USB logging, it is part of the prerequisite. I am actually making use of the USB logging mechanism to partition the USB SSD drive so your logs will still be on the 1st partition of the SSD.

It makes things more interesting but at the same time completely prevents you from bricking your Vera since you can always unplug the SSD and get back to your old way of running things. I can if you want provide also a script to backup your user data into the old vera drive which you can activate at your leisure. I have used it and works very well. You can then unplug the SSD, do your upgrade, risking bricking the vera, and then extroot again. I might actually do something different: create a extroot specific upgrade script so you don’t go through the vera convoluted process. One thing is certain though, it is much safer than running a firmware update directly on the vera.

1 Like

It would be great to have this script. How do backups and restoring backups work? I am assuming you would have to be extroot to restore a backup that was made when extroot. For example, say you completely broke your system and wanted to factory reset and restore a backup that was made when extroot. Could you factory reset, extroot, and then restore a backup? What would happen if you tried to restore a backup that was made when extroot but the system is not extroot?

did the beta upgrade on my vera plus with about 150 devices + plugins and 70 scenes and it worked fine while it was exrooted

1 Like

Thanks for the report. This is what I expect if you don’t run a factory reset.

First post updated with a new zip file containing 2 new scripts for the vera plus:

  1. Upgrade to 7.0.29 extroot-upgrade.sh. If the script is not executable sure to make it executable by running
    chmod +x extroot-upgrade.sh
  2. backup_to_vera.sh which will backup your configuration and user data to the vera embedded flash drive.

It is also down below:

extroot-utils.zip (1.5 KB)

If you use the veramods as well, you want to rerun it as this firmware upgrade overwrite the vera mods.

Did somebody got this working on a Vera Edge? Tried it, as far as i could see no errors but no changes as well.

I suspect that the vera-edge is loading the usb driver in slightly different order. There could also be a dependance on the USB/SATA cable which has a chip in it requiring a driver in the kernel which may load too late during the boot process. I have experimented with this and could suggest to try using the uuid of the drive instead of the drive’s address in fstab.

If you could do me a favor and do this:

echo “src/gz base2 Index of /barrier_breaker/14.07/ramips/mt7620a/packages/base/” >> /etc/opkg.conf

echo “src/gz packages2 Index of /barrier_breaker/14.07/ramips/mt7620a/packages/packages/” >> /etc/opkg.conf

opkg update

opkg install blkid

blkid /dev/sda2

Copy the uuid and then do this:

nano /config/fstab

go to the line where you see

"option device ‘/dev/sda2’ "

and replace it with

"option uuid ‘paste your uuid here’ "

then reboot

reboot

It has worked for me when I had a finicky SSD. Please let me know if this works as I may make it a script.

1 Like

The fstab file has some sections in my case. Should all "option device ‘/dev/sda2’ " be replaced?
I can see one under “config swap” and in 2 “config mount” sections.

(zip file is a txt file, just rename to .txt)
fstab.zip (1.3 KB)

I would say yes. I could’t open your zip file but you are not supposed to have two. If you can paste here as text it would be helpful. You likely have one too many.

This is the current file:

config global ‘automount’
option from_fstab ‘0’
option anon_mount ‘0’

config global ‘autoswap’
option from_fstab ‘0’
option anon_swap ‘0’

config swap
option enabled ‘0’
option device ‘/dev/sda2’

config swap

config mount
option enabled ‘1’
option enabled_fdisk ‘1’
option enabled_mkfs ‘1’
option label ‘mios’
option fssize ‘512’
option fsck_days ‘30’
option fsck_mounts ‘10’
option target ‘/’
option device ‘/dev/sda2’
option fstype ‘ext4’
option options ‘rw,sync’
option enabled_fsck ‘0’

config swap

config mount
option enabled ‘1’
option target ‘/tmp/log/cmh’
option fstype ‘ext3’
option options ‘rw,noatime,nodiratime,errors=continue,data=ordered’
option enabled_fdisk ‘1’
option enabled_mkfs ‘1’
option enabled_fsck ‘1’
option label ‘mios’
option fssize ‘512’
option fsck_days ‘30’
option fsck_mounts ‘10’
option device ‘/dev/sda1’
config swap

config mount
option target ‘/mnt/mmcblk*’
option enabled ‘1’

config swap

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config mount

config mount

config mount

config mount

config mount

ok I see the problem now. Somehow on the edge, the sda2 partition is treated as a swap file partition even though it is not enabled, it delays the loading pivoting of the partition.

Can you delete these lines and reboot?

config swap
option enabled ‘0’
option device ‘/dev/sda2’

config swap

I presume you mean only those particulary lines? Or all “config swap” sections? Even the empty ones?

And then how to proceed? Run the script again?

Delete only these 4 lines. Others are not being used. Save by pushing ctrl +o then ctrl + x and reboot.

I deleted those 4 lines and rebooted. In between i had to restore a backup because the “usb logging” kept being disabled. But now it is enabled again with my SSD connected.

A bit off topic:
You problably remembered my “reboot battle” from another post. Since i connected the SSD, the unit has been rock solid, no sudden reboots anymore. CPU load is averaging around 0.40 (15min). Also the memory is very stable and does not drop anymore.

No idea what exactly has happened here…will keep monitoring the unit.

That said, i still would like to have some extra storage space on the unit. How can i now proceed to extroot the unit?

I am not quite sure why your USB logging keeps getting disabled… This is not good. It would mean that the vera while booting does not see the /dev/sda1 partition which is strange.
With USB logging enabled, can you go back to the /etc/config/fstab and still delete these 4 lines and then run the extroot script again? This should work without these 4 lines.

Not sure what I am doing wrong, but this is what I am seeing. Any help would be appreciated.

I am on a VP with 1.7.4453 -

root@MiOS_50017625:/lib# ./extroot-upgrade.sh
-ash: root@MiOS_50017625:/lib#: not found
root@MiOS_50017625:/lib# downloading firmware
-ash: downloading: not found
root@MiOS_50017625:/lib# Connecting to dl.mios.com (65.49.38.9:80)
-ash: syntax error: unexpected “(”
root@MiOS_50017625:/lib# mt7621_Luup_ui7-1.7. 100% |********************************************************************************************
***| 9796k 0:00:00 ETA
-ash: 9796k: not found
-ash: mt7621_Luup_ui7-1.7.: not found
-ash: backup_to_vera.sh: not found
root@MiOS_50017625:/lib# mounting firmware image
-ash: mounting: not found
root@MiOS_50017625:/lib# rm: remove ‘firmware/etc/cmh/user_data.json.lzo’? y
-ash: rm:: not found
root@MiOS_50017625:/lib# rm: can’t remove ‘firmware/etc/cmh/user_data.json.lzo’: Read-only file system

rm: remove ‘firmware/etc/TZ’? y
rm: can’t remove ‘firmware/etc/TZ’: Read-only file system
-ash: rm:: not found
root@MiOS_50017625:/lib# upgrade start
-ash: upgrade: not found
root@MiOS_50017625:/lib# OKcp: invalid option – u
-ash: OKcp:: not found
root@MiOS_50017625:/lib# BusyBox v1.19.4 (2016-11-29 21:02:24 EET) multi-call binary.
-ash: syntax error: unexpected “(”
root@MiOS_50017625:/lib#
root@MiOS_50017625:/lib# Usage: cp [OPTIONS] SOURCE DEST
-ash: Usage:: not found
root@MiOS_50017625:/lib#
root@MiOS_50017625:/lib# Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY
-ash: syntax error: unexpected “(”
root@MiOS_50017625:/lib#
root@MiOS_50017625:/lib# -a Same as -dpR
-ash: -a: not found
root@MiOS_50017625:/lib# -R,-r Recurse
-ash: -R,-r: not found
root@MiOS_50017625:/lib# -d,-P Preserve symlinks (default if -R)
-ash: syntax error: unexpected “(”
root@MiOS_50017625:/lib# -L Follow all symlinks
-ash: -L: not found
root@MiOS_50017625:/lib# -H Follow symlinks on command line
-ash: -H: not found
root@MiOS_50017625:/lib# -p Preserve file attributes if possible
-ash: -p: not found
root@MiOS_50017625:/lib# -f Overwrite
-ash: -f: not found
root@MiOS_50017625:/lib# -i Prompt before overwrite
-ash: -i: not found
root@MiOS_50017625:/lib# -l,-s Create (sym)links
-ash: syntax error: unexpected “(”
root@MiOS_50017625:/lib#
root@MiOS_50017625:/lib# Now deleting temporary files
-ash: Now: not found
root@MiOS_50017625:/lib# Starting luup engine
-ash: Starting: not found
root@MiOS_50017625:/lib# Mission Complete!
-ash: Mission: not found