Is it possible to kexec to the syslinux interface, thus bypassing the hw initialization? What would be the kexec command? kexec -l ??? --append=??? --initrd=??? TIA Jorge Almeida
On Wed, Feb 08, 2017 at 06:33:35AM -0800, Jorge Almeida via Syslinux wrote:> Is it possible to kexec to the syslinux interface, thus bypassing the > hw initialization? > What would be the kexec command? > > kexec -l ??? --append=??? --initrd=??? >Question seen, but not understood. To me is syslinux a bootloader, started by (Hardware) BootROM and it starts a Linux kernel. So now the question that I see / read as: I have a running Linux kernel (or simular environment) and want to start with kexec the Syslinux bootloader (to start Linux) @Original Poster Please elaborate the question. Groeten Geert Stappers -- Leven en laten leven
On Wed, Feb 8, 2017 at 1:04 PM, Geert Stappers via Syslinux <syslinux at zytor.com> wrote:> On Wed, Feb 08, 2017 at 06:33:35AM -0800, Jorge Almeida via Syslinux wrote: >> Is it possible to kexec to the syslinux interface, thus bypassing the >> hw initialization? >> What would be the kexec command? >> >> kexec -l ??? --append=??? --initrd=??? >> >> So now the question that I see / read as: > > I have a running Linux kernel (or simular environment) > and want to start with kexec the Syslinux bootloader (to start Linux) > > > @Original Poster > Please elaborate the question. >You understood correctly. From a running linux we can use kexec to start another linux, rather than rebooting. Documentation about kexec is not plentiful, but I read that kexec can launch a binary, not necessarily a linux kernel, for example, Windows (which I don't care about). Sorry I don't have the reference. I was wondering whether kexec could "launch" the boot loader (which can do other things besides launching linux, for example, it can do chainloading...; of course, if all we want from the boot loader is loading another linux, we might as well do it from the current linux) Thanks Jorge Almeida
> Is it possible to kexec to the syslinux interface, thus bypassing the > hw initialization? > What would be the kexec command? > > kexec -l ??? --append=??? --initrd=??? > > TIA > > Jorge AlmeidaFWIW... Other bootloaders include (or can generate) a binary file that behaves as a (linux) kernel. Such binary file(s) can potentially be used for chainloading and/or with kexec. This is _not_ the case with Syslinux. I would suggest to take a look at PlopKexec bootmanager: https://www.plop.at/en/plopkexec/full.html Regards, Ady. PS: I hope the OP is subscribed to the Syslinux Mailing List.> _______________________________________________ > Syslinux mailing list > Submissions to Syslinux at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux
On Thu, Feb 9, 2017 at 7:54 AM, Ady Ady via Syslinux <syslinux at zytor.com> wrote:>> > Other bootloaders include (or can generate) a binary file that behaves > as a (linux) kernel. Such binary file(s) can potentially be used for > chainloading and/or with kexec. This is _not_ the case with Syslinux. > > I would suggest to take a look at PlopKexec bootmanager: > https://www.plop.at/en/plopkexec/full.html >I'll take a look. But I'm using syslinux...> PS: I hope the OP is subscribed to the Syslinux Mailing List.He is. Thanks Jorge "OP" Almeida
On 02/08/17 06:33, Jorge Almeida via Syslinux wrote:> Is it possible to kexec to the syslinux interface, thus bypassing the > hw initialization? > What would be the kexec command? > > kexec -l ??? --append=??? --initrd=??? >It is theoretically possible but is likely to break on many systems. To boot it from a raw disk (the normal operation for Syslinux) would require a small amount of software which currently doesn't exist, but you can test it using a disk image and using MEMDISK: kexec -l memdisk --initrd=disk.img --real-mode If this actually works and is useful it would be a quick hack to add the missing piece. This will not work on UEFI platforms; there is no way to revert to UEFI boot mode without a system reset. -hpa
On Tue, Feb 14, 2017 at 10:58 AM, H. Peter Anvin <hpa at zytor.com> wrote:> On 02/08/17 06:33, Jorge Almeida via Syslinux wrote: >> Is it possible to kexec to the syslinux interface, thus bypassing the >> hw initialization? >> What would be the kexec command? >> >> kexec -l ??? --append=??? --initrd=??? >> > > It is theoretically possible but is likely to break on many systems. > > To boot it from a raw disk (the normal operation for Syslinux) would > require a small amount of software which currently doesn't exist, but > you can test it using a disk image and using MEMDISK: > > kexec -l memdisk --initrd=disk.img --real-mode >This may well be above my amateur head, but anyway I tried downloading al alpine iso, and then: kexec -l /boot/syslinux/memdisk --initrd=/boot/alpine-standard-3.5.1-x86_64.iso --real-mode --append="iso raw" (I tried first without "raw", just "iso".) The console says "kexec_cores: Starting new kernel" and hangs forever. BTW: I also tried an entry for alpine in syslinux.cfg: LABEL alpine MENU LABEL Alpine LINUX memdisk INITRD ../alpine-standard-3.5.1-x86_64.iso APPEND iso It doesn't boot, it appears an unusable emergency shell (doesn't react to keys). Of course, the alpine iso may not be suitable for this stuff, it's just what I got on short notice small enough to fit my /boot partition... About "disk.img", I don't know what to do. I currently don't use an initramfs (Gentoo is my usual system). Any downloadable suitable disk image out there?> If this actually works and is useful it would be a quick hack to add the > missing piece. > > This will not work on UEFI platforms; there is no way to revert to UEFI > boot mode without a system reset. >I intend to keep away from UEFI as long as possible... Thanks, Jorge Almeida