Score:0

Trying to patch a read only directory

fr flag

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.

Nmath avatar
ng flag
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.
Miguel Garcia avatar
fr flag
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
Score:0
fr flag

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

diyism avatar
cn flag
"e2fsck -f /var/lib/waydroid/images/system.img" lost, ref: https://gist.github.com/diyism/70ae5719d42db173e0da0742f2728cda#file-waydroid-on-debian-x64-and-armbian-focal-pine64-txt-L186
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.