Reboot to a different image via command line

There are 7 replies in this Thread which was already clicked 632 times. The last Post () by slugger.

  • Hello everyone,


    I have my enigma2 box set up with 4 images.


    All works well and I can reboot into any of them via a multiboot image selector.


    Is there a way to reboot to any image via the command line?


    In other words, can I telnet to my box and manually issue a command to boot into a specific image?


    Thank you in advance.




    Steve

  • It depends upon the naming of the files in /boot, but this script works on a Zgemma H9 Twin.


    The number in line 4 corresponds to which partition it is booting to, so this script is booting to partition 3.


    #!/bin/bash

    init 4

    cd /boot

    cp STARTUP_LINUX_3 STARTUP

    reboot

    exit 0


  • Thanks for the info but it doesn't work.


    There are no STARTUP files inside the boot folder.

  • What files are in the boot folder
    I probably have same as Willo3092 on zgemmah9combo
    and different ones on gigablue

    Capture.PNG


    Capture1.PNG

  • Thanks to your script after a few tests I succeeded with some modifications:

    Code
    init 4
    mkdir /tmp/start
    mount /dev/block/by-name/bootoptions /tmp/start
    cp /tmp/start/STARTUP_LINUX_2 /tmp/start/STARTUP
    reboot
    exit 0


    The above code uses STARTUP_LINUX_2 and switches permanently to my second image, my box has the following options to switch to:


    STARTUP_ANDROID

    STARTUP_ANDROID_DISABLE_LINUXSE

    STARTUP_LINUX_1

    STARTUP_LINUX_2

    STARTUP_LINUX_3

    STARTUP_LINUX_4

    STARTUP_ONCE

    STARTUP_RECOVERY

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!