Specify partition sizes by sectors in GParted or another tool

0

1

Is it possible to specify the sizes of the partions, and their ranges too, based on sectors. I have an image of a an entire disk, made by CloneZilla. Apparently CloneZilla, in this case, is not able to restore the partitios, so I have to do that manually (see this post).

In the image, which is just a folder, there are a few files in a human readable format, describing the partitioning of the disk. The most detailed file is sda-gpt.sgdisk, and is shown below:

Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): B493156A-8540-46F9-A3EB-E08346125E6F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
  1            2048          616447   300.0 MiB   EF00  EFI system partition
  2          616448         2459647   900.0 MiB   2700  Basic data partition
  3         2459648         2721791   128.0 MiB   0C01  Microsoft reserved part
  4         2721792       393431039   186.3 GiB   0700  Basic data partition
  5       393431040       934809599   258.1 GiB   0700  Basic data partition
  6       934809600       976773119   20.0 GiB    2700  Basic data partition

I tried creating this partitioning with GParted, using the sizes, but I guess megabytes/mebibytes/gigabytes/gibibytes can be counted in different ways, and maybe I need more decimals than above. After several tries, I keep make one or more partitions just a tad too small, and CloneZilla fails because they are not big enough. I can't simply make them bigger, since then they won't fit on the disk.

But I guess, if I could specify the partitions using sectors (the numbers shown above) that should work. So how do I do that?

Mads Skjern

Posted 2014-10-31T09:35:24.513

Reputation: 1 070

And hey, if my question does not make sense, tell me how and why! I have asked a few questions about CloneZilla and GParted the last few days, and I don't get any help. And I wonder if my questions are stupid or if nobody knows anything about this, which means I will stay away from this cloning c***. It's more than two full work days spent now :( – Mads Skjern – 2014-10-31T10:11:00.993

As you show an sgdisk output listing, why not use sgdisk to create the partitions? According to the man page you can do --new=partnum:start:end where you can specify those as sectors. So something like sgdisk --new=1:2048:616447 ... – wurtel – 2014-10-31T10:26:48.057

I didn't even know there was a tool called sgdisk, but I will check that out now. Thanks :) – Mads Skjern – 2014-10-31T10:36:20.443

No answers