anchor.diff:        # Get start & length of the root partition in sectors to $START and $SECTORS.
         eval $(partx $diskImage -o START,SECTORS --nr ${rootPartition} --pairs)
   
  -      mkfs.${fsType} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K
  +      mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K
       '' else ''
  -      mkfs.${fsType} -F -L ${label} $diskImage
  +      mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage
       ''}
   
       echo "copying staging root to image..."
  
positive.code: 
      sectorsToBytes() {
        echo $(( "$1" * 512  ))
      }
  
      mkdir $out
  
negative.code: 
      ${if diskSize == "auto" then ''
        ${if partitionTableType == "efi" || partitionTableType == "hybrid" then ''
          additionalSpace=$(( ($(numfmt --from=iec '${additionalSpace}') + $(numfmt --from=iec '${bootSize}')) ))
        '' else ''
          additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') ))
        ''}
  
        # Compute required space in filesystem blocks
        requiredSpace=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines)
        # Convert to bytes
        requiredSpace=$(( requiredSpace * ${blockSize} ))
  
        diskSize=$(( requiredSpace  + additionalSpace ))
        truncate -s "$diskSize" $diskImage
  
        printf "Automatic disk size...\n"
        printf "  Space needed: %d bytes\n" $requiredSpace
        printf "  Additional space: %d bytes\n" $additionalSpace
        printf "  Disk image size: %d bytes\n" $diskSize
      '' else ''
        truncate -s ${toString diskSize}M $diskImage
      ''}
  