summaryrefslogtreecommitdiff
path: root/config/binary_local-hooks/isohybrid-acritox
blob: 5fba975a90d7f0a51cc1f7c4d57a4093a80cb35d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# generate space-file (binary/boot.isohybrid) for isohybrid-acritox

[ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] || exit 0

case "$LB_BOOTLOADER" in
grub2|burg)
	;;
*)
	exit 0
	;;
esac

size=$((3*1024)) # 3MB
chroot chroot grub-mkimage -p "/boot/grub" -d /usr/lib/grub/i386-pc -o "/boot.isohybrid" -O i386-pc biosdisk iso9660
perl -e "print '<ACRITOX-HYBRID>'x(64*$size);" > binary/boot.isohybrid
dd if=chroot/boot.isohybrid of=binary/boot.isohybrid bs=1M conv=notrunc
rm -f chroot/boot.isohybrid