switchboot.sh
#1
Hi All,

I am not much of a programmer, but I think I can finally contribute something to this great community. Cool

From my point of view, the most eagerly anticipated feature of the Pinephone must be its future ability to boot into several operating systems without having to swap memory cards. Some users already reported that their phone cases started crack from repeatedly opening and closing them - which proves the point that the current design is not ideal.

Two months ago, the development of the "Pineloader" was announced, promising OS selection via a menu at startup, but it has not become available yet. This is why I decided to put my own effort into a solution (Did someone say I am allowed to tinker with my phone?).

The result is a script file called switchboot.sh which is available for download here:

http://www.99computing.co.uk/download/Pi...irlist.php

It assumes that you have Ubuntu Touch in your phone's internal memory and Mobian on an SD card (more operating systems may follow later).

All you need to do is copy this file into both OSs. For simplicity and easy access, I suggest

/home/phablet  in the "userdata" partition of Ubuntu (you can use the Jumpdrive mode by pressing Volume Up at boot time until the LED turns green, then connect to your pc) and

/home/mobian  in the "rootfs" partition of Mobian (use your PC card reader)

Now you can open the terminal app (recommended: open a fresh instance if you have been doing other things before) and type in

sudo bash switchboot.sh

Your phone will take about one minute to shut down and restart in the opposite OS. That's it, plain and simple.

If you want to restart your phone without switching, just do it the normal way.

What is the secret?

With some experimenting, I found out that Mobian will not start if it cannot find the file Image.gz in its boot partition. This does not even have to be deleted. I just renamed it so that Mobian wil not recognise it. When the phone fails to boot from the SD card, it reverts back to its internal memory. If you later want to use the SD card again, the file just needs to be renamed back. The the script simply does the renaming for me.

I have several plans how it can be improved and possibly made into an app. But please bear with me, I am on a learning curve. Blush

In the meantime, please feel free to download the file, to comment here and tinker with it yourself. All I ask is share your findings so that we can work on it together.

Have fun!
  Reply


Messages In This Thread
switchboot.sh - by Zweitaktmotor - 07-11-2020, 05:37 AM
RE: switchboot.sh - by hiimtye - 07-12-2020, 01:15 PM
RE: switchboot.sh - by Zweitaktmotor - 07-12-2020, 03:33 PM
RE: switchboot.sh - by hiimtye - 07-12-2020, 03:36 PM
RE: switchboot.sh - by dcinoz - 11-26-2020, 05:39 AM
RE: switchboot.sh - by moodroid - 12-22-2020, 08:12 AM
RE: switchboot.sh - by dcinoz - 12-22-2020, 04:20 PM
RE: switchboot.sh - by dcinoz - 06-16-2021, 05:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)