[syslinux] Using Linux as bootloader

Andrew Bobulsky rulerof at gmail.com
Sat Oct 29 18:52:14 PDT 2011


Hello Rajeev,

As Geert mentioned, kexec is what you're looking for.  I've read some
accounts of folks who wrote that they boot a Linux kernel, do some
stuff, and then kexec into a kernel build of GRUB4DOS, chainload
NTLDR, and then into Windows.  Very slick stuff, but nowhere near as
straightforward as rebooting, of course!

SYSLINUX is getting (or has?) some NTFS support, so you could chain
NTLDR or BOOTMGR from there with a kernel build of SYSLINUX.... or
just chainload the hard disk MBR from PXELINUX... or whatever.  Lots
of possibility, but testing is always in order to figure out what
works best.

Windows doesn't (and never has or will, at this rate) support Kexec,
but a fellow named John Stumpo a while back wrote a kernel driver for
XP/2003 that hijacks the shutdown process and implements Kexec() into
it just before resetting the CPU.  It's called WinKexec.  Take a look
at the Reboot.pro thread here for a link to the site and some
discussion: http://reboot.pro/7391/

I tried it a couple years ago, but it's all very finicky, really
depends on hardware and a system's BIOS to work correctly... and
hacking around the eccentricities of various BIOSes is always a lively
topic on this mailing list.  There's no way to know whether or not
what you want to do *will* work (even though it should!) until you try
it.

Best Regards,
Andrew Bobulsky

On Sat, Oct 29, 2011 at 7:37 PM, Geert Stappers <stappers at stappers.nl> wrote:
> On Sat, Oct 29, 2011 at 07:02:48AM -0400, Rajeev Agrawala wrote:
>>
>> Hi,
>> Not sure if this is the right mailing list for this kind of question,
>> but I am looking for a way to boot Linux/other OS from within Linux
>> i.e. once I have booted into Linux may be using pxe or otherwise
>> and then I decide to boot Windows from or Linux from localdisk,
>> then instead of rebooting th machine can I somehow execute the
>> boot sector/grub/ntldr etc from within Linux?
>> Is this at all possible?
>
> What I know about it.
>
> Linux can execute another kernel with 'kexec'[1]
> Syslinux, at pxelinux, can be build as a kernel.
>
> So what I think that might answer the question,
> is to let Linux start a pxelinux kernel.
>
> I haven't done that, so your milage surely varies.
>
>
>> It seems something similar exists for ARM processor only
>> (http://www.embeddedarm.com/software/arm-linux-bootloader.php).
>
> I only can guess that it uses 'kexec'.
>
>
>> Thanks.
>
>
> Groeten
> Geert Stappers
>
> Foot notes
> [1] http://en.wikipedia.org/wiki/Kexec
>
> --
>> And is there a policy on top-posting vs. bottom-posting?
> Yes.
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>



More information about the Syslinux mailing list