OpenWrt Forum Archive

Topic: WGT634u - mtd flash device partitions

The content of this topic has been archived on 11 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I need some help.

I've got a wgt634u and I'm trying to install a custom rootfs & kernel to its flash.  I can flash the kernel fine, but when I come to flash the rootfs I get an out of disk space error.  I checked the size of the mtdblock partitions and they look a little odd, the kernel one (block2) is 3072 (blocks (approx 3mb)) and the rootfs (mtdblock3) one is 4480 (approx 3.9mb).   

From what I can find out from google it seems that mtdblock2 was originallu 1.2mb and mtdblock3 was approx 6mb.  I do not know why or how this has changed.

I realise the the mtd devices are not proper block devices.  I also realise that the partitioning information is fed to the kernel from somewhere (CFE?).  My question is how do I re-partition (or re-set the environment variables) to allow me to modify the partition sizes.  I know this is possible because the OpenWRT port to the wgt634u shows different partition sizes during the kernel boot.

Does anyone know how I can change the size of these partitions.

Thanks

Rob-ix

Sounds like your kernel has the wrong mtd partitions hardcoded.

Hook up a serial console and flash your kernel and rootfs from CFE.

BTW: Next time you hop onto irc to ask questions, you may want to stay around long enough to get your answers. wink

(Last edited by peteru on 28 Sep 2005, 06:21)

Thanks for the information.

I was just about to reply asking where I could find this hardcoding when I thought I should have a good grep around the kernel.  Lo and behold I stumbled over the information, I think next time I'll grep before posting ;-)

For anyone who is interested they are defined in: linux/drivers/mtd/maps/bcm47xx-flash.c (thinking about it this should have fairly obvious to me).

>  BTW: Next time you hop onto irc to ask questions, you may want to stay around long enough to get your answers. wink

My Internet connection was coming through the wgt634u via a USB ADSL modem using a rootfs & kernel supplied by my main machine, unfortunately I managed to completely lose connectivity by playing with iptables on the wgt (ie it lost the internet and the nfs root partition).  Next time I'll a lurk for a few days waiting for a response ;-)

The discussion might have continued from here.