Add netboot infrastructure: custom initramfs hooks, build scripts, iPXE configuration
This commit is contained in:
38
initramfs/hooks/netboot
Executable file
38
initramfs/hooks/netboot
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Add useful binaries to initrd for netboot HTTP root mounting
|
||||
#
|
||||
|
||||
if [ "$1" = "prereqs" ]; then
|
||||
echo "udev"
|
||||
exit
|
||||
fi
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
# Essential utilities for netboot - copy_exec handles dependencies automatically
|
||||
copy_exec "/usr/bin/wget"
|
||||
copy_exec "/usr/bin/curl"
|
||||
copy_exec "/usr/bin/unsquashfs"
|
||||
copy_exec "/usr/sbin/switch_root"
|
||||
|
||||
# Useful tools for debugging
|
||||
copy_exec "/usr/bin/awk"
|
||||
copy_exec "/usr/bin/bash"
|
||||
copy_exec "/usr/bin/chmod"
|
||||
copy_exec "/usr/bin/file"
|
||||
copy_exec "/usr/bin/free"
|
||||
copy_exec "/usr/bin/grep"
|
||||
copy_exec "/usr/bin/gunzip"
|
||||
copy_exec "/usr/bin/gzip"
|
||||
copy_exec "/usr/bin/less"
|
||||
copy_exec "/usr/bin/lsblk"
|
||||
copy_exec "/usr/bin/mount"
|
||||
copy_exec "/usr/bin/readlink"
|
||||
copy_exec "/usr/bin/sed"
|
||||
copy_exec "/usr/bin/timeout"
|
||||
copy_exec "/usr/bin/touch"
|
||||
copy_exec "/usr/bin/vi"
|
||||
|
||||
# Note: copy_exec automatically handles all shared library dependencies via ldd()
|
||||
# No need to manually copy libc or other libraries - copy_exec handles this
|
||||
Reference in New Issue
Block a user