I would like to PXE boot a laptop to install Debian on it.
Normally, I would use a CAT5 cable to connect the laptop to my router as I can't boot from network via Wi-Fi. My router running Tomato would assign the IP address and then point to a VM on my laptop as the next_server, and the VM would serve everything needed to get the OS installed, push configuration via Ansible, etc.
This time, I don't have my router. There is a Wi-Fi network here that I don't control, and the ISP router likely has no configuration to set up any next_server.
When booting the laptop, I was considering connecting it directly to my laptop via a CAT5 cable. (I'm assuming both Ethernet ports support autosensing so I won't need to resort to using a crossover cable.)
I don't want to install a ton of software on my laptop to get this going, but I can settle for some simple packages if needed.
Ultimately, I want this laptop to boot over the network, find the VM on my laptop, and start booting--all without having to reconfigure anything on the ISP router.
The VM runs in Oracle VirtualBox and is currently configured with two network adapters for some reason. I'm flexible on changing these VM settings for this if necessary.
The first adapter is Attached to Bridged Adpater, with Name wlan0.
The second adapter is Attached to Host-only Adapter, with Name vboxnet0.
EDIT: To answer some of the comments and clarify my setup, there are no Windows computers involved.
There is an ISP-provided Wi-Fi router here that I can't control; it has DHCP enabled so wireless devices and laptops get NAT IP addresses, but no next-server value for network booting.
The wireless router is also not suitable for additional Ethernet connections, so I can't plug the new laptop directly into its Ethernet port.
Both laptops have wireless NICs and connect to the wireless router for Internet access. The laptops also have an Ethernet port that rarely gets used.
The second laptop has no OS; the drive is wiped and ready to install an OS.
My physical laptop runs Debian.
My laptop has a Debian VM running in Virtual Box that I use to serve network boot clients. This VM currently assumes the Tomato router will provide DHCP as well as a next-server value pointing to the VM.
The Tomato router is no longer in the mix, only the wireless router mentioned above, which is causing me my current grief.
VM 提供 PXE 启动,因此启动客户端可以启动到系统救援 CD、TRK、Debian 安装程序、Debian 实时 CD 等。
我通常通过 PXE 启动 Debian 安装程序,然后指向同一个 VM 进行 Debian 预配置,因为 VM 还运行 HTTP 服务器来提供预配置文件。
如果我可以通过从刻录的 CD 安装程序或 USB 启动来获取预置配置,那么我认为这对我来说是一个可行的解决方法。我很可能需要刻录一张 CD,但它必须是一张实际大小为 650 MB 或更小的 CD,因为这里没有 DVD。
基础安装完成后,我从物理笔记本电脑运行 Ansible 命令,将配置更改推送到新配置的硬件。
答案1
最简单的方法是从已有的 Debian ISO 创建可启动的 USB 棒,然后通过手动 IP 配置连接到另一台笔记本电脑
答案2
所选答案暗示要创建 USB 驱动器;这真的很麻烦。您可以在 15 分钟内设置 PXE 服务器并开始安装 Debian,而无需触及已经安装好的 DHCP 服务器。请参见此处: https://www.vercot.com/~serva/an/WindowsPXE1.html
对于 Debian 具体请参见此处 http://vercot.com/~serva/an/NonWindowsPXE3.html
(我负责 Serva 开发)
答案3
您可以使用 bootp 或 DHCP 协议来实现这一点。严格来说,您不需要路由器,但您需要一些东西来提供这些协议。
几乎所有网卡都具有自动感应功能。但“需要”网卡却成了一个现代神话。
您需要使用桥接适配器,将其设置为以太网网络并直接连接笔记本电脑。您还可以使用仅主机适配器,然后在 Windows 中将其接口与另一个适配器桥接。