Ubuntu – How to move Linux on a USB stick to a hard drive partition

14.04bootdual-boothard drivepartitioning

I was running Ubuntu on a USB stick for a while because my hard drive had failed. It had two partitions.

I recently installed a new hard drive and installed Windows on it. I created a new partition inside Windows that is larger than the USB stick.

My question is: how do I move Linux to this partition on the new hard disk so that I have a dual-boot system? I downloaded a program called EaseUS Todo Backup but it can only clone a hard disk onto a hard disk or a partition onto a partition. Ubuntu is installed on the whole USB stick and has two partitions of about equal size.

Does anyone know how to do this?

Best Answer

Try installing Ubuntu and moving home directory to your new system.

If you need to move it and it's a proper installation (not live version) then use

dd bs=4M if=/dev/partition_on_pendrive of=/dev/partition_on_disk

Then chroot into partition you've created and install grub. Don't forget about swap.

Related Question