--- /dev/null
+
+---layout----------
+Disk <removed>: 1 GiB, 1073741824 bytes, 2097152 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 2097151 2095104 5 Extended 0/32/33 130/138/8
+<removed>5 6145 788479 782335 83 Linux 0/97/35 49/20/35
+<removed>6 2097151 2097151 1 83 Linux 130/138/8 130/138/8
+-------------------
+
--- /dev/null
+#!/bin/bash
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="MBR: default start for logical must reserve EBR gap"
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_check_test_command "$TS_CMD_FDISK"
+
+# 1GiB image => 2097152 sectors @ 512B
+TEST_IMAGE_NAME=$(ts_image_init 1024)
+
+# key assertion is in the resulting layout: L2 must not start at 788480,
+# but at 790528 (= 788480 + 2048), leaving room for the EBR.
+echo -e \
+"o
+n
+e
+1
+2048
+2097151
+n
+6145
+788479
+n
+788480
+2097151
+w
+q
+" | $TS_CMD_FDISK --noauto-pt "$TEST_IMAGE_NAME" &> /dev/null
+
+echo -ne "\n---layout----------\n" >> "$TS_OUTPUT"
+$TS_CMD_FDISK -x "$TEST_IMAGE_NAME" >> "$TS_OUTPUT"
+echo -ne "-------------------\n\n" >> "$TS_OUTPUT"
+ts_fdisk_clean "$TEST_IMAGE_NAME"
+
+ts_finalize