Fix PAL review findings: documentation accuracy and code quality

- Update CLAUDE.md with complete kernel parameters including boot=netboot
- Remove duplicate wget/curl package declarations in build-image.sh
- Check unsquashfs in both /usr/bin and /usr/sbin in verify-image.sh
- Use consistent $quiet variable expansion in netboot hook functions

All issues identified in zen-opus pre-commit review are now resolved.
This commit is contained in:
2026-01-31 10:55:57 +01:00
parent d7d0098a5c
commit 95f543b4f4
4 changed files with 13 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ Located in `initramfs/` directory, passed to `mkinitramfs` with `-d` flag:
**http/boot.ipxe** - iPXE script that:
- Loads kernel from `http://192.168.100.1:8800/vmlinuz`
- Loads initramfs from `http://192.168.100.1:8800/initrd-netboot.img`
- Sets kernel args: `root=http://192.168.100.1:8800/filesystem.squashfs rootfstype=squashfs overlayroot=tmpfs ip=dhcp console=ttyS0,115200`
- Sets kernel args: `boot=netboot root=http://192.168.100.1:8800/filesystem.squashfs rootfstype=squashfs overlayroot=tmpfs ip=dhcp console=tty0 console=ttyS0,115200 earlyprintk=serial,ttyS0,115200 loglevel=7`
- Boots the kernel
**IMPORTANT:** The HTTP server IP (192.168.100.1:8800) is hardcoded in boot.ipxe. Update this if the boot server changes.

View File

@@ -105,9 +105,7 @@ apt-get install -y \
less \
rsync \
git \
squashfs-tools \
wget \
curl
squashfs-tools
# Clean up
apt-get clean

View File

@@ -11,7 +11,7 @@ TMPFS_MOUNT=/mnt
netboot_top()
{
if [ "${netboot_top_used}" != "yes" ]; then
[ "${quiet?}" != "y" ] && log_begin_msg "Running /scripts/netboot-top"
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/netboot-top"
run_scripts /scripts/netboot-top
[ "$quiet" != "y" ] && log_end_msg
fi
@@ -21,7 +21,7 @@ netboot_top()
netboot_premount()
{
if [ "${netboot_premount_used}" != "yes" ]; then
[ "${quiet?}" != "y" ] && log_begin_msg "Running /scripts/netboot-premount"
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/netboot-premount"
run_scripts /scripts/netboot-premount
[ "$quiet" != "y" ] && log_end_msg
fi
@@ -31,7 +31,7 @@ netboot_premount()
netboot_bottom()
{
if [ "${netboot_premount_used}" = "yes" ] || [ "${netboot_top_used}" = "yes" ]; then
[ "${quiet?}" != "y" ] && log_begin_msg "Running /scripts/netboot-bottom"
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/netboot-bottom"
run_scripts /scripts/netboot-bottom
[ "$quiet" != "y" ] && log_end_msg
fi

View File

@@ -127,7 +127,7 @@ else
fi
# Check required binaries
for binary in wget curl unsquashfs awk; do
for binary in wget curl awk; do
if [ -f "$TMPDIR/initramfs/main/usr/bin/$binary" ]; then
success "$binary binary present"
else
@@ -135,6 +135,13 @@ for binary in wget curl unsquashfs awk; do
fi
done
# Check unsquashfs in both possible locations
if [ -f "$TMPDIR/initramfs/main/usr/bin/unsquashfs" ] || [ -f "$TMPDIR/initramfs/main/usr/sbin/unsquashfs" ]; then
success "unsquashfs binary present"
else
error "unsquashfs binary missing from initramfs"
fi
if [ -f "$TMPDIR/initramfs/main/usr/sbin/switch_root" ]; then
success "switch_root binary present"
else