0

I need to remount my linux filesystem from ro to rw. But nothing gonna work. I will be very grateful if someone help me.

# mount
/dev/mtdblock3 on / type squashfs (ro)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
devpts on /dev/pts type devpts (rw)
none on /tmp/netslink type ramfs (rw)

# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / squashfs ro 0 0
proc /proc proc rw 0 0
ramfs /tmp ramfs rw 0 0
devpts /dev/pts devpts rw 0 0
none /tmp/netslink ramfs rw 0 0

I tried this:

# mount -o rw,remount -t squashfs /dev/root /
mount: Mounting /dev/root on / failed: Permission denied

And I tried this:

# mount -o rw,remount -t squashfs /dev/mtdblock3 /
Command "mount -o rw,remount -t squashfs /dev/mtdblock3 /" is forbidden!

And just this:

# mount -o rw,remount /
Can't find / in /etc/fstab

/etc/fstab:

# cat /etc/fstab
proc /proc proc defaults 0 0
ramfs /tmp ramfs defaults 0 0
devpts /dev/pts devpts defaults 0 0

The system doesn't have the root user, but have the root group and I do it by the user which consists in the root group, is it not enough?

What is the right solution? Thanks!

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175

1 Answers1

7

SquashFS is a read-only file system.

https://en.wikipedia.org/wiki/SquashFS

You could create a new filesystem and copy the contents of the squashfs to that. To do that, you need to:

  1. Backup your data from the old filesystem
  2. Start from a Live-CD/USB
  3. Make a new Filesystem on /dev/mtdblock3
  4. Copy your data to the new filesystem

Instead of booting from a Live-CD you could create the new filesystem on another partition/drive.

You have then to make sure your OS uses that new filesystem. Typically this is achieved by changing the corresponding line in /etc/fstab, but in your case this seems to be not the case. You have to find out where the root filesystem is mounted and change it there.

  1. Reboot
tastytea
  • 420
  • 2
  • 8