From 94459eafbe7c5fb910cb0ab4a1091f95425d4d9a Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sun, 15 Nov 2020 22:57:13 +0100 Subject: [PATCH] make_mirror.sh: write /usr/lib/SYSLINUX/mbr.bin to the first 440 bytes --- make_mirror.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/make_mirror.sh b/make_mirror.sh index e33e0c3..749a68c 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -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