Jump to content

Dual Booting: Difference between revisions

From postmarketOS Wiki
Cvbnm90i (talk | contribs)
Add info about dualbooting with 2nd stage bootloader
Tags: mobile edit mobile web edit
Knuxify (talk | contribs)
No edit summary
 
(39 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{Stub|This huge list could be split up into more specific tutorials. Perhaps include the contents from [[Use PostmarketOS Community pre-built image on your device]]/[[How to use Community pre-built image AND "dualboot" androidOS / postmarketOS]] here?}}
'''for a better guide, see [[Dual Booting/WiP]]'''
Dual Booting, also sometimes called Multiboot, is a process by which you can install multiple operating systems on your device, and select between them when booting it up.
Dual Booting, also sometimes called Multiboot, is a process by which you can install multiple operating systems on your device, and select between them when booting it up.


postmarketOS doesn't currently support dual booting through recovery, yet there are a few ways this can be achieved:
postmarketOS currently might able to dual booting through recovery (kind of)
 
There are a few ways this can be achieved:


* On the [[Nokia N900]], u-boot provides a mechanism to select the OS. See [[Nokia N900#Installation]]
* It is might be possible to use Safestrap recovery mode 's rom solt feature to dual boot , currently [[Motorola Droid 4 (motorola-maserati)]] is only device that utilize Safestrap to boot
* On fastboot devices that have an SD card, it is possible to install postmarketOS on the SD card, and boot through <syntaxhighlight lang="bash" inline>pmbootstrap flasher boot</syntaxhighlight>. This has the advantage of not modifying anything on the phone itself, but a USB cable and a host device (like a computer) are needed to boot the device with this procedure.
* On the [[Nokia N900]] and many device that use uboot (like [[MangoPi MQ-Pro (mangopi-mq-pro)]] , [[Xunlong Orange Pi 3 (xunlong-orangepi3)]]) , u-boot provides a mechanism to select the OS. See [[Nokia N900#Installation]] and [https://u-boot.readthedocs.io/en/latest/usage/cmd/bootmenu.html See bootmenu on uboot doc]
* On (?some?) fastboot devices, the recovery partition holds nothing but a second fastboot boot image. With the postmarketOS boot image flashed to the recovery partition and the root image flashed to either an internal partition or an sdcard, you should be able to dualboot (this works on xiaomi-santoni and samsung-degaswifi)
* One more way with u-boot: [[U-Boot_porting#Implement_multiboot_involving_Android_in_a_device_aport]]
* [https://efidroid.org efidroid] might be used together with postmarketOS, but has not been tested
* On some amlogic device 's uboot . there are a multiboot mode : [[Amlogic#Boot process]]
*Probably multiboot can be implemented with any second stage bootloader, capable of running linux (for example lk2nd)
* On fastboot devices that have an SD card, it is possible to install postmarketOS on the SD card, and boot through <syntaxhighlight lang="bash" inline>pmbootstrap flasher boot</syntaxhighlight>. This has the advantage of not modifying anything on the phone itself, but a USB cable and a host device (like a computer) are needed to boot the device with this procedure. During boot the [[Boot_process#postmarketOS_initramfs|initramfs]] script will automatically search the list of available partitions for the <code>boot</code> and <code>root</code> partitions either by name or by their partition identifier and continue booting when found.
* On most devices, the recovery partition holds a recovery image (or fastboot boot image (on some deivce)) . With the postmarketOS boot image flashed to the recovery partition and the root image flashed to either an internal partition or an sdcard, you will able to dualboot but doing that will make you lose the android recovery mode (this works on xiaomi-santoni and samsung-degaswifi)
* On devices with lk2nd the boot image is loaded from an ext2 boot partition either on EMMC or SD card. Since [[lk2nd]] keeps backwards compatibility with android boot images, you can flash your android boot.img via lk2nd and it will boot that image unless an SD card with postmarketOS is inserted.
* Some uefi Implementation for android phone like ([https://efidroid.org efidroid],[[Renegade Project]]) can be used together with postmarketOS (see [[OnePlus_6_(oneplus-enchilada)/Dual_Booting_and_Custom_Partitioning#Dual booting pmos with other uefi based os (like openbsd , netbsd , freebsd,windows,etc) via Renegade Project | Guides for Dual boot pm os with other uefi based os via Renegade Project (with included guides for booting pm os via Renegade Project) on oneplus 6/6t  but some part of it can be reused on some other device as well.]])
* On uefi / bios based device , grub can be used for dual booting (see [https://wiki.archlinux.org/title/Dual_boot_with_Windows Dual boot with Windows on arch wiki])
* On newer android phone [[Android AB Slots]] can be used for dual boot.
* Probably multiboot can be implemented with any second stage bootloader, capable of running linux (for example [[lk2nd]],grub)
* you can also use stowaways rootfs by putting all files in .stowaways/pmos and forcing that partition to be used as root


=== See also ===
=== See also ===
* [[FAQ#Is_dual_boot_supported | FAQ Entry]]
* [https://postmarketos.org/faq/#is-dual-boot-supported FAQ Entry].
* {{github|421}} for implementation ideas
* {{issue|421|pmbootstrap}} describes potentially how to implement this.
 
* [https://youtube.com/watch?v=pI3ek2C0Ca8 Dual booting pm os and netbsd demo video]
* [[OnePlus_6_(oneplus-enchilada)/Dual_Booting_and_Custom_Partitioning | Gudies for Dual boot pm os on oneplus 6/6t but some part of it can be reused on some other device.]]
[[Category:Technical Reference]]
[[Category:Technical Reference]]
* How to [https://wiki.postmarketos.org/wiki/How_to_use_Community_pre-built_image_AND_%22dualboot%22_androidOS_/_postmarketOS use Community pre-built image AND "dualboot" androidOS / postmarketOS] with the help of TWRP

Latest revision as of 14:03, 1 January 2025

Icon This page could use some expansion. If you'd like to help out, feel free to edit this article!
In particular: This huge list could be split up into more specific tutorials. Perhaps include the contents from Use PostmarketOS Community pre-built image on your device/How to use Community pre-built image AND "dualboot" androidOS / postmarketOS here?

for a better guide, see Dual Booting/WiP

Dual Booting, also sometimes called Multiboot, is a process by which you can install multiple operating systems on your device, and select between them when booting it up.

postmarketOS currently might able to dual booting through recovery (kind of)

There are a few ways this can be achieved:

See also