hi,
i'm putting together a new system and am wondering whether the new feature that's been implemented in recent kernels is supported by coreboot. I'm thinking of the mkernel switching feature, where kernel A can start the boot process, read a hibernate image written by kernel B, and resume into the hibernated state -- so that, in effect, you've done a kind of kernel-pivot & end up with kernel B as your kernel. What I'd like is to have my system running as usual, then hibernate, and on resume, have the coreboot bios look for the image and boot directly into it. That would cut a huge chunk of time out of my resume.
Anyway just wondering if that's possible or not. Thanks for your help!
matt
I think this is possible, given someone who is motivated :-)
ron
On Fri, 2008-10-17 at 16:55 -0700, ron minnich wrote:
I think this is possible, given someone who is motivated :-)
can you give me a sense of what "motivation" entails? where i should i start digging to try to figure this out? thanks,
matt
ron
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Fri, Oct 17, 2008 at 7:33 PM, Matt Price matt.price@utoronto.ca wrote:
On Fri, 2008-10-17 at 16:55 -0700, ron minnich wrote:
I think this is possible, given someone who is motivated :-)
can you give me a sense of what "motivation" entails? where i should i start digging to try to figure this out? thanks,
Where is the suspended kernel saved? What does kernel A do to boot Kernel B? Basic kexec?
we need those three answers first.
ron
On Sat, 2008-10-18 at 21:27 -0700, ron minnich wrote:
On Fri, Oct 17, 2008 at 7:33 PM, Matt Price matt.price@utoronto.ca wrote:
On Fri, 2008-10-17 at 16:55 -0700, ron minnich wrote:
I think this is possible, given someone who is motivated :-)
can you give me a sense of what "motivation" entails? where i should i start digging to try to figure this out? thanks,
Where is the suspended kernel saved? What does kernel A do to boot Kernel B? Basic kexec?
we need those three answers first.
here's what i think so far: - the suspened image is saved to a swap partition, whose location needs to be specified within the initramfs which will be part of the payload. i don't know if that's a problem or not; presumably one would set it up outside of any LVM, RAID, or more complex arrangement. - as i understand it (and i'm not sure about this) kernels since 2.6.26 can use a hibernation image written by another kernel. So when there is a valid suspended image in the right place, kernel A simply activates the normal resume sequence, and we automatically end up with kernel B at the end of the resume process. - one would need some other process for booting kernel B in cases where there's no good hibernation image -- like on the system's first boot! -- i guess one could use kexec in an initramfs script. I haven't put this system together yet so I don't know whether there might be driver issues using kexec.
i guess one could start with a proof-of-concept minimal kernel in qemu & see if things work? i'm not sure how well the in-kernel suspend works with qemu, though -- i've always used the "save state" option there...
anyway does that sound about right?
matt
ron
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Mon, Oct 20, 2008 at 8:42 AM, Matt Price matt.price@utoronto.ca wrote:
- the suspened image is saved to a swap partition, whose location needs
to be specified within the initramfs which will be part of the payload. i don't know if that's a problem or not; presumably one would set it up outside of any LVM, RAID, or more complex arrangement.
yes, if you're going to have an LVM or RAID backing it, you're probably going to want linux to boot it.
But if it is simple, you could extend FILO to know what do to.
- as i understand it (and i'm not sure about this) kernels since 2.6.26
can use a hibernation image written by another kernel. So when there is a valid suspended image in the right place, kernel A simply activates the normal resume sequence, and we automatically end up with kernel B at the end of the resume process.
Then just put linux in flash. I expect this system uses kexec.
- one would need some other process for booting kernel B in cases where
there's no good hibernation image -- like on the system's first boot! -- i guess one could use kexec in an initramfs script. I haven't put this system together yet so I don't know whether there might be driver issues using kexec.
I have used kexec a lot. I don't see what driver issues could come up, as long as Kernel A has the right drivers built in.
i guess one could start with a proof-of-concept minimal kernel in qemu & see if things work? i'm not sure how well the in-kernel suspend works with qemu, though -- i've always used the "save state" option there...
qemu should be a fine testbed for this idea.
I hope you try it out -- it sounds neat.
ron