2

I am replacing my internal hdd in my laptop with a new one. The new hdd hasn't been used before, and lshw can detect its capacity and no other information.

I think of two ways.

The first way:

  • backup the data of my internal hdd to a third external hdd.
  • replace the internal hdd with new one,
  • install Ubuntu on the new internal hdd,
  • copy either the data on the original internal hdd (with a sata-usb adapter) or the backup data on the third external hdd to the new internal hdd

The second way:

  • use the sata-usb adapter to connect the new hdd to my laptop.
  • then can I format and partition the new hdd and install Ubuntu on the new hdd, while I am running my Ubuntu 12.04 on the old internal hdd (still internal)?
  • after installing Ubuntu on the new hdd, I will copy the data from my old internal hdd (still internal) to the new hdd (external)
  • turn off my old Ubuntu, and replace the old internal hdd with the new hdd.

My questions are:

  1. is it possible to format and partition the new hdd (external to my laptop, and connected to my laptop via sata-usb adapter), and install Ubuntu on the new hdd, while I am running my old Ubuntu on the old internal hdd (still internal)?

  2. How good and bad can the second way be?

    For example, do I have less risk of data loss in the second way than in the first way? So I can skip backing up data to a third external hdd in the second way?

Thanks.

  • By the way, what version of Ubuntu are you using on the existing HDD? And does it have any spare capacity? – Wilf Mar 4 '15 at 19:55
  • 12.04 on the current internal old hdd. > 90% usage – Tim Mar 4 '15 at 20:02
  • My first guess would be to get a usb to SATA ( or PATA, if that's your hdd ), boot from a live USB, mount both drives, and do dd if=/dev/sdaX of=/dev/sdbX. Adjust X and sda/sdb names accordingly – Sergiy Kolodyazhnyy Mar 4 '15 at 20:14
3

The answer to your first question is yes, but then replacing your previous hdd with the newly installed hdd may cause severe problems.

As an example consider that you installed Ubuntu in new HDD when connected externally and grub was installed in old HDD, when you remove old HDD and replace it with new HDD, it won't boot any OS because grub is missing.

If you install grub on new HDD (during installation it would be something like /dev/sdb) and then replace internal (old) HDD with new HDD, grub won't again load since replacing internal HDD with new HDD would make the new HDD as /dev/sda but grub would find it in /dev/sdb which doesn't exist, hence, you won't be able to boot.

Thus, the safer method is :

  1. To make a back up of all data of your previous HDD on some external storage like USB disk
  2. Replace the old HDD with new HDD.
  3. Install Ubuntu on the new HDD.
  4. Copy back up files from external storage (say USB disk) to the new HDD.

Hope it helps.

3

As long as you ensure you install the bootloaded (grub) on the hard disk you're installing Ubuntu on, there is absolutely no problem!)

I've even installed Ubuntu on an external hard drive on my own machine and then moved that to the internal hard drive of another machine multiple times and it just works (unlike Windows)

  • Thanks. ubuntu99 said that "If you install grub on new HDD (during installation it would be something like /dev/sdb) and then replace internal (old) HDD with new HDD, grub won't again load since replacing internal HDD with new HDD would make the new HDD as /dev/sda but grub would find it in /dev/sdb which doesn't exist, hence, you won't be able to boot." Which one of you is right? – Tim Mar 8 '15 at 23:43
  • I've added the qualifier "if you install the boot loader on the external drive as well". It's an option in the something else screen. So we're both right, but @ubuntu99 is only right if you don't take that option! ;-) – Fabby Mar 8 '15 at 23:54

Your Answer

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

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