Remount squashfs root filessytem read-write

12,124

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.

Share:
12,124

Related videos on Youtube

Camandros
Author by

Camandros

Updated on September 18, 2022

Comments

  • Camandros
    Camandros over 1 year

    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?

    • PSkocik
      PSkocik almost 9 years
      Not sure if you'll be able to remount a squashfs, but you can give it a shot (some filesystems could be intrinsically read-only).
    • Camandros
      Camandros almost 9 years
      Thanks. And how could I do that?