Displaying 20 results from an estimated 21 matches for "part_set_gpt_type".
Did you mean:
part_get_gpt_type
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...p.p_mbr_id with
- | None -> ()
- | Some mbr_id ->
- g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id
- );
+ match parttype with
+ | GPT ->
+ (match p.p_gpt_type with
+ | None -> ()
+ | Some gpt_type ->
+ g#part_set_gpt_type "/dev/sdb" p.p_target_partnum gpt_type
+ )
+ | MBR ->
+ (match p.p_mbr_id with
+ | None -> ()
+ | Some mbr_id ->
+ g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id
+ )
+
) partitions;
(* Fix the bootloader i...
2012 Dec 14
1
[PATCH] Add support for getting and setting GPT partition type GUIDs
New APIs:
part_set_gpt_type
part_get_gpt_type
---
appliance/packagelist.in | 1 +
daemon/parted.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 30 +++++++++++
generator/tests_c_api.ml | 7 +++
generator/types.ml | 5 ++
src/MAX_PROC_NR | 2 +-
6 files ch...
2014 Feb 03
0
Re: [PATCH] resize: properly restore GPT partition types
...artition = {
...
p_partition_id : partition_id;
...
}
and partition_id = No_ID | MBR_ID of int | GPT_ID of string
> + match parttype with
> + | GPT ->
> + (match p.p_gpt_type with
> + | None -> ()
> + | Some gpt_type ->
> + g#part_set_gpt_type "/dev/sdb" p.p_target_partnum gpt_type
> + )
> + | MBR ->
> + (match p.p_mbr_id with
> + | None -> ()
> + | Some mbr_id ->
> + g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id
> + )
With the ty...
2014 Sep 29
2
Change partition type
Hi,
Is there any way to change the partition type using python-guestfs?
I'm trying to recreate an NTFS partition, but can not change the type to NTFS (7 identifier in frisk)
Filesystem from my disk
g.list_filesystems()
{'/dev/sda1': 'ntfs', '/dev/sda2': 'ntfs’}
Fdisk
print g.sfdisk_l(device)
Disk /dev/sda: 51200 cylinders, 64 heads, 32 sectors/track
Units =
2015 Nov 27
1
[PATCH 1/2] resize: Work around regression in sfdisk (RHBZ#1285847).
...le "/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_bootable_and_id partitions;
+
(* Copy ov...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
...ating (just in the C output) the
passed GUID string.
This allows to reject invalid GUIDs before passing them to low-level
tools.
Pino Toscano (4):
utils: add a function to validate a GUID string
generator: add a GUID parameter type
generator: generate code for parameter validation
actions/part_set_gpt_type: set type of "guid" parameter as "GUID"
(RHBZ#1008417).
generator/actions.ml | 11 +++++++++-
generator/bindtests.ml | 3 ++-
generator/c.ml | 54 ++++++++++++++++++++++++++++++++++++++++++++----
generator/csharp.ml | 6 ++++--
generator/daemon.ml...
2014 Feb 04
0
[PATCH 3/3] resize: preserve GPT partition names (RHBZ#1060404).
...table "/dev/sdb" p.p_target_partnum true;
+ (match p.p_label with
+ | Some label ->
+ g#part_set_name "/dev/sdb" p.p_target_partnum label;
+ | None -> ()
+ );
+
match parttype, p.p_id with
| GPT, GPT_Type gpt_type ->
g#part_set_gpt_type "/dev/sdb" p.p_target_partnum gpt_type
--
1.8.3.1
2014 Sep 30
0
Re: Change partition type
...HPFS/NTFS
> /dev/sda2 101 51199 51099 52325376 83 Linux
> /dev/sda3 0 - 0 0 0 Empty
> /dev/sda4 0 - 0 0 0 Empty
If it's MBR, then you can use g.part_set_mbr_id ("/dev/sda", 2, 7)
For GPT use part_set_gpt_type which is similar but you have to use
a GUID.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many lang...
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).
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
2013 Sep 25
5
Re: [PATCH 3/4] Add SUSE converter
...rtConvert::Convert::SUSE::_install_any
> + (undef, ['grub2'], undef, $g, $self->{root}, $self->{config}, $self)
> + or v2vdie __x('Failed to install non-EFI grub2');
> +
> + # Relabel the EFI boot partition as a BIOS boot partition
> + $g->part_set_gpt_type($device, 1, '21686148-6449-6E6F-744E-656564454649');
> +
> + # Delete the fstab entry for the EFI boot partition
> + eval {
> + foreach my $node ($g->aug_match("/files/etc/fstab/*[file = '/boot/efi']"))
> + {
> + $g->a...
2013 Sep 24
5
[PATCH 0/4] Add SUSE guest converter to virt-v2v
This is a new conversion module to convert SUSE Linux and openSUSE guests.
The converter is based on the RedHat module, and should offer the same
functionality on both SUSE and RedHat hosts.
There are a few additional messages in this module, such as reporting of
packages when installing through zypper or the local virt-v2v repo. These
messages don't necessarily flow unless verbose switches
2013 Oct 07
3
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
On Friday, October 04, 2013 09:38:58 AM Matthew Booth wrote:
> It's specifically an error if we're attempting to configure virtio, and
> there's no detected virtio kernel. It shouldn't have been possible to
> get here in that state, hence it's a programmer error. The code below
> attempts to install *any* kernel in the case that we aren't configuring
>
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...e installed.
+ Sys::VirtConvert::Convert::SUSE::_install_any
+ (undef, ['grub2'], undef, $g, $self->{root}, $self->{config}, $self)
+ or v2vdie __x('Failed to install non-EFI grub2');
+
+ # Relabel the EFI boot partition as a BIOS boot partition
+ $g->part_set_gpt_type($device, 1, '21686148-6449-6E6F-744E-656564454649');
+
+ # Delete the fstab entry for the EFI boot partition
+ eval {
+ foreach my $node ($g->aug_match("/files/etc/fstab/*[file = '/boot/efi']"))
+ {
+ $g->aug_rm($node);
+ }
+...
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in:
https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html
Rich.
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...installed.
+ Sys::VirtConvert::Convert::Linux::_install_any
+ (undef, ['grub2'], undef, $g, $self->{root}, $self->{config}, $self)
+ or v2vdie __x('Failed to install non-EFI grub2');
+
+ # Relabel the EFI boot partition as a BIOS boot partition
+ $g->part_set_gpt_type($device, 1, '21686148-6449-6E6F-744E-656564454649');
+
+ # Delete the fstab entry for the EFI boot partition
+ foreach my $node ($g->aug_match("/files/etc/fstab/*[file = '/boot/efi']")) {
+ $g->aug_rm($node);
+ }
+ eval { $g->aug_save(); };
+...
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...Convert::Convert::RedHat::_install_any
+ Sys::VirtConvert::Convert::Linux::_install_any
(undef, ['grub2'], undef, $g, $self->{root}, $self->{config}, $self)
or v2vdie __x('Failed to install non-EFI grub2');
@@ -494,7 +577,8 @@ sub convert_efi
$g->part_set_gpt_type($device, 1,
'21686148-6449-6E6F-744E-656564454649');
# Delete the fstab entry for the EFI boot partition
- foreach my $node ($g->aug_match("/files/etc/fstab/*[file = '/boot/efi']")) {
+ foreach my $node ($g->aug_match("/files/etc/fstab/*[file = ...
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files.
Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...String (PlainString, "volume")], [];
optional = Some "ldm";
shortdesc = "return the partitions in a Windows dynamic disk volume";
longdesc = "\
@@ -8422,7 +8422,7 @@ group with GUID C<diskgroup>." };
{ defaults with
name = "part_set_gpt_type"; added = (1, 21, 1);
- style = RErr, [Device "device"; Int "partnum"; GUID "guid"], [];
+ style = RErr, [String (Device, "device"); Int "partnum"; String (GUID, "guid")], [];
optional = Some "gdisk";
tests =...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator.
Rich.