resize only first partition
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
Hello!
Show you have a system with two partitions (10GB and 50GB), you need when deploying on a 200GB disk that would be the first partition to 10GB, and the second held the rest of the space. When using the "-k1" unfolds in proportion to both sections.
There is an option to specify forcibly resize the first partition?
Did you mean after restoring the image on 200 GB destination disk with option "-k1", it has 2 partitions, 10 GB and 190 GB? Or?
Steven.
yes
example:
There are two sections, the first 10GB, 90GB second. I want that after transfer to another hard disk drive with 200GB, the first section was 10GB and the other turned to the remaining space, 190GB, but the option "-k1" get a proportional increase in the first section of the space of 20GB, 180GB second partition.
The purpose of these actions - get the image that will be installed on different hard drives (size may vary) while maintaining the size of the first section.
Is the 10 GB partition a swap partition, or?
For some special partition, like swap, we won't increase that.
If you want a flexible one, I suggest you create partition table on the destination disk first. Just make sure the destination partition is equal to or larger than the source one.
Steven.
10 GB is not a swap , a partition with the operating system . The idea about a pre-creating a partition table is good, but I just move towards fully automated deployment of the image, because often do not know which hard drive will be use and would not be chance to create in he "correct" partition.
Before to work with two partitions , I had the "magic flash drive", connected flash disk in the server , turn on , waited a couple of minutes , the server is shut down, after switching was ready for use.
I see the problem in addition to the parameter " - k1 " option, which will indicate which section is proportional to deploy all or only specified - that would be wonderful .
Thanks.
Normally the option "-k1" is used to create proportional partition size on the destination disk. Only some specific partitions, like swap, EFI partition or MS Win reserved one will be kept the original size. Therefore actually it's not so flexible. I suggest if you want have a more flexible way, you can create the partition table on the destination disk manually (use cfdisk, gdisk or gparted...) first, then in expert mode, choose "-k" to ask Clonezilla not to create that again on the destination disk.
Steven.
Thanks for the answer!
Is it possible to automate the creation of partitions before cloning disks? I have in mind as a possible pre-launch one of the names of your utilities directly from Clonezilla?
Or you mean that Clonezilla not be able to give the opportunity to work with partitions for my convenience and need to use third-party tools?
It can be automatic, and what you need is to write a script to do that.
After booting into Clonezilla live command line prompt, you can find 2 files
create-1P-pt-sf
create-2P-pt-sf
in dir:
/usr/share/drbl/samples
That are the examples for you to create partition table for MBR disk.
With this and the green command of clonezilla live:
http://clonezilla.org/clonezilla-live/doc/02_Restore_disk_image/images/ocs-10-img-restore-command-prompt.png
You can automate the process.
Steven.