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

PXE Not booting, what is the default bios filename to boot? #17

Closed
mannp opened this issue Jan 22, 2022 · 11 comments
Closed

PXE Not booting, what is the default bios filename to boot? #17

mannp opened this issue Jan 22, 2022 · 11 comments
Labels
question Further information is requested

Comments

@mannp
Copy link

mannp commented Jan 22, 2022

Thanks for sharing your config :)

I wondered what the default boot image menu is for the pxe server you are using, as I cannot get the machines to see the default menu / boot image for pxe.

Thanks

@khuedoan
Copy link
Owner

khuedoan commented Jan 22, 2022

I'm not sure on the question, I use the second option in the docs, can you provide some more logs and/or screenshots please?

For example:

  • Command used
  • PXE server logs
  • BIOS config screenshot(s)
  • Boot menu screenshot(s)

@khuedoan khuedoan added the question Further information is requested label Jan 22, 2022
@mannp
Copy link
Author

mannp commented Jan 22, 2022

For my working netboot.xyz server I have to set IP of the pxe server, EFI 32bit filename, EFI 64bit filename and default bios filename, on opnsense, so that the machines on that vlan know where the pxe server is.

I guess the question is, how do the node machines know where the temp PXE server is on my desktop?

At the moment they find the PXE server, but they error that there is no image / menu to boot and repeat.

./scripts/pxe-logs gives me the error 'unknown flag: --project-directory', so I guess I am missing something obvious :)

@khuedoan
Copy link
Owner

khuedoan commented Jan 22, 2022

The DHCP config will point the nodes to the temp PXE server (which is the same PC you're running Ansible on):

class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server {{ ansible_default_ipv4.address }};

You can check the rendered DHCP config in this path:

dest: "{{ role_path }}/files/data/pxe-config/dhcpd.conf"

@khuedoan
Copy link
Owner

khuedoan commented Jan 22, 2022

./scripts/pxe-logs gives me the error 'unknown flag: --project-directory', so I guess I am missing something obvious :)

Oh that's a bug due to this commit: 40523e6

The Ansible role use Docker Compose v1 (see ansible-collections/community.docker#216), but the pxe-logs script use Docker Compose v2 and I forgot about that.

khuedoan added a commit that referenced this issue Jan 22, 2022
@khuedoan
Copy link
Owner

Done, please pull latest master and try again

@mannp
Copy link
Author

mannp commented Jan 22, 2022

I guess the critical missing info, is that I am trying to use four vm's on proxmox for the 4 physical machines and maybe confusing the issue here.

I will have a read on ansible pxe boot :)

@khuedoan
Copy link
Owner

Ah if you're using VMs just use a Rocky Linux 8 image and ignore the boot.yml playbook and go directly to the cluster.yml playbook, you don't need PXE boot at all:

homelab/metal/Makefile

Lines 15 to 18 in 7e21741

cluster:
ansible-playbook \
--inventory inventories/${env}.yml \
cluster.yml

@khuedoan
Copy link
Owner

Some configuration to note on the base image:

# Disable SELinux
selinux --disabled
# Disable firewall
firewall --disabled
%packages
@^minimal-environment
iscsi-initiator-utils
%end
# Enable iSCSI for Kubernetes storage
services --enable=iscsid

@mannp
Copy link
Author

mannp commented Jan 22, 2022

I was hoping your setup could create and configure the nodes for me via pxe with minimal config of the vm.

What would the local pxe server be presenting to the nodes eg tftp://192.168.1.94/

@khuedoan
Copy link
Owner

khuedoan commented Jan 22, 2022

My rendered DHCP config looks like this:

subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;
    range 192.168.1.2 192.168.1.254;

    class "pxeclients" {
        match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
        next-server 192.168.1.9;

        if option architecture-type = 00:07 {
            filename "grubx64.efi";
        }
    }
}

The packages will be downloaded via the HTTP server (http://192.168.1.9)

@mannp
Copy link
Author

mannp commented Jan 22, 2022

It looks like this setup is creating a dhcp server itself to configure the physical machines, is that correct?

I am getting an 'Access denied' when my vm's try to access the pxe server, but they are looking at my opnsense dhcp server for the details.

@mannp mannp closed this as completed Jan 22, 2022
zanehala added a commit to zanehala/homelab that referenced this issue Dec 1, 2022
zanehala added a commit to zanehala/homelab that referenced this issue Feb 12, 2023
retX0 pushed a commit to retX0/homelab that referenced this issue Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants