Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I install windows in my SSD and also installed Ubuntu in my HDD. How can I get rid of window in SSD and replace it with Ubuntu in HDD, but also delete Ubuntu in HDD

share|improve this question

1 Answer 1

This is probably a bad answer, but in all of my experience with migrating between drives, the best possible solution is to do a fresh install on the new drive. After that you can leave both drives in the system, and copy over your files.

It is possible to directly bit copy the contents of one drive to another if the new drive is larger than the old drive.

dd if=/dev/sda of=/dev/sdb

Afterwards the partition table and file systems need to be expanded to the new drive. Utilities for this task tend to be of dubious quality, particularly in the Linux realm. Migrating to a smaller drive requires the file systems to be shrunk, which is kind of a hack since most file systems are not designed with shrinking in mind.

Anyways, do yourself a favor and just freshly install Ubuntu on the ssd.

To zero the old drive (after you have copied all of the data), figure out what device it is, and then bit copy over it from /dev/zero.

dd if=/dev/zero of=/dev/sd<?>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.