Merge pull request #128 from pkruk/master

add startsector for partitions
diff --git a/README.rst b/README.rst
index cafb41c..b90c0f5 100644
--- a/README.rst
+++ b/README.rst
@@ -1437,7 +1437,7 @@
                   mount: ${linux:storage:mount:data}
 
 Create partitions on disk. Specify size in MB. It expects empty
-disk without any existing partitions.
+disk without any existing partitions. (set startsector=1, if you want to start partitions from 2048)
 
 .. code-block:: yaml
 
@@ -1445,6 +1445,7 @@
         storage:
           disk:
             first_drive:
+              startsector: 1
               name: /dev/loop1
               type: gpt
               partitions:
diff --git a/linux/storage/disk.sls b/linux/storage/disk.sls
index 4fc96e5..f6c70c5 100644
--- a/linux/storage/disk.sls
+++ b/linux/storage/disk.sls
@@ -20,6 +20,9 @@
     - pkg: parted
 
 {% set end_size = 0 -%}
+{% if disk.get('startsector', None) %}
+{% set end_size = disk.get('startsector')|int %}
+{% endif %}
 
 {%- for partition in disk.get('partitions', []) %}