Linux.com

Home Learn Linux Linux Answers Boot linux from linux
Answers
  • Am I missing something? You already have a kernel in memory, and now you want to over-write it in memory with another kernel?
    If that's the case, you would probably need to write a kernel module that will function as a boot loader in vertain conditions. I don't know if a way to do what you want from user-space. There may already be such a kernel module out there, but I'm not aware of one. I suspect you'll have to write your own.

    Answered by Adam
    3 years ago
    0 1
  • Am I missing something? You already have a kernel in memory, and now you want to over-write it in memory with another kernel?
    If that's the case, you would probably need to write a kernel module that will function as a boot loader in vertain conditions. I don't know if a way to do what you want from user-space. There may already be such a kernel module out there, but I'm not aware of one. I suspect you'll have to write your own.

    Answered by Adam
    3 years ago
    0 1
  • I happened to be reading something on the coreboot site, and found mention of a set of tools that might do the trick for you, actually. I've never used them myself, but I may be doing so this weekend using qemu.

    If your kernel had the CONFIG_KEXEC=Y option set when you built it, then there is a tool that you can run as root from within user-space to boot directly into a new kernel. It simulates the last step in a tradition boot loader. Look for kexec and kboot.

    Also, if you look at the coreboot project (open source BIOS replacement) ther have an option to embed an entire Linux kernel as the BIOS payload instead of a traditional BIOS and bootloader combo. this is how I heard about kexec / kboot. This is probably EXACTLY what you want.

    Answered by Adam
    3 years ago
    0 1
  • I happened to be reading something on the coreboot site, and found mention of a set of tools that might do the trick for you, actually. I've never used them myself, but I may be doing so this weekend using qemu.

    If your kernel had the CONFIG_KEXEC=Y option set when you built it, then there is a tool that you can run as root from within user-space to boot directly into a new kernel. It simulates the last step in a tradition boot loader. Look for kexec and kboot.

    Also, if you look at the coreboot project (open source BIOS replacement) ther have an option to embed an entire Linux kernel as the BIOS payload instead of a traditional BIOS and bootloader combo. this is how I heard about kexec / kboot. This is probably EXACTLY what you want.

    Answered by Adam
    3 years ago
    0 1
  • Thank you Adam, that seems to be exactly what I need.

    Answered by Xavier Janin
    3 years ago
    0 0
  • Thank you Adam, that seems to be exactly what I need.

    Answered by Xavier Janin
    3 years ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Root

Upcoming Training Courses

  1. LF411 Embedded Linux Development
    24 Jun » 28 Jun - Silicon Valley
    Details
  2. LF331 Developing Linux Device Drivers
    05 Aug » 09 Aug - Virtual
    Details
  3. LF320 Linux Kernel Internals and Debugging
    12 Aug » 16 Aug - Virtual
    Details

View All Upcoming Courses

Community Answers - Search


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board