RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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.

    Scheduled Pinned Locked Moved Help and Support
    bootboot configbppscriptscript request
    4 Posts 3 Posters 425 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jtkblueJ
      jtkblue
      last edited by jtkblue

      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.

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @jtkblue
        last edited by

        @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.

        jtkblueJ 1 Reply Last reply Reply Quote 0
        • jtkblueJ
          jtkblue @mitu
          last edited by

          @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!

          1 Reply Last reply Reply Quote 0
          • ClydeC
            Clyde
            last edited by Clyde

            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. 😇

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            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.