rg35xx-cfw / rg35xx-cfw.github.io

RG35XX Custom Firmware Documentation
419 stars 3 forks source link

`batocera-save-overlay` error #130

Open petertriho opened 4 months ago

petertriho commented 4 months ago

Trying to modify the system using https://wiki.batocera.org/modify_the_system_while_it_s_running

[root@buildroot /userdata/system]# batocera-save-overlay
Making /boot writable...
Creating an overlay file on the /boot filesystem...
1+0 records in
1+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 3.4461 s, 30.4 MB/s
Formating the overlay file in ext4...
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 102400 1k blocks and 25584 inodes
Filesystem UUID: 5849e870-0841-40c7-97f1-28500af5cd8f
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

Mounting the overlay file...
mount: can't setup loop device: Inappropriate ioctl for device

Seems like creating the overlay file works fine (I can see the overlay file at /boot/boot/overlay) but the overlay fails to mount

Changes I'm trying to make is to change the save state/file directories by modifying https://github.com/batocera-linux/batocera.linux/blob/e82c95298dab07be4fb8a6cbe58920529d4d5b42/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py#L197

retroarchConfig['savestate_directory'] = "/userdata/states/"
retroarchConfig['savefile_directory'] = "/userdata/saves/"
acmeplus commented 4 months ago

Unfortunately that does not work, the kernel has issues mounting the overlayfs. batocera-save-overlay works correctly, but mounting does not working. I've been investigating that issue but haven't solved it yet and it's not clear whether it will be solved unless we change the kernel, and that's not trivial.

petertriho commented 4 months ago

Ah ok, that's unfortunate. I don't like how batocera handles save files/states but there doesn't seem like there's another way to split them up and remove the system name so that I can sync saves with my other devices

acmeplus commented 4 months ago

The more cumbersome way to do quick persistent modifications is in linux as follows:

Then the changes will be there when you boot with that card.

In any case I plan to eventually solve the overlay issue, given the kernel version it should be possible to get it to work properly.

petertriho commented 4 months ago

Seems like my device doesn't have /dev/sdh3. Tried both /dev/mmcblk0p3 and /dev/disk/by-label/BATOCERA mounting to /mnt/batocera which worked but trying to mount batocera /tmp/rootfs gives the same error mount: can't setup loop device: Inappropriate ioctl for device