-+ if ((rootfs_start % ar7_mtd_info->erasesize) > 0)
-+ rootfs_start += ar7_mtd_info->erasesize - (rootfs_start % ar7_mtd_info->erasesize);
++ if ((rootfs_start % ar7_mtd_info->erasesize) > 0) {
++ ar7_partinfo[p - 2].offset += ar7_mtd_info->erasesize - (rootfs_start % ar7_mtd_info->erasesize);
++ ar7_partinfo[p - 2].size -= ar7_mtd_info->erasesize - (rootfs_start % ar7_mtd_info->erasesize);
++ }