July 8, 2010

Boot linux from linux

Hello everyone,

 

I'm working on an embedded system, and to manage the system update I need to boot a linux from another (used as bootloader). How can I do that ?

 

Xavier.

Thank you Adam, that seems to be exactly what I need.

Thank you Adam, that seems to be exactly what I need.

Like  (0 likes)

Thank you Adam, that seems to be exactly what I need.

Thank you Adam, that seems to be exactly what I need.

Like  (0 likes)

I happened to be reading something on the coreboot site, and found mention of...

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.

Like  (0 likes)

I happened to be reading something on the coreboot site, and found mention of...

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.

Like  (0 likes)

Am I missing something? You already have a kernel in memory, and now you want...

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.

Like  (0 likes)

Am I missing something? You already have a kernel in memory, and now you want...

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.

Like  (0 likes)
Click Here!