boot script

  • Hi, maybe someone can help me. I'm running LibreELEC, Raspbian and Lakka on a Raspberry Pi 4. I found a boot script on Instructables to change the boot partition from the command line.

    In Raspbian it works perfectly. The steps are:

    1. Just log in with root privileges or do : sudo nano /bin/bootin, <-- Okay
    2. Copy paste my script, press Ctrl+X to save and exit. <-- no way, /bin/ is a read-only folder
    3. The do: sudo chmod +x /bin/bootin to make it executable. <-- why even try but i've tried to put the script on the root folder but that also doesn't do anything
    4. You will have to do this in both partitions (raspbian and kodi). One partition is in plain / path, and the other should be inside /media/root0/bin. So basically in the end you will have 2 bootin files...One in /bin and one in /media/root0/bin <-- did this in raspian but when in LibreELEC this file does not show
    5. Then type bootin to see the commands. <-- error bootin not found
    6. Instructions how to adapt the script with your partition numbers are in the script. Make sure you get your partition numbers right !! <-- im sure this is correct


    Hope someone has an idea

  • Hello! I have some ideas, but since I do not have your system/OS, I don't have an answer...


    1) Yes, LibreELEC's system directories are essentially read-only. One way around this would be to make an exact copy/backup of your memory card and then edit that copy on another system (e.g. "Windows" via a memory-card reader) or a "live" linux CD or via a USB/memory-card reader mounted to the RPi4. Then reboot using this newly edited memory-card.

    2) I looked at the "BOOTIN" script. I don't see the absolute necessity that the script be in "/bin" per se. It is not needed at boot time. It just needs to be in your PATH env (or current directory via "./") and executable. I.e., you run the script, it modifies the noobs.conf file as indicated (for Rasp. or Kodi/LibreELEC boot pointers) and then you reboot the RPi.

    3) Do you actually have NOOBS installed? I ask since the script is modifying the noobs.conf file which is only going to be processed if you have NOOBS as the base installer for your LibreELEC, Raspbian and Lakka [?].

  • Whenever I need to update config.txt . I wind up running:


    Code
    1. mount -o remount,rw /flash

    then I go in and


    Code
    1. nano /flash/config.txt


    Once that's done it works. Maybe the same will work for you but use /bin instead of flash?