• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 424 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.
  • J
    jtkblue
    last edited by jtkblue 16 Oct 2020, 21:13

    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.

    M 1 Reply Last reply 17 Oct 2020, 03:03 Reply Quote 0
    • M
      mitu Global Moderator @jtkblue
      last edited by 17 Oct 2020, 03:03

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

      J 1 Reply Last reply 17 Oct 2020, 03:04 Reply Quote 0
      • J
        jtkblue @mitu
        last edited by 17 Oct 2020, 03:04

        @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
        • C
          Clyde
          last edited by Clyde 17 Oct 2020, 19:50

          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
          4 out of 4
          • First post
            4/4
            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.

            This community forum collects and processes your personal information.
            consent.not_received