make_mirror.sh: write /usr/lib/SYSLINUX/mbr.bin to the first 440 bytes

This commit is contained in:
Johannes 'josch' Schauer 2020-11-15 22:57:13 +01:00
parent 0c990abc48
commit 94459eafbe
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -533,12 +533,10 @@ END
# fail to run.
guestfish -N "$tmpdir/debian-$DEFAULT_DIST.img"=disk:3G -- \
part-disk /dev/sda mbr : \
part-set-bootable /dev/sda 1 true : \
mkfs ext2 /dev/sda1 : \
mount /dev/sda1 / : \
tar-in "$tmpdir/debian-chroot.tar" / : \
command /sbin/ldconfig : \
extlinux / : \
copy-in "$tmpdir/extlinux.conf" / : \
mkdir-p /etc/systemd/system/multi-user.target.wants : \
ln-s ../mmdebstrap.service /etc/systemd/system/multi-user.target.wants/mmdebstrap.service : \
@ -547,8 +545,13 @@ END
copy-in "$tmpdir/mini-httpd" /etc/default : \
copy-in "$tmpdir/hosts" /etc/ : \
touch /mmdebstrap-testenv : \
upload /usr/lib/SYSLINUX/mbr.bin /mbr.bin : \
copy-file-to-device /mbr.bin /dev/sda size:440 : \
rm /mbr.bin : \
extlinux / : \
sync : \
umount / : \
part-set-bootable /dev/sda 1 true : \
shutdown
qemu-img convert -O qcow2 "$tmpdir/debian-$DEFAULT_DIST.img" "$newcachedir/debian-$DEFAULT_DIST.qcow"
cleanuptmpdir