mmatuska / mfsbsd

mfsBSD
http://mfsbsd.vx.sk
BSD 2-Clause "Simplified" License
494 stars 137 forks source link

mfsbsd img file not working in UEFI mode #110

Open Gitrrrr opened 4 years ago

Gitrrrr commented 4 years ago

UEFI_Mfsbsd mfsbsd boot is not working in UEFI mode. it is working fine for me in legacy mode using memdisk. ipxe file

kernel http://$server/cobbler/ks_mirror/$distro/boot/loader.efi initrd http://$server/cobbler/ks_mirror/$distro/boot/mfsbsd-amd64.img boot Note i tried this (mmatuska/mfsbsd#100) but not worked for me.

victor-sudakov commented 3 years ago

ipxe file

kernel http://$server/cobbler/ks_mirror/$distro/boot/loader.efi initrd http://$server/cobbler/ks_mirror/$distro/boot/mfsbsd-amd64.img boot

This is probably not the correct way to boot mfsBSD via iPXE. You should run sanboot http://$server/cobbler/ks_mirror/$distro/boot/mfsbsd-amd64.img

because the sanboot command is designed for fetching hdd and iso images.

Anyway, loader.efi is not a kernel. If you want to use it, you probably should run chain loader.efi in your ipxe file.

and then loader.efi would fetch and load the kernel and mfsroot. But only with NFS.

Gitrrrr commented 3 years ago

@victor-sudakov Thanks for correcting me.

victor-sudakov commented 3 years ago

@Gitrrrr look

The way it should work (though it does not):

  1. Create an msfBSD tar image cd mfsbsd && make tar
  2. tar -x -C /tftpboot -f mfsbsd-12.2-RELEASE-p1-amd64.tar
  3. make /tftpboot available over TFTP and over NFS
  4. cp /boot/loader.efi /tftpboot/
  5. Configure your DHCP server to provide next-server and root-path as 192.168.1.1:/tftpboot and "loader.efi" as bootfile.

loader.efi will be fetched to the host by the PXE boot, and should do the rest of the job. However in my case, it loads the kernel, tries to load mfsroot and then freezes, and then reboots in a minute or so. Or maybe it's not loader.efi that freezes, but "/mfsroot" and several seconds of rotating "/" is the last thing I can see.

IMG_20201226_143220

victor-sudakov commented 3 years ago

Can you please tell me how to enable some debug output to see what's happening after the "/mfsroot" message?

tuxjz commented 1 year ago

I know it is old issue, but if someone find it useful, I have successfully booted mfsbsd-se-13.2-RELEASE-amd64.img using: sanboot --no-describe mfsbsd-se-13.2-RELEASE-amd64.img on R720xd via UEFI iPXE boot.

gopiio commented 10 months ago

@tuxjz could you be able to share the working config?

tuxjz commented 10 months ago

Can you please elaborate on what part of config you are interested in? We use custom build iPXE, booted from TFTP, then load menu from HTTPS and then it is only sanboot with no-describe option as mentioned above: sanboot --no-describe mfsbsd-se-13.2-RELEASE-amd64.img

gopiio commented 10 months ago

Can you please elaborate on what part of config you are interested in? We use custom build iPXE, booted from TFTP, then load menu from HTTPS and then it is only sanboot with no-describe option as mentioned above: sanboot --no-describe mfsbsd-se-13.2-RELEASE-amd64.img

Thanks @tuxjz . Finally, I managed to get it to work. I am not using ipxe. I was totally stuck on it. My PXE server is based on debian. I was using dnsmasq for DHCP and TFTP. My issue was I couldn't find a way to pass the dhcp-option root-path. In order to get it working, I had to disable dnsmasq and went with isc-dhcp-server, tftpd server and loaded loader.efi.....it worked!!! mfsbsd image worked out of the box, without any customization.