Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

need to make my boot config partition unable to be edited by the system.



  • does anybody here have a clue on how to make that one simple little annoying little file be uneditable by my system?

    There's this script I want to test out, but it keeps adding a "#" to my dtoverlay=vc4-fkms-v3d. This makes it unable to deploy the emulationstation thingy.

    my boot config: https://pastebin.com/G6zP9sXy

    (if i can also get somebody to help me make a script which removes the # at boot, it'll work exactly the way I want to.) linux newbie over here.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    been struggling with this back and forth all day.


  • Global Moderator

    @jtkblue Making the /boot partition inaccessible will break system upgrades for the Linux kernel, it's not a proper solution to your issue.
    The config.txt is read by the bootloader, before the system starts properly, so any script that will change it on boot will run after the bootloader has read the file, making the changes to have no effect.



  • @mitu i'm good now, I fixed the script on my side, I'm making a post about my finished project right now!

    Thanks for your help today!



  • Just for the record, this command removes write permissions from the file:

    sudo chmod -w /boot/config.txt
    

    Restore them only for the owner (the default) with u+w instead of -w.

    But note that any script that runs with admin rights can change the file nonetheless.

    edit: Ah, I noticed the logical flaw in this. The file is owned by the admin user root and it is already only editable by the owner. So removing w wouldn't make any difference in this case. 😇



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.