I’m using Lakka nightly (21205) on an old Dell e1505 laptop (64-bit 2-core Intel T7400 cpu, 2GB ram, ATI X1400 gpu).
Lakka automatically mounts other partitions it finds on the HDD of the system on which it is running. While this is useful for loading roms when Lakka is running from a USB stick, it leaves all those HD partitions available and accessible without authentication through Samba under the Roms folder.
I’m running my Lakka system only on my own home network, and there is nothing of consequence stored on the other HD partitions, [I]but that might not be true for all users.
[/I]Imagine playing games from USB Lakka on your work/school laptop while at a coffee shop. A nefarious fellow patron can now access all of your HD content as a simple windows share.
It doesn’t seem wise to have potential security hole like that.
Upon booting the Lakka system, I’d like to automatically unmount other partitions it finds. I thought using “autostart.sh” would be ideal for that.
According to the OpenELEC wiki, [FONT=courier new]/storage/.config/autostart.sh should run when the system is started.
However, systemctl said “retroarch-autostart” was disabled (emphasis mine) [/FONT]
lakka:~ # systemctl status retroarch-autostart.service
● retroarch-autostart.service - RetroArch user autostart script
Loaded: loaded (/usr/lib/systemd/system/retroarch-autostart.service; [I][B]disabled[/B][/I]; vendor preset: enabled)
Active: active (exited) since Wed 2015-12-02 10:45:42 PST; 3min 44s ago
Main PID: 400 (code=exited, status=2)
CGroup: /system.slice/retroarch-autostart.service
It being disabled might be an artifact of installing from a nightly release. So, I enabled it…
lakka:~ # systemctl enable retroarch-autostart.service
Created symlink from /storage/.config/system.d/retroarch.service.wants/retroarch-autostart.service to /usr/lib/systemd/system/retroarch-autostart.service.
lakka:~ # systemctl status retroarch-autostart.service
● retroarch-autostart.service - RetroArch user autostart script
Loaded: loaded (/usr/lib/systemd/system/retroarch-autostart.service; [I][B]enabled[/B][/I]; vendor preset: enabled)
Active: active (exited) since Wed 2015-12-02 10:45:42 PST; 8min ago
Main PID: 400 (code=exited, status=2)
CGroup: /system.slice/retroarch-autostart.service
After rebooting, “autostart.sh” now runs. But I can’t use it to [FONT=courier new]umount, probably because other partitions are not mounted yet (emphasis mine)… [/FONT]
lakka:~ # systemctl status retroarch-autostart.service
● retroarch-autostart.service - RetroArch user autostart script
Loaded: loaded (/usr/lib/systemd/system/retroarch-autostart.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2015-12-02 11:31:05 PST; 1min 57s ago
Process: 370 ExecStart=/bin/sh -c . /etc/profile; exec /bin/sh /storage/.config/autostart.sh (code=exited, status=0/SUCCESS)
Main PID: 370 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/retroarch-autostart.service
Dec 02 11:31:05 lakka systemd[1]: Starting RetroArch user autostart script...
Dec 02 11:31:05 lakka systemd[1]: Started RetroArch user autostart script.
[I][B]Dec 02 11:31:05 lakka sh[370]: umount: can't umount /dev/sda2: Invalid argument[/B][/I]
Does anyone have advice on either [ol] [li]preventing Lakka from automatically mounting other HD partitions[/li][li]unmounting other HD partitions after booting (but not via autostart.sh)[/li][/ol]
(As an aside, other tests indicate that /storage/ is still a read-only file system at the time in the boot process when “autostart.sh” is reached.)
Dec 02 11:08:38 lakka sh[329]: /storage/.config/autostart.sh: line 14: can't create testfile.txt: Read-only file system