2023-01-17 10:35:11 +00:00
|
|
|
#!/bin/env sh
|
|
|
|
|
|
|
|
grub_config=$(cat <<EOF
|
|
|
|
|
|
|
|
set timeout=15
|
|
|
|
set default=0
|
|
|
|
|
|
|
|
menuentry "StupidOS" {
|
|
|
|
echo "verify system integrity"
|
|
|
|
hashsum --hash sha256 --check /boot/hashfile --prefix /
|
|
|
|
multiboot /vmstupid
|
|
|
|
boot
|
|
|
|
}
|
|
|
|
|
|
|
|
EOF
|
|
|
|
)
|
|
|
|
|
|
|
|
gen_iso_file() {
|
|
|
|
mkdir -p "$2/boot/grub"
|
|
|
|
echo "$grub_config" > "$2/boot/grub/grub.cfg"
|
2023-01-17 14:36:21 +00:00
|
|
|
sha256sum vmstupid > "$2/boot/hashfile"
|
2023-01-17 10:35:11 +00:00
|
|
|
|
|
|
|
grub-mkrescue -o $1 $2
|
|
|
|
}
|
|
|
|
|
|
|
|
gen_iso_file "$1" "$2"
|