PDA

Bekijk de volledige versie : mtd2 (rootfs) partition



phedny
10-05-2005, 14:34
[admin@WL500g root]$ cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "pmon"
mtd1: 003a0000 00010000 "linux"
mtd2: 002f53b4 00010000 "rootfs"
mtd3: 00010000 00002000 "nvram"
mtd4: 00010000 00010000 "config"

mtd0 (pmon) -> bootloader
mtd1 (linux) -> firmware
mtd3 (nvram) -> nvram variables
mtd4 (config) -> flashfs

Only mtd2 (rootfs) I can't seem to find out what it's used for. Also, why does it have this "strange" size? If it isn't being used by current firmware, is it safe to use it?

Oleg
10-05-2005, 16:27
It's used by firmware. Namely root filesystem (squashfs). Needs to be there to be mounted.

phedny
10-05-2005, 16:46
It's used by firmware. Namely root filesystem (squashfs). Needs to be there to be mounted.
I was studying the firmware upload code (working on Download-and-Upgrade button for webadmin for quick updating) and that seemed to only write to the 'linux' partition.

#define sys_upgrade(image) eval("write", image, "/dev/mtd/1")

Is mtd2 starting at an offset from mtd1 equal to the difference in size of those partitions?

That is, is mtd2 laying within mtd1?

Oleg
10-05-2005, 16:49
yes, mtd2 size and position detemined automatically during boot.
and it's entirely inside the mtd1.