search for: sgdisk

Displaying 20 results from an estimated 85 matches for "sgdisk".

Did you mean: sfdisk
2014 Feb 04
2
Re: [PATCH 2/3] New API: part-get-name (RHBZ#593511).
...> + } > + > + char *ret = strndup (value, value_len); > + if (ret == NULL) { > + reply_with_perror ("strndup"); > + return NULL; > + } > + > + return ret; > +} My spidey sense asks what happens if the value contains quote characters? I wonder if sgdisk escapes them. Rest of the patch looks fine, but I think you should try setting the partition name to a few weird values and see what sgdisk does. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install...
2014 Feb 04
0
Re: [PATCH 2/3] New API: part-get-name (RHBZ#593511).
...ue, value_len); > > + if (ret == NULL) { > > + reply_with_perror ("strndup"); > > + return NULL; > > + } > > + > > + return ret; > > +} > > My spidey sense asks what happens if the value contains quote > characters? I wonder if sgdisk escapes them. > > Rest of the patch looks fine, but I think you should try setting the > partition name to a few weird values and see what sgdisk does. It seems sgdisk just picks whatever it is being passed to it: ><rescue> sgdisk -c 3:test /dev/sda [ 129.149627] sda: sda...
2019 Apr 15
1
[PATCH] daemon: drop error message check in do_part_expand_gpt
part-expand-gpt takes extreme cautions and doesn't proceed to writing to the disk if the preliminary dry run of sgdisk has generated any warnings on stdout. This blocks the use of part-expand-gpt on disk shrink (with disk resize being the main usecase for part-expand-gpt), because sgdisk dry run produces a warning in that case. So remove the excessive safety check, and leave it up to the caller. Signed-off-by: D...
2018 May 01
1
Curious sgdisk behavior
FYI Just found interesting behavior of sgdisk (it is used in daemon code for various things) which might surprise us: sgdisk won't work if it finds "valid" MBR and GPT partition tables on the disk. In this case sgdisk fails with "Invalid partition data!" message. How to reproduce (esiest way is to use DISPART command l...
2014 Feb 04
0
[PATCH 1/3] daemon: parted: refactor sgdisk info parsing code
Isolate in an own function the code that runs sgdisk and parse a field of it (using an extraction function passed as parameter), using it for the GUID type. This is just code motion, no actual behaviour changes. --- daemon/parted.c | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --...
2015 Dec 10
2
Bug: windows server 2012R2 fails to start after virt-resize
...oot: black screen informing that Windows failed to start... Status: 0xc000000e Info: an unexpected error has occured. After some investigations, I realized that Windows remembers the GUID of disk it is installed to. If I execute >guestfish -a win2012.hdd -v ... ><fs> debug sh 'sgdisk -p /dev/sda' guestfsd: main_loop: new request, len 0x54 /bin/sh -c sgdisk -p /dev/sda Disk /dev/sda: 136314880 sectors, 65.0 GiB Logical sector size: 512 bytes Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 Partition table holds up to 128 entries First usable sector is 34, last us...
2014 Dec 10
4
CentOS 7 grub.cfg missing on new install
...er things and had the time to let it complete). I rebooted the system and got a terminal prompt as expected (no GUI installed). At this point I needed to copy my /boot/efi and /boot partitions from sda[1,2] to sdb[1,2] so that the system would boot from either drive, so I issued the following sgdisk commands: root# sgdisk -R /dev/sdb1 /dev/sda1 root# sgdisk -R /dev/sdb2 /dev/sda2 root# sgdisk -G /dev/sdb1 root# sgdisk -G /dev/sdb2 Results of the first command above: Found invalid GPT and valid MBR; converting MBR to GPT format. Warning the kernel is still using the old partition ta...
2015 Dec 01
3
[PATCHv2] New API: part_expand_gpt.
This action moves second(backup) GPT header to the end of the disk. It is usable in in-place image expanding, since free space after second GPT header is unusable. To use additional space, we have to move second header. This is what sgdisk -e does. However, sgdisk -e may perform additional actions if the partition table has unexpected params (e.g. if we call sgdisk -e /dev/sda1, it may fix partition table thus destroying the filesystem). To prevent such cases, we do a dry-run at first and fail if additional actions are scheduled. --...
2015 Nov 25
1
[PATCH] New API: part_expand_gpt.
This action moves second(backup) GPT header to the end of the disk. It is usable in in-place image expanding, since free space after second GPT header is unusable. To use additional space, we have to move second header. This is what sgdisk -e does. However, sgdisk -e may perform additional actions if the partition table has unexpected params (e.g. if we call sgdisk -e /dev/sda1, it may fix partition table thus destroying the filesystem). To prevent such cases, we do a dry-run at first and fail if additional actions are scheduled. --...
2014 Dec 11
0
CentOS 7 grub.cfg missing on new install
...and get mirrored partitions. If you do your setup entirely in Anaconda, your partitions should all end up fine. > At this point I needed to copy my /boot/efi and /boot partitions from > sda[1,2] to sdb[1,2] so that the system would boot from either drive, > so I issued the following sgdisk commands: > > root# sgdisk -R /dev/sdb1 /dev/sda1 > root# sgdisk -R /dev/sdb2 /dev/sda2 > root# sgdisk -G /dev/sdb1 > root# sgdisk -G /dev/sdb2 sgdisk manipulates GPT, so you run it on the disk, not on individual partitions. What you've done simply scrambled information in...
2015 Dec 10
3
Re: Bug: windows server 2012R2 fails to start after virt-resize
...>> Info: an unexpected error has occured. >> >> After some investigations, I realized that Windows remembers the GUID of >> disk it is installed to. >> If I execute >> >> >guestfish -a win2012.hdd -v >> ... >> ><fs> debug sh 'sgdisk -p /dev/sda' >> guestfsd: main_loop: new request, len 0x54 >> /bin/sh -c sgdisk -p /dev/sda >> Disk /dev/sda: 136314880 sectors, 65.0 GiB >> Logical sector size: 512 bytes >> Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 >> Partition table hold...
2015 Dec 22
0
Re: [PATCHv2] New API: part_expand_gpt.
...2/01/2015 06:28 PM, Maxim Perevedentsev wrote: > This action moves second(backup) GPT header to the end of the disk. > It is usable in in-place image expanding, since free space after > second GPT header is unusable. To use additional space, we have > to move second header. This is what sgdisk -e does. > > However, sgdisk -e may perform additional actions if the partition > table has unexpected params (e.g. if we call sgdisk -e /dev/sda1, > it may fix partition table thus destroying the filesystem). > To prevent such cases, we do a dry-run at first and fail if > additio...
2016 Jan 20
1
[PATCHv2] New API: part_expand_gpt.
This action moves second(backup) GPT header to the end of the disk. It is usable in in-place image expanding, since free space after second GPT header is unusable. To use additional space, we have to move second header. This is what sgdisk -e does. However, sgdisk -e may perform additional actions if the partition table has unexpected params (e.g. if we call sgdisk -e /dev/sda1, it may fix partition table thus destroying the filesystem). To prevent such cases, we do a dry-run at first and fail if additional actions are scheduled. --...
2014 Feb 04
1
Re: [PATCH 1/3] daemon: parted: refactor sgdisk info parsing code
On Tue, Feb 04, 2014 at 04:01:31PM +0100, Pino Toscano wrote: > @@ -832,28 +835,22 @@ do_part_get_gpt_type(const char *device, int partnum) > /* Split the line in 2 at the colon */ > char *colon = strchr (line, ':'); > if (colon) { > -#define SEARCH "Partition GUID code" > - if (colon - line == strlen(SEARCH) && > - memcmp
2018 May 29
2
CentOS6: HELP! EFI boot fails after replacing disks...
...d7-89dfe3ce5e09,0x800,0x12c000)/File(\EFI\fedora\shimx64.efi) > > # blkid | grep sda1 > /dev/sda1: LABEL="ESP" UUID="3850-574E" TYPE="vfat" PARTLABEL="EFI > System Partition" PARTUUID="39484dd8-b1d9-47b2-b4d7-89dfe3ce5e09" > > # sgdisk -i1 /dev/sda > Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System) > Partition unique GUID: 39484DD8-B1D9-47B2-B4D7-89DFE3CE5E09 > First sector: 2048 (at 1024.0 KiB) > Last sector: 1230847 (at 601.0 MiB) > Partition size: 1228800 sectors (600.0 MiB) > Attribute...
2014 Dec 11
0
CentOS 7 grub.cfg missing on new install
...d the time to let it complete). I rebooted the system and got a > terminal prompt as expected (no GUI installed). At this point I needed > to copy my /boot/efi and /boot partitions from sda[1,2] to sdb[1,2] so > that the system would boot from either drive, so I issued the following > sgdisk commands: > > root# sgdisk -R /dev/sdb1 /dev/sda1 > root# sgdisk -R /dev/sdb2 /dev/sda2 > root# sgdisk -G /dev/sdb1 > root# sgdisk -G /dev/sdb2 > > Results of the first command above: > Found invalid GPT and valid MBR; converting MBR to GPT format. > Warning the...
2015 Dec 10
0
Re: Bug: windows server 2012R2 fails to start after virt-resize
...o start... > Status: 0xc000000e > Info: an unexpected error has occured. > > After some investigations, I realized that Windows remembers the GUID of > disk it is installed to. > If I execute > > >guestfish -a win2012.hdd -v > ... > ><fs> debug sh 'sgdisk -p /dev/sda' > guestfsd: main_loop: new request, len 0x54 > /bin/sh -c sgdisk -p /dev/sda > Disk /dev/sda: 136314880 sectors, 65.0 GiB > Logical sector size: 512 bytes > Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 > Partition table holds up to 128 entries >...
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). daemon/parted.c | 86 ++++++++++++++++++++++++++++++++++++++++++---------- generator/actions.ml | 13 ++++++++ resize/resize.ml | 19 +++++++++++- src/MAX_PROC_NR | 2 +-...
2010 Aug 16
2
gpt and extlinux how to get it bootable?
Hi I just tried to implement gpt extlinux booting in my archboot project. extlinux installs fine but i'm not able to boot the hd afterwards. Setting partition to boot on in parted doesn't seem to have an effect in GPT mode. Is there any way to get it booting, i haven't found any docu about it. Thanks in advance greetings tpowa -- Tobias Powalowski Archlinux Developer & Package
2015 Dec 16
0
Re: Bug: windows server 2012R2 fails to start after virt-resize
...or has occured. >>> >>> After some investigations, I realized that Windows remembers the GUID of >>> disk it is installed to. >>> If I execute >>> >>> >guestfish -a win2012.hdd -v >>> ... >>> ><fs> debug sh 'sgdisk -p /dev/sda' >>> guestfsd: main_loop: new request, len 0x54 >>> /bin/sh -c sgdisk -p /dev/sda >>> Disk /dev/sda: 136314880 sectors, 65.0 GiB >>> Logical sector size: 512 bytes >>> Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 >>&...