The way I did update (and a pretty safe way to do it) was:
first of all copy the versions 5.12.17, 6.2.18, 6.2.25 and 6.3.17 to your device.
1. update to 5.12.17 twice to merge your partitions. ( Marshmellow ROMS don't fit on small partitions)
when you flashed it 2x your partition has...