summaryrefslogtreecommitdiff
path: root/hscript/disk.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-03-22 02:28:46 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-03-22 02:28:46 -0500
commit0412062c13235fab34cc739ac60b473b296743d2 (patch)
tree92107f7088206d1c0fd7308bfefa824e8db48ade /hscript/disk.cc
parent4bb29bd72adfaf985194618d3a66545d0154c373 (diff)
downloadhorizon-0412062c13235fab34cc739ac60b473b296743d2.tar.gz
horizon-0412062c13235fab34cc739ac60b473b296743d2.tar.bz2
horizon-0412062c13235fab34cc739ac60b473b296743d2.tar.xz
horizon-0412062c13235fab34cc739ac60b473b296743d2.zip
hscript: Ensure partition 1 won't abut first disk sectors
Diffstat (limited to 'hscript/disk.cc')
-rw-r--r--hscript/disk.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc
index 30884d6..2718e49 100644
--- a/hscript/disk.cc
+++ b/hscript/disk.cc
@@ -539,6 +539,9 @@ bool Partition::execute() const {
}
start = before->geom.end + 1;
}
+ /* Ensure the first MiB is free for various firmware and boot software
+ * that use it. */
+ if(start < 2048) start = 2048;
switch(this->size_type()) {
case SizeType::Bytes: