{"id":23411028,"url":"https://github.com/parthpower/pxe-boot","last_synced_at":"2025-04-09T03:43:39.470Z","repository":{"id":94451918,"uuid":"378093366","full_name":"parthpower/pxe-boot","owner":"parthpower","description":"some adventures with iPXE booting COMex from a BMC","archived":false,"fork":false,"pushed_at":"2021-07-07T23:34:46.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T22:18:59.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parthpower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-18T09:02:56.000Z","updated_at":"2021-06-19T09:52:29.000Z","dependencies_parsed_at":"2023-03-08T17:15:42.599Z","dependency_job_id":null,"html_url":"https://github.com/parthpower/pxe-boot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthpower%2Fpxe-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthpower%2Fpxe-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthpower%2Fpxe-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parthpower%2Fpxe-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parthpower","download_url":"https://codeload.github.com/parthpower/pxe-boot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974595,"owners_count":21026742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-22T17:54:37.632Z","updated_at":"2025-04-09T03:43:39.445Z","avatar_url":"https://github.com/parthpower.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# iPXE Boot from BMC (Finally!)\n\n## What?\n\nMost white box switch boxes (at least the ones that ship with [SONiC](https://github.com/Azure/sonic)) has a BMC that is connected to a switch which also connects to external management and the COMex mgmt NIC.\n\nIn theory, we can run netboot COMex from BMC. netboot is quite simple, need a dhcp server (typically well known `dnsmasq`)\n\nSo the idea is, to boot COMex without an external media i.e. USB stick.\n\n## How?\n\nFirst we need `dnsmasq` to run on BMC, in my case, AST2500 running [OpenBMC](https://github.com/openbmc/openbmc) thus, `linux-armv5` target.\n\n`dnsmasq` is quite simple to cross-compile especially with [dockcross](https://github.com/dockcross/dockcross/)\n\n```bash\n# get dockcross\ndocker run --rm dockcross/linux-armv5 \u003e ./dockcross-linux-armv5\nchmod +x dockcross-linux-armv5\n./dockcross-linux-armv5 bash\n\n# build dnsmasq\ngit clone https://github.com/imp/dnsmasq\ncd dnsmasq\nmake\n```\n\n### Selecting iPXE image\n\nYAY! ArchLinux FTW \\o/\n\n- :white_check_mark: ArchLinux https://archlinux.org/releng/netboot/\n- :white_check_mark: netboot.xyz https://boot.netboot.xyz/ipxe/netboot.xyz.efi\n- :x: Ubuntu Netboot http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz (would need an UEFI image)\n\n### `dnsmasq` config\n\nMake sure to add dhcp advertised gateway to the `eth0`.\n\n```\ninterface=eth0,lo\nbind-interfaces\ndomain=my.lan\n# DHCP range-leases\ndhcp-range=eth0,192.168.15.5,192.168.15.253,255.255.255.0,1h\n\n# PXE file to boot from\ndhcp-boot=ipxe.efi\n\n# For Ubuntu Netboot Options\n# pxe-prompt=\"Press F8 for menu.\", 60\n# pxe-service=x86PC, \"PXE boot from network server 192.168.15.1\", pxelinux\n\n# Gateway\n# dhcp-option=3,192.168.15.1\n# DNS\ndhcp-option=6,1.1.1.1, 8.8.8.8\nserver=1.1.1.1\n# Broadcast Address\n# dhcp-option=28,10.0.0.255\n# NTP Server\n# dhcp-option=42,0.0.0.0\n\n# TFTP Server\ndhcp-option=66,192.168.15.1\nenable-tftp\ntftp-root=/var/lib/tftpboot\nlog-dhcp\nlog-queries\nlog-facility=/tmp/dnsmasq.log\n```\n\nand just run the dnsmasq with this,\n\n```bash\nkill `pidof dnsmasq`; \\\ndnsmasq -C dnsmasq.conf \u0026\u0026 \\\ntail -f /tmp/dnsmasq.log\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthpower%2Fpxe-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparthpower%2Fpxe-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthpower%2Fpxe-boot/lists"}