Posted: Thu Nov 13, 2008 22:05 Post subject: Resizing partition 3 vs webupgrade
It appears that the webupgrade .bin, like the .image file, includes the partition table so that doing a webupgrade will cause any partition table edits (resizing) to get nuked.
Theoretically, if the start sector of partition 3 remains the same, the filesystem should be mountable. Unfortunately, partition 4 won't start in the same place so the license info won't be valid on boot.
Also theoretically, one should be able to restore the partition table after a webupgrade and be ok all around. I have not tried this yet.
I would think it would be undesirable for the webupgrade process to overwrite the partition table. Ideally, it would only write to partitions 1 and 2 only.
Short version: Don't do a webupgrade if you've resized your part3.
The webupgrade does in fact overwrite the partition table, rendering partitions 3 and 4 bad if they've been altered.
I found that on reboot, the /usr/local/ filesystem did mount, and retained its larger size, but the nvram dir was gone and dd-wrt thus lost all its settings. Partition 4's contents were bogus (obviously) so a registered version would be stuck. I used a public image for this test so I can't say that for 100% sure.
When I restored the partition table, by dd'ing the first sector from a backup file, I was able to boot again and had nvram back and all my settings.
The long version of the story is that there is no point in trying to do a webupgrade if you've resized partition 3. You might as well apply the new .image file since you're going to have to restore the patition table anyway.
IMO, the webupgrade process should *not* write the first sector (512 bytes). That prevents you from making partition changes via firmware updates, but you're pretty much stuck with partitions 1 and 2 as-is anyway since growing them would destroy the data in partition 3 (eg nvram).