I am attempting to clone multiple partitions with either Clonezilla or dd
without cloning the whole drive which consists of:
- A boot partition
- A home partition
Seen below is the original installation on a 128GB SSD, which I successfully cloned to a larger 250GB. This as a backup that I would later try to resize and shrink down.
Below is a photo of a working clone of the operating system, which is now about 41 gigs in size total after being resized with Gparted.
I have tried to clone these partitions to my 64GB USB disk as a working portable backup, but have ran into some issues.
I have tried using:
sudo -s
dd if=/dev/sdb of=/dev/sdc & pid=$!
while kill -USR1 $pid; do sleep 1; done
This bit for bit cloning method tried to copy the unallocated space on the input drive, which obviously won't work because the output disk is much smaller. In a second attempt I was able create a partition table on the destination disk that matched the source's sizes. I then tried to use boot repair and got this output
Moving onto to Clonezilla options; normally a disk to disk
would be my choice, but since the destination drive is smaller than the source, Clonezilla will not allow this.
I do see an option to copy ONE partition at a time using the disk to disk
option, but do not see how I might clone all three at once. I know there is an option to do this with saving as image
but I want the USB to be bootable.
One way I can think of making this work would be to make an image of the partitions I want to clone using disk to image
, then restoring the image to the 64GB USB disk later, but after trying this I ran into more errors.
After making an image of /dev/sdb/
I attempted to restore the file but got this error about /dev/sdb2/
missing:
(/dev/sdb
is the target for this session)
So perhaps my image was OK, but it didn't properly read /dev/sdb2/
so I checked it with Gparted again and saw this following here:
I checked with Synaptic Package Manager to see, and I already have e2fsprogs v1.42.9-3 installed. So I did some reading and tried the following solutions that have worked for other people:
sudo fsck.ext4 -f /dev/sda6
sudo touch /forcefsck
Sudo reboot
this seemed to work temporarily, as after another reboot or two, the problem still persists. I am assuming now that during the device to image
process in Clonezilla that my /dev/sd2/
was not read properly, as I can not even access this partition in Nautilus or Gparted. I am thinking that is may have been caused by the re-sizing of the drive, but can not be sure, as it will still allow me to boot to this installation.
I think I can actually clone these two partitions to image, and then restore them but I need to address this problem of:
The following list of software packages is required for ext4 file system support: e2fsprogs v1.41+.
Could this have come from re-sizing the partition? If so, how come I am able to boot to this installation if it can't be read?
bs
andcount
options ofdd
to avoidhead
(andtee
), see https://superuser.com/a/1343575/84807 for details. – Melebius Sep 16 '19 at 09:54