SysUpgrade with extroot overlay

I want to do a SysUpgrade of my EspressoBin Board actually runninng 18.06.01 to the latest 18.06.02, but I have made an extroot overlay.
Do will I to plan a fresh new install from scratch, instead of a magic sysupgrade with luci ?
What about upgrade with sysupgrade or with luci when using an overlay for extroot ?
Is it supported actually or is it impossible in anyway ?

For my searches, the only howto from the official wiki is a link to -> https://wiki.mbirth.de/know-how/software/openwrt/sysupgrade-with-extroot.html
In my case, I made my OpenWrt 18.06.01 from the dump of the official ext4-sd for the MVEBU EspressoBin Board, and then I have added a second ext4 partiton on my SD Card wich was confgured as an extroot overlay.
It was the only way to get a full working, crash less resistant, OpenWRT.
I mainly inspired from https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

Any precautions to take care and/or any advice will be verry welcome, because I have some few BOX already installed.

I have the same setup and I think I consulted the same link when I was trying to find a way to upgrade the image. I have performed a couple of upgrades without any issues with the following procedure.

  1. backup your installed packages opkg list-installed | cut -f 1 -d ' ' > /root/installed_packages.txt
  2. Flash normally, keeping settings.
  3. The router will boot with all settings, without the extra packages. Setup internet access if it is not working already.
  4. Install packages to access the usb drive opkg install block-mount kmod-fs-ext4 kmod-usb-storage e2fsprogs kmod-usb-ohci kmod-usb-uhci fdisk
  5. Format the usb drive and copy overlay mount /dev/sda1 /mnt ; tar -C /overlay -cvf - . | tar -C /mnt -xf - ; umount /mnt
  6. Fix fstab and reboot
  7. If all goes well it will boot with overlay of usb as root.
  8. Install extra packages and optionally add old overlay to fstab.
2 Likes

@trendy
Thanks, I will test this today.

1 Like

thanks again,
It works fine, but we still need, on the espressobin board, a real upgrade because we have to make "from scratch" install instead of "in place" upgrade".
For remote management and easy update like standard OpenWRT devices...
The overlay look also a case of complicate upgrade and cannot be made without some tweaks.

If you have many devices to manage, perhaps a custom build that mounts your external file system rather than the default of using the "split" of the boot media.

Do you want to say that I may use a custom build, and lost all kmod support, only for a partition map change ?
Or is there any other technical solution I do not know, to get this possible ?

A partition-map change is integral with the kernel and DTB, yes.

Another question looking right in the subject; is the rootfs_data partition naming possible to silently and fastly usable for an external USB/SD/HD partition shema ?
If I define a partition map with BOOT and ROOTFS (from the OpenWRT standard system image) and I just add the rest of the support with an empty partition named rootfs_data, will this third partition being used as the rootfs_data overlay default ?