3

I am working on an embedded device. The fstab shows the following info:

<file system> <mount pt>      <type>  <options>         <dump> <pass>
/dev/root       /               ext2    rw,noauto                           0               1
proc            /proc           proc    defaults                            0               0
devpts          /dev/pts        devpts  defaults,gid=5,mode=620             0               0
tmpfs           /tmp            tmpfs   defaults                            0               0
ramfs           /var            ramfs   defaults                            0               0
sys             /sys            sysfs   defaults                            0               0

Running the mount command I get this:

rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
ramfs on /var type ramfs (rw,relatime)

Which means that the root filesystem is read-only.

How can I remount the read-only part as read-write?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Camandros
  • 443
  • 3
  • 5
  • 13

1 Answers1

4

Your root filesystem is squashfs, which saves some flash space by compressing everything, but as a result is read-only. You can not mount it read-write. Instead, you reflash the device with a new squashfs image.

If you need writable storage, you have to partition your flash and mount a second, writable filesystem, of which there are several intended for use on flash storage.

derobert
  • 107,579
  • 20
  • 231
  • 279