Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.