Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi no network after PXE boot with flatcar due to missing kernel #375

Closed
wernerb opened this issue Mar 29, 2021 · 16 comments · Fixed by flatcar-archive/coreos-overlay#929
Labels
channel/alpha Issue concerns the Alpha channel. good first issue Get started with Flatcar contribution with this issue. kind/bug Something isn't working

Comments

@wernerb
Copy link

wernerb commented Mar 29, 2021

Description

Support has already been added for RPI4 network in #227 . However, when using PXE booting, we need an additional flag called CONFIG_MDIO_BCM_UNIMAC. More details can be found here https://bugzilla.redhat.com/show_bug.cgi?id=1943983

Impact

No ethernet adapter when network booting (either PXE or UEFI HTTP).

Environment and steps to reproduce

boot http://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi manually through the HTTP Network boot gui with the UEFI firmware for
RPI4.
Then when booted into the menu.
Select Execute iPXE shell

Type in the following:

kernel https://alpha.release.flatcar-linux.net/arm64-usr/current/flatcar_production_pxe.vmlinuz initrd=flatcar_production_pxe_image.cpio.gz flatcar.config.url=http://urldoesntmatter flatcar.first_boot=yes console=tty0 console=ttyS0 flatcar.autologin
initrd https://alpha.release.flatcar-linux.net/arm64-usr/current/flatcar_production_pxe_image.cpio.gz
boot

You will see messages such as:

[  133.316150] Unable to find mii
[  133.319239] bcmgenet BCM6E4E:00 enabcm6e4ei0: failed to connect to PHY

Expected behavior
The network driver comes up.

Additional information
Enabling the flag would fix the support for PXE alongside the support already #227

@wernerb wernerb changed the title Raspberry Pi no network after PXE boot with flatcar due to missing UNIMAC flag Raspberry Pi no network after PXE boot with flatcar due to missing kernel Mar 29, 2021
@dongsupark dongsupark added the kind/bug Something isn't working label Mar 29, 2021
@dongsupark
Copy link
Member

Thanks for the PR flatcar-archive/coreos-overlay#929.
From my understanding, we would have to also update dracut to >= 0.52, to fix the rpi4 issue.
Though Gentoo does not seem to have its stabilized ebuild. Well.

@wernerb
Copy link
Author

wernerb commented Apr 6, 2021

Thanks for the PR kinvolk/coreos-overlay#929.
From my understanding, we would have to also update dracut to >= 0.52, to fix the rpi4 issue.
Though Gentoo does not seem to have its stabilized ebuild. Well.

Yes, but not just for rpi4. Per my understanding all net/mdio modules are currently not working since kernel 5.10.

@t-lo t-lo added the channel/alpha Issue concerns the Alpha channel. label Jun 1, 2021
@sayanchowdhury sayanchowdhury moved this from In Progress to Planned in Flatcar Container Linux Releases Planning Jun 14, 2021
@t-lo
Copy link
Member

t-lo commented Jun 14, 2021

To summarise, we would need to:

Adding a label "good first issue" for users who want to accustom themselves with building custom images, assuming that both the kernel config change as well as the dracut version bump will be straightforward.

@t-lo t-lo added the good first issue Get started with Flatcar contribution with this issue. label Jun 14, 2021
@dongsupark
Copy link
Member

Fortunately Gentoo stablized dracut 053.
amd64: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a934a75bbc054b3ae7c14948df6a4ac6d69e643
arm64: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a35bed081b36613d414a7a24534a4706e11fb2b0

@jepio
Copy link
Member

jepio commented Jul 13, 2021

The effect of the dracut fix still needs to be tested.

@raballew
Copy link

raballew commented Jul 13, 2021

@jepio I used the latest version of the alpha channel on Raspberry Pi 4 and it seems that the issue is still present causing the same error as described in #227 (comment) when using iPXE to netboot. I will build a custom image later today and rerun the test.

@jepio
Copy link
Member

jepio commented Jul 13, 2021 via email

@raballew
Copy link

@jepio That would speed up the entire process! I will test your WIP PR once pushed.

@jepio
Copy link
Member

jepio commented Jul 13, 2021

@raballew try flatcar-archive/coreos-overlay#1105.

@raballew
Copy link

raballew commented Jul 14, 2021

@jepio My machine is currently rebuilding everything. This will take a while and now I am wondering how both flatcar_production_pxe.vmlinuz and flatcar_production_pxe_image.cpio.gz are generated. Could you point me in the right direction?

EDIT: I guess it is something similar to ./image_to_vm.sh --from=../build/images/arm64-usr/developer-latest --format=pxe

@raballew
Copy link

@jepio Have a look at https://github.com/raballew/picar/blob/03df9c5dd370ca31104f1cf78b768787c27d2c18/Makefile#L14 where I try to build your WIP PR. The build succeeds, but I still see the same issue occuring everytime when PXE booting even with the new build.

@jepio
Copy link
Member

jepio commented Jul 15, 2021

./build_image builds a generic image, that is then converted to platform (or deployment) specific images by running ./image_to_vm.sh. You have the right command.

There is currently something wrong with dependencies and the initramfs does not get rebuilt when dracut is updated, sorry about that. You need to run an explicit emerge-arm64-usr coreos-kernel between build_packages and build_image to force the kernel to be rebuilt.

@raballew
Copy link

@jepio Thanks for the hint! Manually forcing a rebuild of the coreos-kernel did the trick and I can confirm that the issue is solved for PXE environments as well. The build artifact that I used for testing is available here and can be pulled with oras.

@jmgilman
Copy link

For context, I'm pretty confident this issue is not strictly related to PXE but rather more likely to UEFI booting in general (which I suspect is being done in this case?). Either way, I'm seeing similar errors when UEFI booting from a raw image to my RPi4. If I get some time I'll try to manually build the same image as above - otherwise, I'll wait and see if the next release resolves the issue.

@jepio
Copy link
Member

jepio commented Jul 20, 2021

@jmgilman I agree with you (not related to PXE), I use UEFI on my RPI4. The fix is in main and will be part of the next alpha release.

@raballew
Copy link

raballew commented Jul 20, 2021

@jmgilman I am using EFI as well on my set of RPi 4s.

t-lo pushed a commit to flatcar/scripts that referenced this issue Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
channel/alpha Issue concerns the Alpha channel. good first issue Get started with Flatcar contribution with this issue. kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants