Parted Magic PXE / Network Boot Guide
Parted Magic can be booted over the network using PXE (Preboot Execution Environment). This allows you to deploy Parted Magic to any number of machines on your LAN without needing USB drives or optical media. The PXE system supports three download protocols — HTTP (wget), TFTP, and NFS — and works with standard PXE infrastructure (DHCP server + boot server).
This guide covers server-side setup, boot parameter configuration, and worked examples for each protocol.
How It Works
A PXE boot of Parted Magic follows this sequence:
- The client machine’s PXE ROM broadcasts a DHCP request. Your DHCP server responds with an IP address and the location of a boot loader (typically
pxelinux.0oripxe.efi). - The client downloads and runs the boot loader, which fetches the Parted Magic kernel (
bzImage) and initial ramdisk (initrd.img) via TFTP or HTTP. - The kernel boots and the
initscript insideinitrd.imgtakes over. It brings up networking via DHCP, then uses the protocol specified by thenetsrc=boot parameter to download the main SquashFS image (PMAGIC_V.V.SQFS) and any additional files into RAM. - Once the download completes, DHCP leases are released, the SquashFS is mounted, and the system pivots into the full Parted Magic environment.
All downloaded files live in RAM. After the initial download there is no ongoing dependency on the network — the machine can be disconnected and will continue to run normally.
Boot Parameters Reference
PXE boot behavior is controlled entirely through kernel command-line parameters. These are set in your PXE boot loader configuration (e.g. pxelinux.cfg/default or an iPXE script).
Required Parameters
| Parameter | Description |
|---|---|
netsrc=wget, netsrc=tftp, or netsrc=nfs | Selects the download protocol. This is the master switch — if netsrc is not set, PXE boot is skipped entirely. |
neturl=... | The URL or address of the boot files on your server. The format depends on which netsrc you choose (see protocol-specific sections below). |
Optional Parameters
| Parameter | Description |
|---|---|
netargs=... | Extra flags passed directly to the download command (wget, tftp, or mount.nfs). Useful for things like custom timeouts or NFS mount options. |
iso_filename=... | Override the expected ISO filename. Only needed if you renamed the ISO from its default pmagic_V.V.iso. |
boot=live | Not typically needed for PXE — the system automatically uses live mode since files are already in RAM. Documented here for completeness. |
directory=... | Subdirectory prefix for the pmagic tree. Defaults to empty. If your files are nested under a subdirectory on the server, set this accordingly. |
Server Directory Layout
Regardless of which protocol you use, the server needs to host the Parted Magic pmodules directory tree. The easiest way to get this is to mount or extract the Parted Magic ISO.
Extracting files from the ISO
# Mount the ISO
sudo mkdir -p /mnt/pmagic
sudo mount -o loop pmagic_V.V.iso /mnt/pmagic
# The files you need are here:
ls /mnt/pmagic/pmagic/pmodules/
# PMAGIC_V.V.SQFS (main squashfs image — required)
# *.SQFM (optional module bundles)
# scripts/ (optional startup scripts)
The kernel and initrd are at the top level of the ISO:
ls /mnt/pmagic/pmagic/
# bzImage (kernel)
# initrd.img (initial ramdisk)
The PMAGIC_V.V.SQFS and any .SQFM bundles are what gets downloaded at boot time via your chosen protocol.
Protocol 1: HTTP (wget)
The recommended protocol for most deployments. HTTP is fast, supports resume on interrupted downloads, and works through most network infrastructure without special configuration.
Server setup
Serve the pmodules directory over HTTP using any web server. Directory listing must be enabled because wget --recursive crawls the listing to discover files.
Example: nginx
# /etc/nginx/sites-available/pmagic
server {
listen 80;
server_name pxe.local;
location /pmagic/ {
alias /srv/pmagic/pmodules/;
autoindex on; # Required — wget needs directory listings
}
}
Example: Apache
# /etc/apache2/sites-available/pmagic.conf
<VirtualHost *:80>
DocumentRoot /srv/pmagic/pmodules
<Directory /srv/pmagic/pmodules>
Options +Indexes # Required for wget --recursive
Require all granted
</Directory>
</VirtualHost>
Example: Python (quick testing)
# Quick and dirty — fine for testing, not for production
cd /srv/pmagic/pmodules
python3 -m http.server 80
Boot loader configuration
pxelinux / syslinux
# pxelinux.cfg/default
DEFAULT pmagic
LABEL pmagic
KERNEL pmagic/bzImage
INITRD pmagic/initrd.img
APPEND netsrc=wget neturl=http://192.168.1.10/pmagic/
iPXE
#!ipxe
kernel http://192.168.1.10/pmagic/bzImage netsrc=wget neturl=http://192.168.1.10/pmagic/
initrd http://192.168.1.10/pmagic/initrd.img
boot
GRUB (UEFI PXE)
# grub.cfg
menuentry "Parted Magic (PXE)" {
linux pmagic/bzImage netsrc=wget neturl=http://192.168.1.10/pmagic/
initrd pmagic/initrd.img
}
How it works internally
When netsrc=wget, the init script runs:
wget --no-check-certificate \
--reject index.html* \
--quiet --continue --show-progress \
--recursive -nH --no-parent \
${netargs} "${neturl}"
This recursively downloads everything under the URL. The --reject index.html* flag filters out directory listing pages. After the download, the script searches for PMAGIC_V.V.SQFS in the downloaded tree and moves everything into place.
Passing extra wget flags
Use netargs= to pass additional flags to wget. For example, to set a download timeout:
APPEND netsrc=wget neturl=http://192.168.1.10/pmagic/ netargs=--timeout=30
Protocol 2: TFTP
TFTP is the classic PXE protocol. It requires no special server software beyond what you already have for the PXE boot loader. However, it is significantly slower than HTTP for large files, has no built-in resume capability, and requires you to explicitly list every file to download.
Server setup
Place the Parted Magic files in your existing TFTP root (typically /srv/tftp or /tftpboot).
# Copy files into the TFTP root
mkdir -p /srv/tftp/pmagic/pmodules
cp /mnt/pmagic/pmagic/bzImage /srv/tftp/pmagic/
cp /mnt/pmagic/pmagic/initrd.img /srv/tftp/pmagic/
cp /mnt/pmagic/pmagic/pmodules/* /srv/tftp/pmagic/pmodules/
# Verify
ls /srv/tftp/pmagic/pmodules/
# PMAGIC_V.V.SQFS
# *.SQFM (if any)
neturl format for TFTP
The neturl for TFTP uses a colon-separated format rather than a standard URL:
neturl=HOST:PATH:FILE1,FILE2,FILE3
Where:
- HOST — IP address or hostname of the TFTP server
- PATH — Directory path on the TFTP server containing the files (relative to the TFTP root)
- FILE1,FILE2,… — Comma-separated list of additional files to download beyond the main SQFS. The SQFS itself (
PMAGIC_V.V.SQFS) is always downloaded automatically — you do not need to list it here.
Boot loader configuration
Basic — SQFS only (no extra modules)
# pxelinux.cfg/default
DEFAULT pmagic
LABEL pmagic
KERNEL pmagic/bzImage
INITRD pmagic/initrd.img
APPEND netsrc=tftp neturl=192.168.1.10:pmagic/pmodules:
Note the trailing colon after the path — even with no extra files, the three-field format is required.
With additional module bundles
# Download SQFS plus two SQFM bundles
APPEND netsrc=tftp neturl=192.168.1.10:pmagic/pmodules:extras.SQFM,tools.SQFM
With scripts in a subdirectory
# Download SQFS plus a startup script
APPEND netsrc=tftp neturl=192.168.1.10:pmagic/pmodules:scripts/autorun.sh
Subdirectories are created automatically on the client side — you can use paths like scripts/autorun.sh in the file list and they will be placed in the correct location.
Block size tuning
The init script uses a 65535-byte block size for the main SQFS download and 32768 bytes for additional files. These are the maximum values allowed by the TFTP extensions RFC. If your TFTP server does not support large block sizes (some older tftpd implementations), downloads may fail. In that case, ensure your server supports the TFTP blocksize option — tftpd-hpa and dnsmasq both do by default.
Protocol 3: NFS
NFS mounts the remote directory directly, then copies all files to RAM. This is efficient for large deployments where the same NFS export serves multiple machines, since the server only needs to read the files from disk once (the OS page cache handles the rest).
Server setup
# /etc/exports
/srv/pmagic/pmodules 192.168.1.0/24(ro,no_subtree_check,no_root_squash)
# Apply the export
sudo exportfs -ra
# Verify
showmount -e localhost
# /srv/pmagic/pmodules 192.168.1.0/24
The export should be read-only. Parted Magic only reads from the NFS share — it copies everything to RAM and unmounts before continuing to boot.
Boot loader configuration
# pxelinux.cfg/default
DEFAULT pmagic
LABEL pmagic
KERNEL pmagic/bzImage
INITRD pmagic/initrd.img
APPEND netsrc=nfs neturl=192.168.1.10:/srv/pmagic/pmodules
Passing NFS mount options
Use netargs= to pass extra options to mount.nfs. These are added as an additional -o argument. For example, to force NFS version 3 and set a timeout:
APPEND netsrc=nfs neturl=192.168.1.10:/srv/pmagic/pmodules netargs=vers=3,timeo=300
The mount is always done with ro,nolock. Your netargs are appended to these defaults.
Complete Worked Examples
Example 1: Minimal dnsmasq PXE server
This is a self-contained PXE server using dnsmasq for both DHCP and TFTP, and Python for HTTP file serving. Suitable for a small lab or one-off deployment.
# Step 1: Extract the ISO
sudo mkdir -p /srv/pmagic
sudo mount -o loop pmagic_V.V.iso /mnt
sudo cp -r /mnt/pmagic /srv/pmagic/
sudo umount /mnt
# Step 2: Set up the TFTP root with the boot loader and kernel
sudo mkdir -p /srv/tftp/pmagic
sudo cp /usr/lib/PXELINUX/pxelinux.0 /srv/tftp/
sudo cp /usr/lib/syslinux/modules/bios/ldlinux.c32 /srv/tftp/
sudo cp /srv/pmagic/pmagic/bzImage /srv/tftp/pmagic/
sudo cp /srv/pmagic/pmagic/initrd.img /srv/tftp/pmagic/
# Step 3: Create the PXE menu
sudo mkdir -p /srv/tftp/pxelinux.cfg
cat <<'EOF' | sudo tee /srv/tftp/pxelinux.cfg/default
DEFAULT pmagic
PROMPT 0
LABEL pmagic
KERNEL pmagic/bzImage
INITRD pmagic/initrd.img
APPEND netsrc=wget neturl=http://192.168.1.10/pmagic/pmodules/
EOF
# Step 4: Configure dnsmasq
cat <<'EOF' | sudo tee /etc/dnsmasq.d/pxe.conf
interface=eth0
bind-interfaces
# DHCP range — adjust for your network
dhcp-range=192.168.1.100,192.168.1.200,255.255.255.0,1h
# PXE boot
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/srv/tftp
EOF
sudo systemctl restart dnsmasq
# Step 5: Serve the pmodules over HTTP
cd /srv/pmagic/pmagic/pmodules
sudo python3 -m http.server 80 &
Boot a client machine from the network and it will PXE boot into Parted Magic.
Example 2: UEFI PXE with GRUB and HTTP
Modern UEFI systems may not support pxelinux. Use GRUB’s network boot support instead.
# Build a GRUB PXE image (on the server)
grub-mknetdir --net-directory=/srv/tftp
# This creates:
# /srv/tftp/boot/grub/x86_64-efi/core.efi (the UEFI PXE bootloader)
# /srv/tftp/boot/grub/grub.cfg (GRUB config)
# Copy PM kernel and initrd alongside it
cp /srv/pmagic/pmagic/bzImage /srv/tftp/pmagic/
cp /srv/pmagic/pmagic/initrd.img /srv/tftp/pmagic/
# Create /srv/tftp/boot/grub/grub.cfg
cat <<'EOF' > /srv/tftp/boot/grub/grub.cfg
set timeout=5
set default=0
menuentry "Parted Magic (PXE - HTTP)" {
linux pmagic/bzImage netsrc=wget neturl=http://192.168.1.10/pmagic/pmodules/
initrd pmagic/initrd.img
}
menuentry "Parted Magic (PXE - NFS)" {
linux pmagic/bzImage netsrc=nfs neturl=192.168.1.10:/srv/pmagic/pmagic/pmodules
initrd pmagic/initrd.img
}
EOF
# Point UEFI clients at the GRUB image via DHCP option 67:
# In dnsmasq:
# dhcp-match=set:efi-x86_64,option:client-arch,7
# dhcp-boot=tag:efi-x86_64,boot/grub/x86_64-efi/core.efi
Example 3: iPXE chainloading
iPXE is a powerful open-source PXE firmware that supports HTTP natively. If your hardware PXE ROM is limited, you can chainload into iPXE first.
#!ipxe
# Serve this script via your DHCP server's boot-file option
# Optionally set a static IP instead of DHCP:
# set net0/ip 192.168.1.50
# set net0/netmask 255.255.255.0
# set net0/gateway 192.168.1.1
# set dns 192.168.1.1
echo Booting Parted Magic via HTTP...
kernel http://192.168.1.10/pmagic/bzImage netsrc=wget neturl=http://192.168.1.10/pmagic/pmodules/
initrd http://192.168.1.10/pmagic/initrd.img
boot || shell
Note that with iPXE, both the kernel and initrd are fetched over HTTP (fast), and then the SQFS download also uses HTTP. This is significantly faster than a pure TFTP setup.
Example 4: TFTP-only deployment (no HTTP server)
If you cannot run an HTTP server and only have TFTP available, you can use it for the file download as well. This is the simplest setup but the slowest.
# All files in the TFTP root:
/srv/tftp/
├── pxelinux.0
├── ldlinux.c32
├── pxelinux.cfg/
│ └── default
└── pmagic/
├── bzImage
├── initrd.img
└── pmodules/
├── PMAGIC_V.V.SQFS
├── extras.SQFM
└── scripts/
└── autorun.sh
# pxelinux.cfg/default:
DEFAULT pmagic
LABEL pmagic
KERNEL pmagic/bzImage
INITRD pmagic/initrd.img
APPEND netsrc=tftp neturl=192.168.1.10:pmagic/pmodules:extras.SQFM,scripts/autorun.sh
Example 5: NFS with custom mount options
# Server: /etc/exports
/srv/pmagic/pmagic/pmodules 10.0.0.0/8(ro,no_subtree_check,async)
# Client boot parameters:
APPEND netsrc=nfs neturl=10.0.0.5:/srv/pmagic/pmagic/pmodules netargs=vers=3,rsize=32768
The rsize=32768 option increases the NFS read size for better throughput. The vers=3 forces NFSv3 which avoids potential issues with NFSv4 ID mapping in the minimal initrd environment.
Split-File PXE (Advanced)
Some PXE environments have file-size limitations (particularly older TFTP implementations). Parted Magic supports splitting large files into numbered chunks that are automatically reassembled at boot time using the concat mechanism.
If a file named /p0000 exists in the initrd, it is sourced as a shell script at early boot. This can contain concat calls for reassembling split files. The concat function takes a prefix and a destination path — for example, concat /data /data.img would join /data00, /data01, etc. into /data.img.
Splitting files
# Split a large file into 10MB chunks
split -b 10M -d largefile.bin largefile
# Produces: largefile00, largefile01, largefile02, ...
The chunks must be named with a two-digit numeric suffix starting at 00. The first chunk (00) is used as the base — remaining chunks are appended to it in order and then removed.
pmodules and Startup Scripts
Beyond the core SQFS image, the PXE download can include additional .SQFM module bundles and startup scripts that are executed after the system boots.
Module bundles (.SQFM)
SQFM files are SquashFS images that are mounted as overlay layers on top of the base system. They can add software, configuration, or customizations. Place them alongside PMAGIC_V.V.SQFS in the pmodules directory and they will be loaded automatically.
Startup scripts
Shell scripts placed in the pmodules/scripts/ directory are copied into /tmp/scripts/ in the booted system, where they can be executed by the post-boot initialization. This is useful for automated tasks like launching a wipe tool or configuring network settings.
Loading optional modules
If you have optional SQFM bundles in a separate optionals/ directory, you can selectively load them using the oload= boot parameter:
# Load only the modules whose filenames contain "network" or "drivers"
APPEND netsrc=wget neturl=http://192.168.1.10/pmagic/pmodules/ oload=network:drivers
Multiple module names are separated by colons. The names are matched as substrings against filenames in the optionals/ directory.
RAM Requirements
PXE boot loads all files into RAM. The client machine must have enough memory to hold the SQFS image, any SQFM bundles, and the running system. As a baseline, Parted Magic requires a minimum of approximately 3.3 GB of RAM for a normal (non-live) boot. PXE boot uses live mode internally, so the actual requirement depends on the size of your SQFS and any modules.
A rough formula: Required RAM ≈ size of PMAGIC_V.V.SQFS + size of all .SQFM files + 1 GB (for the running system, overlay, and tmpfs).
Troubleshooting
“PMAGIC_V.V.SQFS not found” after download
- Verify that the SQFS file is actually present on the server at the expected path.
- For HTTP: check that directory listing is enabled on your web server. Without it,
wget --recursivecannot discover files. - For TFTP: check that the path in
neturlis relative to the TFTP root, not an absolute filesystem path. - For NFS: check that the export path in
neturlmatches/etc/exportsexactly. - Check that the Parted Magic version in the filenames matches the version built into the
initrd.imgyou’re booting.
DHCP fails / no IP address
- Ensure your DHCP server is running and the client is on the same network segment.
- If the machine has multiple NICs, the init script tries all non-loopback interfaces. If your DHCP server only serves one VLAN, ensure the correct NIC is connected.
- Use
tracing=yeson the kernel command line to enable verbose output and see exactly which interfaces are being tried.
Download is extremely slow
- If using TFTP, switch to HTTP (
netsrc=wget). HTTP is dramatically faster for large files. - If using NFS, try adding
netargs=rsize=32768to increase the read buffer size. - Check for network duplex mismatches — a 1 Gbps NIC negotiating at 100 Mbps half-duplex will be very slow.
Debugging with tracing and initrd_shell
Two boot parameters are invaluable for debugging PXE issues:
# Enable bash xtrace — every command is printed before execution
APPEND netsrc=wget neturl=http://... tracing=yes
# Drop to a shell inside the initrd before PXE starts
# Useful for manually testing network connectivity or file paths
APPEND netsrc=wget neturl=http://... initrd_shell=yes
With initrd_shell=yes, you get a shell prompt before the PXE download begins. You can manually run commands like ip addr, ping, or wget to diagnose connectivity issues. Type exit to continue the normal boot sequence.
Version mismatch warnings
If you see “The above file was created for another PM version” during boot, it means one or more SQFM bundles on the server were built for a different version of Parted Magic than the SQFS you are booting. Update the bundles to match the current version, or remove them if they are not needed.
Protocol Comparison
| HTTP (wget) | TFTP | NFS | |
|---|---|---|---|
| Speed | Fast | Slow for large files | Fast |
| Resume support | Yes | No | N/A (mount-based) |
| File discovery | Automatic (recursive crawl) | Manual (explicit file list) | Automatic (directory mount) |
| Server requirements | Any HTTP server | TFTP server (usually already present) | NFS server |
| Firewall complexity | Single port (80 or 443) | UDP 69 + dynamic high ports | Multiple ports (111, 2049, mountd) |
| Best for | Most deployments | Minimal environments, legacy setups | Large-scale / high-throughput LANs |
Quick-Start Cheat Sheet
Copy-paste boot lines for each protocol. Replace 192.168.1.10 with your server’s IP and adjust paths as needed.
HTTP
APPEND netsrc=wget neturl=http://192.168.1.10/pmagic/pmodules/
TFTP (SQFS only)
APPEND netsrc=tftp neturl=192.168.1.10:pmagic/pmodules:
TFTP (with extra files)
APPEND netsrc=tftp neturl=192.168.1.10:pmagic/pmodules:extras.SQFM,scripts/autorun.sh
NFS
APPEND netsrc=nfs neturl=192.168.1.10:/srv/pmagic/pmagic/pmodules
