Commit 75e3f3c9 authored by Nico Schottelius's avatar Nico Schottelius

write script to generate outdir from filelist

Signed-off-by: default avatarNico Schottelius <nico@wurzel.schottelius.org>
parent 9f3a8c09
#!/bin/sh
set -ex
testdir=./iso-root-dir
# Create base
rm -rf "$testdir"
mkdir "$testdir"
# Copy binaries
# Copy kernel
mkdir -p "$testdir/boot"
cp /boot/vmlinuz-linux "$testdir/boot/kernel"
cp /boot/initramfs-linux-fallback.img "$testdir/boot/initramfs"
# Create iso
genisoimage -v -V "cdist preos v0.1" \
-cache-inodes -J -l \
-r -no-emul-boot \
-boot-load-size 4 -b isolinux.bin -c boot.cat -o cdist-preos.iso iso
#!/bin/sh
# Generate filelist excluding stuff that takes only space
for pkg in bash systemd util-linux; do
pacman -Qlq $pkg | grep -v \
-e /usr/share/man/
done
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 outdir"
exit 1
fi
outdir=$1; shift
mkdir -p "$outdir"
while read file; do
if [ -d "$file" ]; then
mkdir -p "$outdir$file"
else
cp --preserve=mode,links "$file" "$outdir$file"
fi
done
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 iso"
exit 1
fi
iso=$1; shift
qemu-system-x86_64 -m 512 -boot order=cd \
-drive=$iso,media=cdrom
File mode changed from 100644 to 100755
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment