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 untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -533,12 +533,10 @@ END
# fail to run. # fail to run.
guestfish -N "$tmpdir/debian-$DEFAULT_DIST.img"=disk:3G -- \ guestfish -N "$tmpdir/debian-$DEFAULT_DIST.img"=disk:3G -- \
part-disk /dev/sda mbr : \ part-disk /dev/sda mbr : \
part-set-bootable /dev/sda 1 true : \
mkfs ext2 /dev/sda1 : \ mkfs ext2 /dev/sda1 : \
mount /dev/sda1 / : \ mount /dev/sda1 / : \
tar-in "$tmpdir/debian-chroot.tar" / : \ tar-in "$tmpdir/debian-chroot.tar" / : \
command /sbin/ldconfig : \ command /sbin/ldconfig : \
extlinux / : \
copy-in "$tmpdir/extlinux.conf" / : \ copy-in "$tmpdir/extlinux.conf" / : \
mkdir-p /etc/systemd/system/multi-user.target.wants : \ mkdir-p /etc/systemd/system/multi-user.target.wants : \
ln-s ../mmdebstrap.service /etc/systemd/system/multi-user.target.wants/mmdebstrap.service : \ 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/mini-httpd" /etc/default : \
copy-in "$tmpdir/hosts" /etc/ : \ copy-in "$tmpdir/hosts" /etc/ : \
touch /mmdebstrap-testenv : \ 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 : \ sync : \
umount / : \ umount / : \
part-set-bootable /dev/sda 1 true : \
shutdown shutdown
qemu-img convert -O qcow2 "$tmpdir/debian-$DEFAULT_DIST.img" "$newcachedir/debian-$DEFAULT_DIST.qcow" qemu-img convert -O qcow2 "$tmpdir/debian-$DEFAULT_DIST.img" "$newcachedir/debian-$DEFAULT_DIST.qcow"
cleanuptmpdir cleanuptmpdir