Displaying 17 results from an estimated 17 matches for "set_partition_bootable_and_id".
2015 Nov 27
1
[PATCH 1/2] resize: Work around regression in sfdisk (RHBZ#1285847).
...ause the rewritten sfdisk "helpfully" overwrites the partition
+ * table in the first sector of an extended partition if a partition
+ * is changed from primary to extended. Thus we need to set the
+ * MBR ID before doing the copy so sfdisk doesn't corrupt things.
+ *)
+ let set_partition_bootable_and_id p =
+ if p.p_bootable then
+ g#part_set_bootable "/dev/sdb" p.p_target_partnum true;
+
+ may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label;
+ may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid;
+
+ match parttype, p....
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...(* Target information is meaningful. *)
p_operation = OpIgnore;
@@ -1191,12 +1199,13 @@ read the man page virt-resize(1).
* is changed from primary to extended. Thus we need to set the
* MBR ID before doing the copy so sfdisk doesn't corrupt things.
*)
- let set_partition_bootable_and_id p =
+ let set_partition_bootable_attributes_and_id p =
if p.p_bootable then
g#part_set_bootable "/dev/sdb" p.p_target_partnum true;
Option.may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label;
Option.may (g#part_set_gpt_guid "/dev/s...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...(* Target information is meaningful. *)
p_operation = OpIgnore;
@@ -1191,12 +1199,13 @@ read the man page virt-resize(1).
* is changed from primary to extended. Thus we need to set the
* MBR ID before doing the copy so sfdisk doesn't corrupt things.
*)
- let set_partition_bootable_and_id p =
+ let set_partition_attributes p =
if p.p_bootable then
g#part_set_bootable "/dev/sdb" p.p_target_partnum true;
Option.may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label;
Option.may (g#part_set_gpt_guid "/dev/sdb" p.p_tar...
2018 Jan 10
6
[PATCH 0/3] Handle GPT attribute flags
Hi all,
Here is the series fixing the bug I mentioned on IRC regarding the GPT
attribute flags to copy to the new disk in a virt-resize.
Cédric Bosdonnat (3):
daemon: make sgdisk_info_extract_uuid_field more generic
New APIs: part_set_gpt_attributes and part_get_gpt_attributes
resize: copy GPT partition flags
daemon/parted.ml | 34 +++++++++++++++++++++++++++-------
2018 Jan 15
6
[PATCH v2 0/3] copying gpt attributes
Hi all,
Here is the latest version of the series addressing Pino's comments.
Cédric Bosdonnat (3):
daemon: make sgdisk_info_extract_uuid_field more generic
New APIs: part_set_gpt_attributes and part_get_gpt_attributes
resize: copy GPT partition flags
daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++----------
daemon/parted.mli | 3 +++
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...rtitions;
(* Set bootable and MBR IDs. Do this *after* copying over the data,
* so that we can magically change the primary partition to an extended
@@ -1169,6 +1222,7 @@ read the man page virt-resize(1).
| GPT, (No_ID|MBR_ID _) | MBR, (No_ID|GPT_Type _) -> ()
in
List.iter set_partition_bootable_and_id partitions;
+ List.iter set_partition_bootable_and_id logical_partitions;
(* Fix the bootloader if we aligned the first partition. *)
if align_first_partition_and_fix_bootloader then (
@@ -1221,6 +1275,13 @@ read the man page virt-resize(1).
can_expand_content p.p_type
| {...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...rtitions;
(* Set bootable and MBR IDs. Do this *after* copying over the data,
* so that we can magically change the primary partition to an extended
@@ -1175,6 +1230,7 @@ read the man page virt-resize(1).
| GPT, (No_ID|MBR_ID _) | MBR, (No_ID|GPT_Type _) -> ()
in
List.iter set_partition_bootable_and_id partitions;
+ List.iter set_partition_bootable_and_id logical_partitions;
(* Fix the bootloader if we aligned the first partition. *)
if align_first_partition_and_fix_bootloader then (
@@ -1227,6 +1283,13 @@ read the man page virt-resize(1).
can_expand_content p.p_type
| {...
2014 Sep 19
22
[PATCH v2 00/13] virt-resize: add support for resizing MBR logical partitions
...ze: introduce partition type
resize: introduce filter_part
resize: add function find_partition
resize: add function print_summmary
resize: expose loop to calculate new partitions' positions
resize: add function mbr_part_type
resize: add function copy_partition
resize: add function set_partition_bootable_and_id
resize: add function expand_partition_content
resize: add partition type LogicalPartition
resize: add support to resize logical partitions
mllib/common_utils.ml | 1 +
mllib/common_utils.mli | 1 +
resize/resize.ml | 217 ++++++++++++++++++++++++++++++++++++-------------
3 files...
2018 Jan 16
4
[PATCH v3 0/3] copy GPT attributes
Hi all,
Here is v3 of the series, taking Richard's comments in account.
Cédric Bosdonnat (3):
daemon: make sgdisk_info_extract_uuid_field more generic
New APIs: part_set_gpt_attributes and part_get_gpt_attributes
resize: copy GPT partition flags
daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++----------
daemon/parted.mli | 2 ++
generator/actions_core.ml
2014 Oct 08
6
[PATCH V5 0/4] virt-resize: add support for resizing logical
Hi Rich,
This is v5 series to add support for resizing MBR logical partitions. please review. Thanks!
changes to v4:
1. add support to resize extended partition (--resize or --expand extended partition)
2. fix the problem of deficit of 512 bytes when expanding a logical partition
(this problem can be reproduced in v4 by only expanding a logical partition, without resizing any other
2014 Oct 30
8
[PATCH v5 REBASE 0/4] virt-resize: add support for resizing logical
Hi Rich,
This is rebase of v5 series. Meanwhile, I found a bug when shrinking
partitions, and the fix is incuded in this version (patch 2).
Regards,
Hu
changes to v4:
1. add support to resize extended partition (--resize or --expand extended partition)
2. fix the problem of deficit of 512 bytes when expanding a logical partition
(this problem can be reproduced in v4 by only expanding a
2015 Jun 03
13
[PATCH v3 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including
extended partition) are supported. They are collected in an
array for resize operations. Logical partitions are not
supported.
This series add support for resizing logical partitions.
v3:
1) rewrite partitions/logical_partitions/extended_partition section
by the comments from Rich and Pino.
2) in 03/11 introduce logical_align for
2015 Jun 17
13
[PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including
extended partition) are supported. They are collected in an
array for resize operations. Logical partitions are not
supported.
This series add support for resizing logical partitions.
v4:
rebase on upstream.
v3:
1) rewrite partitions/logical_partitions/extended_partition section
by the comments from Rich and Pino.
2) in 03/11
2015 Jul 06
13
[PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including
extended partition) are supported. They are collected in an
array for resize operations. Logical partitions are not
supported.
This series add support for resizing logical partitions.
v4:
rebase on upstream.
v3:
1) rewrite partitions/logical_partitions/extended_partition section
by the comments from Rich and Pino.
2) in 03/11
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
Hi Rich,
This is v3 series to add support for resizing MBR logical partitions.
changes to v2:
1. remove p_part_num
2. remove filter_parts
3. name the function calculate_target_partitions
4. remove the code to restart guest introduced in v2
changes to v1:
1. spit the patches so it's easier to review
2. fix the parted error caused by unaligned logical partitions
3. extend the
2015 May 20
15
[PATCH v2 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including
extended partition) are supported. They are collected in an
array for resize operations. Logical partitions are not
supported.
This series add support for resizing logical partitions.
v2:
1) Add 3 variables to describe relationship of logical and extended partitions:
- partitions
flat list of primary partitions (as now, the global
2014 Sep 26
9
[PATCH v4 0/7] virt-resize: add support for resizing logical partitions
Hi Rich,
This is v3 series to add support for resizing MBR logical partitions.
changes to v3:
1. merge patch 1 and patch 3 in v3
2. let mbr_part_type return 'primary' for GPT partitions
3. add test for resizing logical partitions
4. fix extending the extended partition (yet). see patch 7.
changes to v2:
1. remove p_part_num
2. remove filter_parts
3. name the function