search for: gpt_type

Displaying 20 results from an estimated 39 matches for "gpt_type".

Did you mean: cpt_type
2015 Nov 27
1
[PATCH 1/2] resize: Work around regression in sfdisk (RHBZ#1285847).
...ble 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.p_id with + | GPT, GPT_Type gpt_type -> + g#part_set_gpt_type "/dev/sdb" p.p_target_partnum gpt_type + | MBR, MBR_ID mbr_id -> + g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id + | GPT, (No_ID|MBR_ID _) | MBR, (No_ID|GPT_Type _) -> () + in + List.iter set_partition...
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...2670e5 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -48,6 +48,7 @@ type partition = { p_part : G.partition; (* SOURCE partition data from libguestfs. *) p_bootable : bool; (* Is it bootable? *) p_mbr_id : int option; (* MBR ID, if it has one. *) + p_gpt_type : string option; (* GPT ID, if it has one. *) p_type : partition_content; (* Content type and content size. *) (* What we're going to do: *) @@ -75,7 +76,14 @@ let rec debug_partition p = p.p_part.G.part_size; eprintf "\tbootable: %b\n" p.p_bootable; eprintf &...
2014 Feb 04
0
[PATCH 3/3] resize: preserve GPT partition names (RHBZ#1060404).
...partition_content; (* Content type and content size. *) + p_label : string option; (* Label/name. *) (* What we're going to do: *) mutable p_operation : partition_operation; @@ -84,7 +85,12 @@ let rec debug_partition p = | MBR_ID i -> sprintf "0x%x" i | GPT_Type i -> i ); - eprintf "\tcontent: %s\n" (string_of_partition_content p.p_type) + eprintf "\tcontent: %s\n" (string_of_partition_content p.p_type); + eprintf "\tlabel: %s\n" + (match p.p_label with + | Some label -> label + | None -> "(none)...
2014 Feb 04
6
[PATCH 0/3] virt-resize: preserve GPT partitions label
Hi, attached there are few patches to implement a way to get the label of GPT partitions (refactoring an existing function and adding a new daemon API) and using it in virt-resize to restore them when copying partitions. Thanks, Pino Toscano (3): daemon: parted: refactor sgdisk info parsing code New API: part-get-name (RHBZ#593511). resize: preserve GPT partition names (RHBZ#1060404).
2018 Apr 27
1
Re: [PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...evice contains partitions. (2) Changing the way that we filter out LDM partitions. Some other comments: "check_device", "check_partition" are really generic names. Name the functions according to what they do, eg. "is_not_partitioned_device". > +and is_ignored_gpt_type gpt_type = > + match gpt_type with You can write this as: and is_ignored_gpt_type = function | pattern -> result | ... > + (* Windows Logical Disk Manager metadata partition. *) > + | "5808C8AA-7E8F-42E0-85D2-E1E90434CFB3" -> Optgroups.ldm_available () > + (...
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...name "/dev/sdb" p.p_target_partnum) p.p_label; Option.may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid; + Option.may (g#part_set_gpt_attributes "/dev/sdb" p.p_target_partnum) p.p_attributes; match parttype, p.p_id with | GPT, GPT_Type gpt_type -> @@ -1205,7 +1214,7 @@ read the man page virt-resize(1). g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id | GPT, (No_ID|MBR_ID _) | MBR, (No_ID|GPT_Type _) -> () in - List.iter set_partition_bootable_and_id partitions; + List.iter set_partition_...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...name "/dev/sdb" p.p_target_partnum) p.p_label; Option.may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid; + Option.may (g#part_set_gpt_attributes "/dev/sdb" p.p_target_partnum) p.p_attributes; match parttype, p.p_id with | GPT, GPT_Type gpt_type -> @@ -1205,7 +1214,7 @@ read the man page virt-resize(1). g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id | GPT, (No_ID|MBR_ID _) | MBR, (No_ID|GPT_Type _) -> () in - List.iter set_partition_bootable_and_id partitions; + List.iter set_partition_...
2014 Feb 03
0
Re: [PATCH] resize: properly restore GPT partition types
...ize.ml > +++ b/resize/resize.ml > @@ -48,6 +48,7 @@ type partition = { > p_part : G.partition; (* SOURCE partition data from libguestfs. *) > p_bootable : bool; (* Is it bootable? *) > p_mbr_id : int option; (* MBR ID, if it has one. *) > + p_gpt_type : string option; (* GPT ID, if it has one. *) > p_type : partition_content; (* Content type and content size. *) > > (* What we're going to do: *) > @@ -75,7 +76,14 @@ let rec debug_partition p = > p.p_part.G.part_size; > eprintf "\tbootable: %b\n&qu...
2018 Apr 27
0
[PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...to see if any devices directly contain filesystems + * (RHBZ#590167). However vfs-type will fail to tell us anything + * useful about devices which just contain partitions, so we also + * exclude such devices. + *) +and check_device device = + not (is_partitioned_device device) + +and is_ignored_gpt_type gpt_type = + match gpt_type with + (* Windows Logical Disk Manager metadata partition. *) + | "5808C8AA-7E8F-42E0-85D2-E1E90434CFB3" -> Optgroups.ldm_available () + (* Windows Logical Disk Manager data partition. *) + | "AF9B60A0-1431-4F62-BC68-3311714A69AD" -> Optgro...
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...+ let partnum = Devsparts.part_to_partnum partition in + + let parttype = Parted.part_get_parttype device in + let is_gpt = parttype = "gpt" in + let is_mbr = parttype = "msdos" in + + (* MBR partition id will be converted into corresponding GPT type. *) + let gpt_type = Parted.part_get_gpt_type device partnum in + + let is_ldm = gpt_type = gpt_ldm_metadata || gpt_type = gpt_ldm_data in + let is_ldm = Ldm.available () && (is_gpt || is_mbr) && is_ldm in + let is_msr = is_gpt && gpt_type = gpt_msr in + + let mbr_type = Parted.par...
2018 May 02
6
[PATCH v7 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
This patch series addresses comments after v6 series review. Mykola Ivanets (6): daemon: Changing the way that we detect if a device contains partitions. daemon: list-filesystems: Ignore partitioned MD devices. tests: list-filesystems command ignores partitioned MD devices. daemon: list-filesystems: Change the way we filter out LDM partitions. daemon: list-filesystems: Filter out
2018 Apr 27
4
[PATCH v5 0/3] libguestfs: guestfs_list_filesystems: skip block devices which cannot hold file system
This patch series: 1. Addresses comments from last review: part_get_mbr_part_type doesn't break original implementation in C. 2. Rebased on top of master and little bit refactored for readability. Mykola Ivanets (1): tests: md: Test guestfish list-filesystems command skips partitioned md devices. Nikolay Ivanets (2): daemon: Reimplement 'part_get_mbr_part_type' API in
2018 Jun 01
7
[PATCH v8 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
v8: - Rebased on top of master. v7: - Addresses comments after v6 series review. v6: - Addresses comments after v5 series review. - Large commit is splitted to more granular commits for better code review. v5: - Addresses comments after v4 series review (part_get_mbr_part_type doesn't break original implementation in C). - Rebased on top of master and little bit refactored for
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 +++
2015 Nov 10
0
[PATCH] customize, dib, resize, sysprep: Use 'may' pattern in various places.
...t_guid "/dev/sdb" p.p_target_partnum guid; - | None -> () - ); + 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.p_id with | GPT, GPT_Type gpt_type -> diff --git a/sysprep/sysprep_operation.ml b/sysprep/sysprep_operation.ml index af2004e..057c8c5 100644 --- a/sysprep/sysprep_operation.ml +++ b/sysprep/sysprep_operation.ml @@ -186,10 +186,7 @@ let dump_pod () = if op.enabled_by_default then printf "*\n"; prin...
2014 Sep 26
0
[PATCH v4 1/7] resize: add function find_partitions
....ml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 81bb270..cfd02fc 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -73,6 +73,9 @@ and partition_id = | MBR_ID of int (* MBR ID. *) | GPT_Type of string (* GPT UUID. *) +type partition_type = + | PrimaryPartition + let rec debug_partition p = eprintf "%s:\n" p.p_name; eprintf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" @@ -443,14 +446,15 @@ read the man page virt-resize(1). | MBR_ID _ | GPT_T...
2015 Feb 05
5
resize: Preserve GPT GUID so we don't break EFI bootloaders (RHBZ#1189284)
virt-resize didn't preserve the per-partition GPT GUID. Now that guests using UEFI are becoming common (basically it's the default on aarch64) we need to take into account that sometimes the partition GUID is used by the bootloader NVRAM variables to identify the boot partition, so it must be preserved across resize. This bug caused the 'virt-builder --size' option to fail on
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html. v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html. v3 comparing to v2 is just a rebase with slightly changed commits comments.
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
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...mon/parted.mli b/daemon/parted.mli index d547f2f..0f59d29 100644 --- a/daemon/parted.mli +++ b/daemon/parted.mli @@ -28,6 +28,8 @@ val part_list : string -> partition list val part_get_parttype : string -> string +val part_get_mbr_part_type : string -> int -> string + val part_get_gpt_type : string -> int -> string val part_get_gpt_guid : string -> int -> string val part_get_gpt_attributes : string -> int -> int64 diff --git a/generator/actions_core.ml b/generator/actions_core.ml index 544cb6e..307e414 100644 --- a/generator/actions_core.ml +++ b/generator/actions...