Resizing partition 3 vs webupgrade

Post new topic   Reply to topic    DD-WRT Forum Index -> X86 based Hardware
Author Message
llowrey
DD-WRT Novice


Joined: 30 Nov 2006
Posts: 19

PostPosted: Thu Nov 13, 2008 22:05    Post subject: Resizing partition 3 vs webupgrade Reply with quote
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.

Please correct me if I'm wrong.
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Fri Nov 14, 2008 10:04    Post subject: Reply with quote
just give it a try
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
llowrey
DD-WRT Novice


Joined: 30 Nov 2006
Posts: 19

PostPosted: Sat Nov 15, 2008 0:46    Post subject: Reply with quote
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).
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> X86 based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum