0

I am currently trying to apply a patch to a read only directory, but I am having some issues, since this is a read only directory I mount the directory with # mount -o remount,rw /var/lib/waydroid/rootfs /mount/point however after doing this when I try cp ./Downloads/patch.so /var/lib/waydroid/rootfs/system/lib64/libui.so I get the message no space left on device, using df -h I am shown that I am using the 100% of that mounted filesystem, how can I make a mounted directory size dynamic so it allows me to copy the patch otherwise how can I increase the "size" of a mounted directory

Any help is appreciated, Regards.

2
  • 2
    You cannot write to a read-only file system nor can you write to a file system that has no space. It's unclear how you expect to accomplish this.
    – Nmath
    Dec 23, 2021 at 3:09
  • Te drive is far away from being full, is not a storge issue and if read only file could not be modify then you wouldn't be able to remount them as rw, is just that the os decided to mount the file system in a way as if it was a partition with no space Dec 23, 2021 at 4:49

1 Answer 1

1

So I managed to solve the issue.

I thought that the system was mounting the directory as a partition when it was actually mounting it as a loop, by running df from a terminal I was able to find that that /var/lib/waydroid/rootfs was being mounted as loop1, after that I needed to figure out where was the image file that was being mounted, so by running sudo losetup /dev/loop1 it showed me that the image was located on /var/lib/waydroid/images/system.img. Then I used dd to resize it, sudo dd if=/dev/zero bs=1MiB of=/path/to/file conv=notrunc oflag=append count=xxx changing of= to the path of the image looked before and count= to the new size I wanted in MB, finally ran sudo losetup -c /dev/loop1 and sudo resize2fs /dev/ to make the new space usable.

once that is done I only needed to copy the file. cp ./Downloads/patch.so /var/lib/waydroid/rootfs/system/lib64/libui.so and now is patched I'll leave this here if is of use to someonelse

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .