Slax author's Blog (RSS)
29
December2012
PXE support in Slax
After numerous requests for PXE support I've decided to implement it. It wasn't such hard, yet I struggled two problems. First one was an odd behavior of cpio, which wasn't able to create correct archive when asked to pack files from several directories into one. I didn't really find out how to make it work the way I wanted, so I had to create a temporary directory where all files are copied a priory and packed into a CPIO archive later. Another problem was pivot_root call, which refused to work and returned Invalid Argument error every time. Took me a hour to find out what's wrong. Linux live kit though it already escaped initramfs due to forgotten flag file. Anyway, the problems were resolved and I'm now running Slax which booted over PXE.
There is yet one more issue I'd like to address, it is the speed of downloading Slax bundles (.sb files) over TFTP. It's very slow. So I'm compiling busybox with httpd support (yeah) and I'm going to try that instead of tftp, in the hope that it will be somehow faster.
How PXE works: One computer (a server) is running Slax. Use command or boot parameter (unnamed yet) to prepare Slax to act as PXE server - it will just create an initramfs image with all network kernel drivers which are currently available in the currently running Slax, and will start dhcp and tftp services.
Other computers (clients) will have PXE boot selected instead of disk boot. PXE autodiscovery will send to each client computer a new IP address and the needed files (vmlinuz, initrfs.img). Slax boots on client machines, modprobes kernel drivers to enable networking, downloads *.sb files from the local server into memory and runs from there.

User comments

