Score:0

32-bit Linux UEFI network booting

br flag

I am trying to boot temporary Linux via UEFI network boot, and I need it 32-bit x86. Only 32-bit live distribution I know is RescueCD which seem to have no EFI stub in kernel to boot. I was trying to boot it via iPXE efi loader, which I am used to use. Is there a way to boot non-EFI kernel from iPXE or from other network-bootable bootloader? Or perhaps there are some 32-bit live linux distribution I miss?

anx avatar
fr flag
anx
Does the Ubuntu 18.04 (they dropped 32-bit only after that) installer not meet that requirement? What do you want to accomplish that you think can only work on a 32-bit distro? Why is your first choice not booting up whatever you usually do - and then doing the fancy stuff in `qemu-system-i386`, with the added benefit of not having to care about the peculiarities of that systems firmware?
in flag
iPXE only calls the efi firmware to boot in efi mode. As such it only supports binaries that the firmware supports. (usually efi only) Grub might be able to help you.
A.B avatar
cl flag
A.B
https://wiki.debian.org/PXEBootInstall#Provide_the_boot_image -> https://www.debian.org/distrib/netinst#netboot -> https://deb.debian.org/debian/dists/bullseye/main/installer-i386/current/images/netboot/debian-installer/i386/bootnetia32.efi
kab00m avatar
br flag
Thanks for advice, but live Ubuntu is too big for command-only tasks and too old to run on newer hardware.
kab00m avatar
br flag
Grub is nice solution, i still do not know how to chainload it from iPXE with special config, I'll give it a try.
Score:3
nc flag

It's not clear why you want to do this, let me makes some guesses.

If you have 32 bit hardware that won't support 64 bit, then the bios may also not support UEFI, or it may have UEFI support that is old enough to be buggy. It might boot with ipxe, and I've gotten that to work, but when I was using that, I had to support 3 different methods of loading the live disk due to the variety of bugs in 32 bit UEFI firmware. Additionally, the easiest way to pxe boot with ipxe is to just load the whole image into ram, and 32 bit hardware typically doesn't have enough ram to do that. It's much easier to just boot from USB or CDROM.

As to what live image you can use, Ubuntu 18.04 supports 32 bit, although it drops drivers for some 32 bit hardware, so you might need Ubuntu 16.04. Older versions of CentOS support 32 bit as well, but I'm not sure if you need CentOS 6 or 5 without doing some research. (Added note suggested by comments: a rescue disk is more likely to have a current 32 bit version, and also likely smaller, which would make loading to ram easier.)

If you are trying to install a 32 bit image on 64 bit hardware, my suggestion is dont -- although this is still much easier than on 32 bit hardware. Presumably you are doing this to run a 32 bit binary. Here are alternatives:

  • Load the 32 bit compatibility libraries into your 64 bit linux. It should run the binaries just fine once you've satisfied all the library dependencies.
  • Build a container using an older version of linux that suports 32 bit. Any container engine should work, including Docker or Apptainer, etc.
  • Use a VM emulator like vmware or qemu and run an older OS inside the VM.

If you have to use an older OS, running a container or VM is preferable to running on bare metal, as you can use the host to firewall the older OS and bugs in the (presumably unpatched) older OS you have to use won't be as much of an issue. Also, you'll get full use of your 64 bit hardware where a bare metal 32 bit OS would not work nearly as well on the newer hardware.

kab00m avatar
br flag
Usually that situation is needed by some propietary software like firmware updates. The moment i was writing this question I needed to boot pure 32-bit OS onto IBM x3200 M3 which have firmware updates built in static 32-bit ELF executable with access to hardware. I do not need to run any installation, I just need to run temporary Linux to run one executable. So, no VM or container can be used here, and I do not know how I can load 32-bit compatibility libraries for static executable. Sorry if I was uncertain and thus lead in misunderstanding.
kab00m avatar
br flag
I managed to flash that server with RescueCD 32-bit booted from pxelinux in BIOS mode and my question was how to do that in UEFI mode without flash-drive or so.
user10489 avatar
nc flag
You probably could run that from a properly privileged container. For a static executable, the only library you need is the appropriate version of ld.so which you probably can extract by running ldconfig on the binary to get the version. As to PXE boot, it might be easier to boot a rescue disk, as they are a lot smaller than a full image.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.