mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Explain the magic
This commit is contained in:
parent
56f5aba2ca
commit
b715b67f2c
1 changed files with 6 additions and 0 deletions
|
|
@ -58,11 +58,17 @@ MD=`mdconfig -a -t vnode -f ${TMPFILE0} -x ${SC} -y ${HD}`
|
|||
rm -f ${TMPFILE0}
|
||||
echo ${SECTS} ${SC} ${HD} ${DATASIZE} | awk '
|
||||
{
|
||||
# size of cylinder in sectors
|
||||
cs = $2 * $3
|
||||
# number of full cylinders
|
||||
cyl = $1 / cs
|
||||
print "g c" cyl " h" $3 " s" $2
|
||||
# Size of data/conf patition, round up to full cylinder
|
||||
dsl = int (($4 + cs - 1) / cs)
|
||||
# Size of code partition cylinder = half the remainder
|
||||
csl = int ((cyl - dsl) / 2)
|
||||
# ... But that could round down, so make the data/conf
|
||||
# use whatever the code partitions do not use.
|
||||
dsl = cyl - csl * 2
|
||||
print "p 1 165 " $2, csl * cs - $2
|
||||
print "p 2 165 " $2 + csl * cs, csl * cs - $2
|
||||
|
|
|
|||
Loading…
Reference in a new issue