I want to change some files on my router. Firstly I can change everything in /var, but I want to change /etc/fstab. When I try to change it, I get an error message that says the file system is read only.

BusyBox inside the router has limited commands, so I got a BusyBox binary for MIPs, and uploaded it by tftp:

tftp -g -r busybox-mips my.i.p.addr

I can now use full commands (/var/tmp/busybox-mips command).

There is no ROM inside the router (SDRAM), nor is there any other partition. It must be related with BusyBox.

# /var/tmp/busybox-mips df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1344      1344         0 100% /

# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw,nodiratime)
ramfs on /var type ramfs (rw)
# 

Model: 
        Airties 5021
Processor:
        BCM6332KFBG
        HS1037 P12
        994981 N1
Memory: 
        M12L64164A-7T (SDRAM)
        ANM1P02HL 1028
link|improve this question
What is the output of mount ? – Joel F Aug 26 '11 at 12:50
Joel i updated my quiestion. sorry for delay, i cant post comments from my office. – kursadyo Aug 26 '11 at 21:28
feedback

migrated from stackoverflow.com Aug 26 '11 at 19:24

This question came from our site for professional and enthusiast programmers.

1 Answer

Squashfs is immutable. To change /etc/fstab you would need to make a new FS image for your router on a linux box. To get that on the router you do a "firmware upgrade".

You could also look in /proc/mounts to check whether mount is lying to you, as it only reads /etc/mtab. But the latter is in most distros a symbolic link.

link|improve this answer
hi Turbo J, I have checked /proc/mounts. It seems mountdisplays only /etc/mtab. I am confused in the "Frimware Upgrade" part. I think if you upgrade the firmware, then the system will still be readonly, won't it? So in my opinion I have to upgrade/change the FS. Do you know how to do that?? – kursadyo Sep 5 '11 at 9:01
Even wikipedia knows unsquashfs and mksquashfs. Try Google next time. – Turbo J Sep 6 '11 at 0:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.