summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build/binary_hdd14
-rwxr-xr-xscripts/build/config12
2 files changed, 23 insertions, 3 deletions
diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd
index c958aff9a..0ffb20a7f 100755
--- a/scripts/build/binary_hdd
+++ b/scripts/build/binary_hdd
@@ -172,7 +172,12 @@ esac
case "${LB_BUILD_WITH_CHROOT}" in
true)
Chroot chroot "parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE}" || true
- Chroot chroot "parted -a optimal -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0% 100%" || true
+ if [ "x${LB_HDD_PARTITION_START}" = "x" ]; then
+ Chroot chroot "parted -a optimal -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0% 100%" || true
+ else
+ Echo_message "using partition start at ${LB_HDD_PARTITION_START}"
+ Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} ${LB_HDD_PARTITION_START} 100%" || true
+ fi
Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
@@ -184,7 +189,12 @@ case "${LB_BUILD_WITH_CHROOT}" in
false)
parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE} || true
- parted -a optimal -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0% 100% || true
+ if [ "x${LB_HDD_PARTITION_START}" = "x" ]; then
+ parted -a optimal -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0% 100% || true
+ else
+ Echo_message "using partition start at ${LB_HDD_PARTITION_START}"
+ parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} ${LB_HDD_PARTITION_START} 100% || true
+ fi
parted -s "${FREELO}" set 1 boot on || true
parted -s "${FREELO}" set 1 lba off || true
diff --git a/scripts/build/config b/scripts/build/config
index fbe986588..e5810b45d 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -69,6 +69,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
\t [--hdd-label LABEL]\n\
\t [--hdd-size MB]\n\
+\t [--hdd-partition-start [parted unit, e.g. 63s]\n\
\t [--iso-application NAME]\n\
\t [--iso-preparer NAME]\n\
\t [--iso-publisher NAME]\n\
@@ -139,7 +140,7 @@ Local_arguments ()
security:,updates:,backports:,binary-filesystem:,binary-images:,
apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloaders:,checksums:,compression:,config:,zsync:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
- grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:,
+ grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,hdd-partition-start:,iso-application:,iso-preparer:,iso-publisher:,
iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,
@@ -566,6 +567,11 @@ Local_arguments ()
shift 2
;;
+ --hdd-partition-start)
+ LB_HDD_PARTITION_START="${2}"
+ shift 2
+ ;;
+
--iso-application)
LB_ISO_APPLICATION="${2}"
shift 2
@@ -1198,6 +1204,10 @@ LB_HDD_LABEL="${LB_HDD_LABEL}"
# (Default: ${LB_HDD_SIZE})
LB_HDD_SIZE="${LB_HDD_SIZE}"
+# \$LB_HDD_PARTITION_START: set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout.
+# (Default: ${LB_HDD_PARTITION_START})
+LB_HDD_PARTITION_START="${LB_HDD_PARTITION_START}"
+
# \$LB_ISO_APPLICATION: set iso author
# (Default: ${LB_ISO_APPLICATION})
LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"