wmirescue/bookworm-amd64/bin/ramdisk_make

15 lines
296 B
Plaintext
Raw Normal View History

2023-06-11 11:30:27 +02:00
#!/bin/sh
TARGET=$1
RAMDISK=$2
if [ ! -d "${RAMDISK}" ]; then
echo "Usage: $0 <ramdisk_img> <ramdisk_dir>"
exit 255
fi
echo "Generating initramfs..."
2023-06-11 13:27:45 +02:00
#(cd ${RAMDISK}; find . | cpio -H newc -o | gzip -1) > ${TARGET}
(cd ${RAMDISK}; find . | cpio -H newc -o | zstd -19 --check) > ${TARGET}