It is quite a big version jump. I would have updated to an early release 6 first, then maybe to 6.29 or so and then to 6.41.
For now, just netinstall the device. When it is a complicated config, try "keep configuration". When not, configure it again from the defaults.
totally agree
i will add when you make that jumps allways get routerboot upgraded as well
on 5.26 be sure you have upgraded the routerboot that comes with that version
as 5.26 dates from 2013-Sep-04 15:01 i suggest 6.x version of that similar date like 6.7 and reboot
then
upgrade routerboot and reboot
then
upgradte to 6.29, reboot and upgrade routerboot and reboot
then
upgrade to 6.40.8, reboot and upgrade routerboot and reboot
then upgrade to 6.42.1 reboot and upgrade routerboot and reboot