Erik Rull
2019-Aug-21 10:57 UTC
[syslinux] Getting classic BIOS and UEFI boot on the same disk?
Hi all, We're using the classic boot BIOS syslinux successfully for many years, but meanwhile it's getting harder to buy hardware the still supports this boot mode. The option for us would be syslinux EFI boot. To avoid too many changes we would like to generate an image for our different hardware parts that supports both - classic BIOS boot and (U)EFI boot. This would allow us to leave the BIOS in whatever state it is and the system will simply boot. I read some articles on how to install each version - from that I would carefully say that this is not possible... At least not when following the install instructions. The biggest gap seems to be the MBR and the GPT... Might there be a way to handle this actually? Or do both modes completely exclude each other? I won't mind duplicating some files that are required for each boot process but could not be placed in the same location... And - if there is already a howto for this topic - blame me, I didn't find it :-) Thanks in advance. Best regards, Erik
Ady Ady
2019-Aug-21 16:04 UTC
[syslinux] Getting classic BIOS and UEFI boot on the same disk?
> We're using the classic boot BIOS syslinux successfully for many years, > but meanwhile it's getting harder to buy hardware the still supports > this boot mode. The option for us would be syslinux EFI boot. To avoid > too many changes we would like to generate an image for our different > hardware parts that supports both - classic BIOS boot and (U)EFI boot. > This would allow us to leave the BIOS in whatever state it is and the > system will simply boot. > > I read some articles on how to install each version - from that I would > carefully say that this is not possible... At least not when following > the install instructions. The biggest gap seems to be the MBR and the > GPT... > > Might there be a way to handle this actually? Or do both modes > completely exclude each other? I won't mind duplicating some files that > are required for each boot process but could not be placed in the same > location... > > And - if there is already a howto for this topic - blame me, I didn't > find it :-)To me, it is not so clear what exactly is your goal. Do you want to build an image for an internal HDD that could be capable of booting in both, BIOS mode and UEFI mode? Or, is this for a portable (USB) device? Or, is this for some kind of ISO image? Or, is this for some kind of network-booting, in order to install OSes to the internal HDD? Additionally, what OS(es) are you planning to boot from Syslinux (in either BIOS mode and/or UEFI mode)? Is the resulting image expected to support multiple OSes? Which ones (e.g. Windows, Linux)? Depending on the answers to these questions, the answers to your original questions (might) vary. Regards, Ady.
Erik Rull
2019-Aug-21 18:00 UTC
[syslinux] Getting classic BIOS and UEFI boot on the same disk?
Hi Ady, Ady Ady via Syslinux wrote:> > To me, it is not so clear what exactly is your goal.sorry for not being detailed enough.> Do you want to build an image for an internal HDD that could be capable > of booting in both, BIOS mode and UEFI mode?Yes. This would make us independent from the BIOS boot mode.> Or, is this for a portable (USB) device?Maybe - would be nice if this would work, but not required.> Or, is this for some kind of ISO image?No.> Or, is this for some kind of network-booting, in order to install OSes > to the internal HDD?No. We put in a disk that is already ready to use.> Additionally, what OS(es) are you planning to boot from Syslinux (in > either BIOS mode and/or UEFI mode)?Linux. 32 bit (and 64 bit if this alternative is possible). Vanilla kernel + Linux from scratch.> Is the resulting image expected to support multiple OSes? Which ones > (e.g. Windows, Linux)?Linux - as written above 32 and 64 bit but not at the same time of course. So one image for 32 bit and one for 64 bit. No boot option to choose. No Windows, nothing else.> Depending on the answers to these questions, the answers to your > original questions (might) vary.I'll cross fingers!> Regards, > Ady.Thanks a lot! Best regards, Erik
Thomas Schmitt
2019-Aug-21 18:06 UTC
[syslinux] Getting classic BIOS and UEFI boot on the same disk?
Hi, only speaking theoretically from the disk view, as i'm not SYSLINUX expert but rather provide a program to pack up bootable ISO 9660 images, Ady surely has more experience with installation, but since he did not mention the following facts, i add my two cents. Erik Rull wrote:> we would like to generate an image for our different > hardware parts that supports both - classic BIOS boot and (U)EFI bootThis combination is present in many GNU/Linux installation ISO 9660 images which work from DVD and from USB stick. But because of a shortcomming in SYSLINUX EFI with booting from optical media, the EFI equipment is GRUB2, except Knoppix 8, which fails accordingly from DVD via EFI. From USB stick it works fine. Most x86 firmwares interpret USB sticks and hard disks identically. So, since you seem to speak of hard disk images, if there is a problem, then only with the installation software, not with the goal.> I read some articles on how to install each version - from that I would > carefully say that this is not possible...Care to share the links ?> The biggest gap seems to be the MBR and the GPT...GPT specifies as block 0 a "Protective MBR" which is allowed to contain BIOS boot code. The constraint given by GPT is in respect to the partition table, which may only contain a single partition, which must have type 0xee and cover the whole disk from block 1 up to the last block. But EFI does not demand GPT. It specifies as alternative an MBR partition table layout with one partition of type 0xef and possibly more partitions. The 0xef partition must not have the Boot/Active flag set. BIOS does not directly demand partitions, but many MBR boot programs look for a partition with Active/Boot flag in order to chainload the boot loader found there. (ISOLINUX "isohdp[fp]x*.bin" do not look for the flag.) https://wiki.syslinux.org/wiki/index.php?title=Install#UEFI mentions special MBR boot code images "gptmbr*.bin" for GPT but does not say much about how to install them. Further it says: There are no "installers" for syslinux.efi. Copy the relevant syslinux.efi file to an appropriate location, and rename it if necessary or desired. Additionally, copy the necessary core module file (either "ldlinux.e32" or "ldlinux.e64", according to the architecture of the firmware) to the same directory. This looks like you are supposed to create an EFI System partition (either MBR type 0xef or GPT type GUID C12A7328-F81F-11D2-BA4B-00A0C93EC93B), format it as FAT12 or FAT16, and to put efi32/efi/syslinux.efi and efi64/efi/syslinux.efi in there, naming them /EFI/BOOT/BOOTIA32.EFI and /EFI/BOOT/BOOTX64.EFI, respectively. (On Microsoft it's "\" rather than "/", of course.) Then put ldlinux.e32 and ldlinux.e64 into /EFI/BOOT of the partition. I'd start with a readily installed BIOS-capable SYSLINUX image and use a partition editor to create an 0xef MBR partition. MBR partition table has the advantage that it does not tell the full disk size. So one image fits all disks if they are large enough. The rest seems to be a matter of customization needs. For example the EFI partition content of Knoppix 8 (seen by GNU/Linux find(1)) is this: ./efi ./efi/boot ./efi/boot/BOOTX64.efi ./efi/boot/hashtool.efi ./efi/boot/keytool.efi ./efi/boot/loader.efi ./efi/boot/BOOTIA32.efi ./efi/boot/ldlinux.e32 ./efi/boot/ldlinux.e64 ./boot ./boot/syslinux ./boot/syslinux/linux ./boot/syslinux/linux64 ./boot/syslinux/minirt.gz ./boot/syslinux/syslnx32.cfg ./boot/syslinux/syslnx64.cfg ./boot/syslinux/f2 ./boot/syslinux/f3 ./boot/syslinux/bootefi.msg ./boot/syslinux/german.kbd ./NvVars I assume that "linux", "linux64" and "minirt.gz" belong to a bootable Linux. Why Klaus Knopper put it there is not clear to me. Have a nice day :) Thomas
William R. Somsky
2019-Aug-21 18:31 UTC
[syslinux] Getting classic BIOS and UEFI boot on the same disk?
I'm not sure if it is useful, but with the advent of UEFI only machines, we've run into a similar problem w/ out custom CentOS 7 USB installation keys. Basically, we create a gpt device w/ a single FAT16 partition (this would be your /boot partition for a full installation) containing an EFI/BOOT/ directory with the syslinux-efi files and a SYSLINUX/ directory with the syslinux-bios files. Would further info on this be helpful? - WRSomsky On Wed, Aug 21, 2019 at 12:57:05PM +0200, Erik Rull via Syslinux wrote:> Hi all, > > We're using the classic boot BIOS syslinux successfully for many years, but > meanwhile it's getting harder to buy hardware the still supports this boot > mode. > The option for us would be syslinux EFI boot. > To avoid too many changes we would like to generate an image for our different > hardware parts that supports both - classic BIOS boot and (U)EFI boot. > This would allow us to leave the BIOS in whatever state it is and the system > will simply boot. > > [[...]]-- Dr. William R. Somsky somsky at uw.edu Department of Physics, Box 351560 B217 Phys-Astro Bldg Univ. of Washington, Seattle WA 98195-1560 206-616-2954
Gregory Bartholomew
2019-Aug-22 00:34 UTC
[syslinux] Getting classic BIOS and UEFI boot on the same disk?
I just created something very similar for one of my own projects. I have a disk image that you can "dd" onto a hard drive or USB drive and a bash script demonstrating how it was done here: https://www.syslinux.org/archives/2019-July/026476.html You don't actually need the patch for the dual BIOS/UEFI support. The patch in the above link is just to enable the reading of config "snippits" from a "entries" directory. Feel free to try out the provided disk image to see if it meets your needs and reverse-engineer the bash script to suit your needs. On Wed, Aug 21, 2019 at 1:34 PM William R. Somsky via Syslinux < syslinux at syslinux.org> wrote:> > I'm not sure if it is useful, but with the advent of UEFI only machines, > we've run into a similar problem w/ out custom CentOS 7 USB installation > keys. > > Basically, we create a gpt device w/ a single FAT16 partition (this > would be your /boot partition for a full installation) containing an > EFI/BOOT/ directory with the syslinux-efi files and a SYSLINUX/ > directory with the syslinux-bios files. > > Would further info on this be helpful? > > - WRSomsky > > > On Wed, Aug 21, 2019 at 12:57:05PM +0200, Erik Rull via Syslinux wrote: > > Hi all, > > > > We're using the classic boot BIOS syslinux successfully for many years, > but > > meanwhile it's getting harder to buy hardware the still supports this > boot > > mode. > > The option for us would be syslinux EFI boot. > > To avoid too many changes we would like to generate an image for our > different > > hardware parts that supports both - classic BIOS boot and (U)EFI boot. > > This would allow us to leave the BIOS in whatever state it is and the > system > > will simply boot. > > > > [[...]] > > -- > Dr. William R. Somsky somsky at uw.edu > Department of Physics, Box 351560 B217 Phys-Astro Bldg > Univ. of Washington, Seattle WA 98195-1560 206-616-2954 > _______________________________________________ > Syslinux mailing list > Submissions to Syslinux at syslinux.org > Unsubscribe or set options at: > https://lists.syslinux.org/syslinux >
Maybe Matching Threads
- Getting classic BIOS and UEFI boot on the same disk?
- Getting classic BIOS and UEFI boot on the same disk?
- Getting classic BIOS and UEFI boot on the same disk?
- Getting classic BIOS and UEFI boot on the same disk?
- Syslinux LUA -- output not visible in UEFI mode?