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?

Zachary Brady
  • 4,200
  • 2
  • 17
  • 40
lazulikid
  • 121
  • 2
  • 2
    What is size of your Linux partition? –  Dec 29 '15 at 04:26
  • what is the fs? and you might just `pax -rwpe /mnt/oldhd/root /mnt/newhd/newroot` whatever it is. – mikeserv Dec 29 '15 at 04:27
  • @siblynx The size is 100Gb (just added that detail in question). – lazulikid Dec 29 '15 at 04:35
  • what is the fs? did you do one of those wubi deals? try `lsblk -f` from the clonezilla shell and paste the output into your question. – mikeserv Dec 29 '15 at 04:35
  • @mikeserv I don't understand "fs". No, I didn't use Wubi (I had, originally, but then got rid of that). I used a Linux Mint CD to install Mint alongside Windows. – lazulikid Dec 29 '15 at 04:36
  • did you do it into the preformatted wubi file? fs = filesystem. how is your `/` formatted and where does it live? `/dev/sda...?` – mikeserv Dec 29 '15 at 04:37
  • @mikeserv Sorry I'm really new to this, so not quite following your questions. What do you mean by how is my "/" formatted? I see a /dev/sda, /dev/sdb (this is the SSD) and /dev/sdc1 right now. The /dev/sda has sda1 (SYSTEM_DRV 1.6Gb NTFS), sda2 (372 Gb Windows 10 NTFS) , sda3 (Lenovo_Recovery 17 Gb partition), sda4(Extended Partition 110 Gb), sda5 (Extended Partition ---> This is Linux), sda6 (Swap Partition 4.2Gb) and free space 1.1Mb. – lazulikid Dec 29 '15 at 04:42
  • 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 04: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. –  Dec 29 '15 at 05: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 05: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. –  Dec 29 '15 at 05:26
  • 1
    @siblynx - what - mbr? if you think the mbr boot scheme is *sane*... dang. anyway, wouldnt it be nice just to name your disks? like, in fstab: `LABEL=myroot / myfs defaults 2 1`? that's *sane*. and getting rid of all the crazy bootloader stuff and just letting the firmware boot the kernel like bios used to be able to do a quarter century ago... thats nice. anyway, if you want to alter a uuid, [its not so hard](http://unix.stackexchange.com/a/154303/52934). – mikeserv Dec 29 '15 at 05:31
  • 1
    At least mbr simple to understand. –  Dec 29 '15 at 05:39
  • 1
    @siblynx - simple? w/ extended/primary/logical partitions? w/ bootloaders that wedge themselves into raw sectors of the disk? cylinder/head/track addressing? there's *none* of that nonsense w/ a gpt disk. every partition is a partition. thats all - not extended or whatever. it gets a unique id so it can be identifiied and so you never have to do crazy bootloader *hints*. and thats it. thats the whole system. – mikeserv Dec 29 '15 at 05:42
  • 1
    Honestly, if you have the expectation of having several OSes in 250GB, I would buy the 500GB SSD, buy a box for the 250GB and use it as an external disk for backups. From what you tell us here, in 1 year time you will be doing it anyway, so I would do it now. Filesystems when used at more than 70-80% of their capacity are equal to slower operations. – Rui F Ribeiro Dec 29 '15 at 07:48

0 Answers0