2

I have a Thinkpad T420 that is four years old with a 500GB HDD and a dual-boot Windows/Linux Mint on it. I want to replace the HDD with a 250GB SSD, cloning only the Linux part (100Gb), totally ignoring the Windows one.

I am trying to use Clonezilla for this task but I am running into a space issue. Here are the guidelines I am trying to follow:

I got Live Clonezilla on a USB flash drive, inserted that and my SSD (via USB, too) in my laptop, finally I booted Clonezilla. The problem is:

  • Clonezilla doesn't give me the option to choose only PART of the HDD. It only shows the entire 500GB HDD as source. Obviously, I can't "clone" the entire disk due to the lower size of the SSD. So, when I make these selections, as expected, I get the message that, in short, says "destination space is not enough!".

So what is the option, other than buying a brand new 500GB SSD?

  • 2
    What is size of your Linux partition? – user140866 Dec 29 '15 at 4:26
  • 1
    sda 5 is linux or sda 4? anyway, i dont think a clone is a best option here. it can be done - but you have to afterward manipulate the partition tables. it involves slicing and dicing at the block level. if youre up for it can be fun, but its tough. an image probably isnt ideal here. if you just prep sdb first sudo sh -c 'mkdir /mnt/sdb /mnt/sda; mount /dev/sda5 /mnt/sda;printf %s\\n o y n 1 "" +750M ef00 n 2 "" "" "" "" w y | gdisk /dev/sdb; mkfs.vfat -n ESP /dev/sdb1; mkfs.yourfavfs /dev/sdb2; mount /dev/sdb2 /mnt/sdb; pax -rwpe /mnt/sda /mnt/sdb' - would copy the tree. off the cuff. tho – mikeserv Dec 29 '15 at 4:55
  • 1
    @convexityftw as long as you will recreate the same partition table, this is not the big deal of course if you know how to install bootloader after that. You need just to create same partition table without adjusting the same sizes for unrelevant partitions (or even not to create them) and create your sda5 and sda6 with EXACT SAME SIZE of blocks. The size can be read from /sys/block/sda/sda5/size, same for sda6. Then use this size in fdisk. If you completely too new to this, I suggest you to read much about that, or to seek for another cloning tool. – user140866 Dec 29 '15 at 5:03
  • 1
    @sibylnx - the partition uuids need altering, too, if the other disk isnt going to be removed. cloning a partition from a host machine back to the same host machine can be more than trouble than its worth. its not that hard, but if you dunno what youre about then it can be confusing. – mikeserv Dec 29 '15 at 5:09
  • 1
    @mikeserv of course, in sane Linux this is not hard. And that's why uuid hurts - the concept where disks or partitions are unique is strange to me. – user140866 Dec 29 '15 at 5:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.