How to boot linux kernel without bootloader?

Can we boot into multiple kernels in Android ?

  • I am wondering, like grub can the Android Bootloader give me an option at start up to choose kernel ? I have tried multiple kernels, some focus on speed while some focus on battery life. I would like an option to have multiple kernels so lets say if i want to play a game i would boot into a high performance kernel while if i am traveling i would boot into a power saving UV based kernel.

  • Answer:

    There is no single "Android Bootloader," since the boot process for mobile phones usually ties into the manufacturing process, and various OEMs tend to develop their own custom bootloaders to handle things.  That said, there's no reason a bootloader on an Android device *couldn't* offer the option of booting multiple kernels. Most Android devices already support two different kernel+ramdisk combos -- the default "boot" image and the "recovery" image used for OTA updates.  The recovery image is selected when the running systems reboots after setting a flag for the bootloader requesting it (exact mechanism varies) or if the bootloader can't find a valid normal boot image, or if the system crashes during boot ~5 times in a row.  Most bootloaders also have a special key combo to force booting into recovery mode. Even so, there really shouldn't be a need to have a special "performance" vs "low power" kernel -- Linux provides a great many tunable parameters in this area (the cpufreq governer system, etc) to allow this sort of thing to be adjusted on the fly.  What would probably make more sense would be to develop a control panel for these tunables -- I believe such things may already exist for devices running custom OS builds, but I haven't investigated this. If you *really* want to have an option to boot alternate kernels, but (as is often the case) don't have bootloader source code access, you could investigate using linux's kexec facility to have the running kernel boot a new kernel overtop of itself.

Brian Swetland at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.