I'm dealing with an embedded device running Linux. The manufacturers of this device have it set up so that it loads the root filesystem as readonly.
From /etc/mtab:
rootfs / rootfs rw 0 0
/dev/root / squashfs ro,relatime 0 0
This means that I'm unable to modify any files within /etc, such as to add a new user.
I've tried remounting the root directory:
mount -o remount,rw -t squashfs /dev/root /
but I just get an error
mount: cannot remount block device /dev/root read-write, is write-protected
I looked up this error and people were saying to use blockdev. The system doesn't have blockdev installed, so I cross compiled it and copied it across. Then I ran
blockdev --setrw rootfs
but again I got an error:
blockdev: cannot open rootfs: No such file or directory
Is it possible to make /etc writeable if it's not already? I have root access to the system, but I'm not able to access the filesystem 'offline', all changes have to be done via Bash commands.