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 gomer
    4 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 gomer
    4 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 gomer
    4 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 gomer
    4 years ago
    0 1
  • Thank you Adam, that seems to be exactly what I need.

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

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

Upcoming Linux Foundation Courses

  1. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details
  2. LFS416 Linux Security
    06 Oct » 09 Oct - Washington
    Details
  3. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - 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