-
Notifications
You must be signed in to change notification settings - Fork 908
Upgrading From Versions Prior To 20190119
Do not attempt to update from versions prior to 201901119 automatically! Due to the different partition layout, you'll need to either rewrite the OS image from scratch (recommended) or use the following procedure to manually upgrade your system.
The following procedure WILL remove all your media files, but will preserve configuration, such as WiFi credentials or static IP. Make sure you back up your media files before running these commands!
The following procedure is not guaranteed to succeed, due to temporary partition overlapping!
-
Log in via SSH/putty.
-
Remount your partitions read-write:
mount -o remount,rw / mount -o remount,rw /boot
-
Back up your
/data/etc
folder (config files) and/data/varlib
to yourboot
partition:tar -acf /boot/backup-etc.tar.gz -C /data etc tar -acf /boot/backup-varlib.tar.gz -C /data varlib
-
Download and inject the backup restoring script from motionEyeOS git:
curl https://raw.githubusercontent.com/ccrisan/motioneyeos/bbefaee0423c396b0f0fcf9eabc5001576291658/board/common/overlay/etc/init.d/S02restorebackups -o /etc/init.d/S02restorebackups chmod +x /etc/init.d/S02restorebackups
-
Patch your
S00datapart
init script to allocate the newdata
partition starting at 1GB:sed -ri 's/data_start=(.*)/data_start="2097152"/' /etc/init.d/S00datapart
-
Remove your data partition:
echo -e "d\n3\nw" | fdisk /dev/mmcblk0
-
Reboot and pray:
reboot
-
Recreate the
boot
androot
partitions according to new layout:echo -e "d\n1\nd\n2\nn\np\n1\n2048\n63487\nn\np\n2\n204800\n614399\nt\n1\nc\nw" | fdisk /dev/mmcblk0
-
Run the upgrade command (and pray again):
fwupdate upgrade 20190119 # do not try other versions!
-
Assuming a successful upgrade to 20190119, you can now upgrade to higher versions using usual methods.