Troubleshooting and Common Issues
Complete guide to diagnosing and resolving common PanOS build, boot, and runtime issues
Troubleshooting and Common Issues
Quick Diagnostic Check
Before troubleshooting, run the diagnostic script:
./3-check.shThis validates your build and shows what's present/missing:
✅ Kernel (vmlinuz) ............ 3.3M
✅ Initramfs ................... 142M
✅ Node.js integrated
✅ npm integrated
✅ Bootable ISO ............... 156M
✓ System ready to useBuild Issues
Issue: "No space left on device"
Error Message:
make[4]: *** delete target 'fs/ext4/inode.o' – No space left on deviceCause: Insufficient disk space for kernel compilation
Solution:
-
Check available space:
df -h / -
Need 30+ GB free. If not enough:
# List large files du -sh /* | sort -h # Remove cache sudo apt-get clean # Remove old build (if exists) rm -rf ~/pan-os-iso -
Retry build:
./1-build.sh
Issue: Build never completes ("stuck")
Symptom: Script runs but doesn't progress for 10+ minutes
Likely Cause: Kernel compilation in progress (normal - can take 20-30 minutes)
Verify:
# In another terminal
ps aux | grep make
# If you see "make -j8" it's compiling (normal)Solution: Wait. Kernel compilation is slow. Factors affecting speed:
| Factor | Impact |
|---|---|
| CPU cores | 2 cores: 30 min, 8 cores: 12 min |
| Disk type | SSD: 15 min, HDD: 30+ min |
| System load | High load: slower |
| RAM | More RAM = faster compilation |
To speed up:
- Close unnecessary applications
- Use SSD if available
- Ensure good cooling
- Consider higher RAM allocation
Issue: Kernel compilation fails with errors
Error Message (example):
ERROR: modpost: "do_something" undefined!
Link failed with ERRORCauses:
- Corrupted source code
- Missing dependencies
- Interrupted download
Solutions:
-
Clean and retry:
rm -rf ~/pan-os-iso/kernel-src/linux-6.6.15 ./1-build.sh -
Check internet connection:
ping -c 3 google.com -
Verify dependencies:
./0-install-deps.sh
Issue: "make: bison: command not found"
Cause: Required tools not installed
Solution:
./0-install-deps.shThen retry build.
Issue: Memory issues during build
Error:
Virtual memory exhaustedCause: Insufficient RAM
Solutions:
-
Close other applications:
htop # Close heavy processes (Chrome, Docker, VMs) -
Increase swap (if needed):
sudo fallocate -l 10G /swapfile sudo dd if=/dev/zero of=/swapfile bs=1M count=10000 sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile
Issue: Download fails (network timeout)
Error:
wget: read error (Connection reset by peer)Causes:
- Unstable internet
- Server temporarily down
- Network path issue
Solutions:
-
Wait and retry:
sleep 60 ./1-build.sh # Resumes from where it stopped -
Check internet:
ping -c 5 google.com traceroute kernel.org -
Try alternative mirror:
- Edit
1-build.sh - Change kernel URL to different mirror
- Retry
- Edit
Boot Issues
Issue: Build completes but boot fails
Symptom: ./3-check.sh shows ✅ but ./2-run.sh doesn't work
Causes:
- QEMU not installed
- Corrupted build artifacts
- Permission issues
Solutions:
-
Verify QEMU:
which qemu-system-x86_64 qemu-system-x86_64 --version -
If not found, install:
sudo apt-get install -y qemu-system-x86 -
Verify build artifacts:
ls -lh ~/pan-os-iso/build/ -
Rebuild if needed:
./1-build.sh
Issue: QEMU window closes immediately
Symptom:
qemu-system-x86_64: aborting due to ERROR: unrecognized 'machine' type 'q35'Cause: QEMU configuration issue or old version
Solution:
-
Check QEMU version:
qemu-system-x86_64 --version # Should be 5.0+ -
Update QEMU:
sudo apt-get install --only-upgrade qemu-system-x86 -
Try manual boot command:
qemu-system-x86_64 \ -kernel ~/pan-os-iso/build/vmlinuz \ -initrd ~/pan-os-iso/build/initramfs.cpio \ -nographic \ -append "console=ttyS0"
Issue: Boot hangs at "Freeing" phase
Symptom:
[ 0.600000] Freeing SMP alternatives memory: 28K
[ STUCK]Causes:
- Very slow disk/system
- Kernel mismatch
Wait: Kernel initialization can take 5-10 seconds on slow systems.
If > 30 seconds, force exit (Ctrl+C) and retry.
Issue: "I/O error" messages at boot
Error:
[ERROR] I/O error, dev ram0, sector 0Causes:
- Corrupted initramfs
- Memory issues
Solutions:
-
Check initramfs integrity:
file ~/pan-os-iso/build/initramfs.cpio # Should show: gzip compressed data -
Rebuild initramfs:
./1-build.sh -
Increase RAM:
./2-run.sh # Choose option 3 (4 GB)
Runtime Issues
Issue: Shell prompt takes 30+ seconds to appear
Causes:
- System under heavy load
- Slow disk
- Initialization script taking time
Solutions:
- Close other applications
- Wait - first boot can be slower
- Subsequent boots are faster (cached)
Issue: Node.js command hangs
Error:
node test.js
[no output for 10+ seconds]Causes:
- Script running but slow
- Program waiting for input
- Permission issues
Check:
# In another terminal
ps aux | grep node
# If you see it, it's running - wait or check codeIssue: "command not found"
Error:
/ # npm install express
sh: npm: command not foundCause: npm not in PATH
Solution:
# npm should be in /bin/npm
/ # /bin/npm install express
# Or check PATH
/ # echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin
# npm location
/ # which npm
/bin/npmIf npm is missing, rebuild:
./1-build.shIssue: npm install fails
Error (example):
npm ERR! EACCES: permission denied, access '/root/.npm'Solution:
# Grant permissions
chmod -R 755 /root/.npm
# Or use npm ci
npm ciIssue: Disk full error in PanOS
Error:
sh: cannot create temp file for here-document: No space left on deviceCause: Rootfs is RAM-backed and allocation is full
Solution:
-
Check space used:
/ # df -h tmpfs 922.0M 800M 122M 87% / -
Free space:
/ # rm -rf /tmp/* / # rm unnecessary files -
Restart with more RAM:
exit # Exit PanOS ./2-run.sh # Choose 4 GB option
Issue: Network not working in PanOS
Symptom:
/ # ping 8.8.8.8
ping: bad address '8.8.8.8'Causes:
- Network interface down
- No DHCP configuration
Solutions:
-
Check interface:
/ # ip link show 1: lo: <LOOPBACK,UP> ... 2: eth0: <BROADCAST,MULTICAST> ... # DOWN? -
Bring up interface:
/ # ip link set eth0 up / # dhclient eth0 -
Check DNS:
/ # cat /etc/resolv.conf nameserver 10.0.2.3 # Should see this -
Try direct IP:
/ # ping -c 3 1.1.1.1
Issue: Cannot access files from host
Problem: Want to share files between host and PanOS
Solution: PanOS runs from RAM, changes lost on exit.
Options:
-
Copy files before booting: Edit rootfs before building
-
Use network:
# Inside PanOS / # wget http://host-ip:8000/file.txt -
Increase committed changes: Modify init script to mount real disk
See 10-advanced.mdx for persistent storage options.
Performance Issues
Issue: Everything is slow
Causes:
- Insufficient RAM allocated
- System overloaded
- Slow disk
Solutions:
-
Allocate more RAM:
./2-run.sh # Choose 4 GB -
Check system load:
/ # uptime load average: 0.5, 0.3, 0.1 # Healthy load average: 8.5, 7.3, 5.1 # Overloaded -
Use SSD host machine if possible
Issue: npm install takes very long
Reason: Network or disk speed
Solutions:
-
Use npm cache:
/ # npm ci # Faster than npm install -
Check network:
/ # ping -c 10 registry.npmjs.org # Look for packet loss -
Increase RAM:
./2-run.sh # Choose 4 GB
Debugging Techniques
Enable Verbose Output
# Boot with verbose kernel messages
./2-run.sh
# Inside QEMU, before it loads kernel,
# if using direct kernel method (./2-run.sh):
# Already shows all outputCheck Logs
# Kernel messages
/ # dmesg | tail -20
# Recent errors
/ # dmesg | grep -i errorValidate Build
# Comprehensive check
./3-check.sh
# Check individual components
file ~/pan-os-iso/build/vmlinuz
file ~/pan-os-iso/build/initramfs.cpio
cpio -t < ~/pan-os-iso/build/initramfs.cpio | head -20Inspect Initramfs
# Extract initramfs for inspection
cd /tmp
mkdir panos-extract
cd panos-extract
cpio -id < ~/pan-os-iso/build/initramfs.cpio
ls -la # See what's insideGetting Help
If you're still having issues:
- Check Documentation: Read all docs in
./docs/ - Check
Roadmap.md: Know limitations and future plans - Review Scripts: examine
1-build.sh,2-run.sh - Check GitHub Issues: Search similar problems
- Test Minimal Case: Try simple commands first
Example minimal test:
./1-build.sh # Full build
./2-run.sh # Boot with 2GB RAM
/ # node --version
v24.0.0If above works but your code doesn't, issue is with your Node.js code, not PanOS.
Next Steps
- Create Bootable Media: Read 09-creating-iso.mdx
- Advanced Customization: Read 10-advanced.mdx
- Learn Architecture Details: Read 06-architecture.mdx
Previous: 07-nodejs-integration.mdx
Next: 09-creating-iso.mdx