Stoppa, Igor
2015-Jun-06 10:19 UTC
[syslinux] chainloading syslinux from an EFI partition to an ext4
Hi, I am having troubles with chainloading and hopefully someone can provide me with some guidance. Here's what I am trying to do: * the media is a USB key * I have created a GPT on it * I have created an EFI partition, where I have installed the EFI flavor of syslinux, the various .c32 files required for chainloading and the configuration file which tells syslinux what to chainload * I have created an ext4 partition and instaleld the extsylinux flavor on it (which is the one I would like to chainload) What works: * the EFI bootloader is loaded and tries to load something * the ext4 partition, when written directly to the whole block device /dev/sdc, boots and starts the kernel I have deployed in it What doesn't work: * the chainloading: all I get is an error message from the EFI bootloader, saying that it cannot find the magin on the MBR of the disk/partition I am trying to chainload into and it would treat it as raw. I cannot completely rule out that I have misconfigured the chainload target, but I have tried various combinations and none works. All I have is the documentation of syslinux that states drives are enumerated starting from 0 and partitions starting from 1 Why am I trying this bizarre (?) configuration: eventually I would like to have the EFI bootloader to automatically decide which partition to chainload. I'm planning to have 2 OSes on the device: * a master OS * a recovery OS Both are linux and each of them lives in an ext4 partition with its own bootloader. I'm planning to decide which one to boot into, based on various parameter, modifying the selection mechanism currently used by syslinux. Furthermore, I am trying to not have any write operation on the EFI partition, since it's a FAT32 one and I consider it more fragile. So I'd like to not put all the kernels/initrds in it, because when I update one of the OSes, I would also have to update the corresponding kernel in the EFI partition.>From the documentation I gather that syslinux will only load a kernelthat is in the same partition, hence my choice of using chainloading. About my other attempts: I saw that there are various mbr binaries for syslinux. So I also tried to install gptmbr.bin on the GPT table, hoping it would provide the missing magic, but my attempt didn't seem to make any difference. So, finally, my questions: * am I trying to do something that is not supported? * is there a better way to do it? * is there something obviously wrong in my design/assumptions? -- thanks, igor
Didier Spaier
2015-Jun-06 11:03 UTC
[syslinux] chainloading syslinux from an EFI partition to an ext4
On 06/06/2015 12:19, Stoppa, Igor via Syslinux wrote:> So I'd like to not put all the kernels/initrds in it, because when I > update one of the OSes, I would also have to update the corresponding > kernel in the EFI partition.IIRC this is not possible (yet?) as kernels and initrd should lie in the ESP alongside the EFI image(s) and the config file. But I am not sure, so if I am wrong please someone correct me. Best regards, Didier
Stoppa, Igor
2015-Jun-06 11:14 UTC
[syslinux] chainloading syslinux from an EFI partition to an ext4
On 6 June 2015 at 14:03, Didier Spaier via Syslinux <syslinux at zytor.com> wrote:> > > On 06/06/2015 12:19, Stoppa, Igor via Syslinux wrote: > >> So I'd like to not put all the kernels/initrds in it, because when I >> update one of the OSes, I would also have to update the corresponding >> kernel in the EFI partition. > > > IIRC this is not possible (yet?) as kernels and initrd should lie in the ESP > alongside the EFI image(s) and the config file. But I am not sure, so if I > am wrong please someone correct me.>From what I understood, that's what you want to do if you want the EFI syslinuxto boot your kernel, yes. But. What I'm trying to do is to have the EFI bootloader to chainload an ext4 partition where I have installed extlinux. The kernels and initrd lie alongside the extlinux bootloader. In a more schematic way: 1) the EFI BIOS loads the EFI syslinux 2) the EFI syslinux chainloads the extlinux that is on a separate partition 3) the extlinux loads the kernel & initrd that are colocated in the same directory point 2 is failing I hope this is more clear than my previous, long, post :-) -- igor
Possibly Parallel Threads
- chainloading syslinux from an EFI partition to an ext4
- chainloading syslinux from an EFI partition to an ext4
- chainloading syslinux from an EFI partition to an ext4
- chainloading syslinux from an EFI partition to an ext4
- chainloading syslinux from an EFI partition to an ext4