pexels-olia-danilevich-4974912

Dual Boot: GNU Linux & Windows

How can you upgrade to an SSD Hard Drive & Configuring Dual Boot?

Technical entrepreneurs and persons usually enjoy doing technical tasks in their spare time such as fixing a broken laptop or tablet.

Upgrading an RPM hard drive with a new SSD hard drive can be a daunting task. A common problem that some of us may face is migrating the data in order to have the new hard drive as the exact replica of the old hard drive.

Being a fan of open source/freeware, I’ve used a couple of programs/software to be able to do the disk mirroring. I also needed some hardware in order to be able to do the data migration. Here are the steps you can follow.

Disclaimer

The information provided here is very technical. If you are not a techie person then seek help from someone else. It is also advisable to back up your data before doing any disk operations. The information is provided as is with no liability on our side.

It is also worth saying that unplugging the laptop completely from power and removing the battery (or battery connection in case of a fixed battery) is important before changing any internal component of the laptop.

Needed hardware

In order to connect the new SSD to the laptop while having your old hard drive still connected, you will need either of the following hardware:

  1. An External SATA-to-USB hard drive enclosure or external SATA-to-USB converter in order to connect your new SSD to the laptop.
  2. CD Caddy to connect the SSD laptop in place of the CD ROM drive. Note that these Caddies come in different heights (either 9.5 mm or 11mm) so make sure to pick the one suitable with your laptop,

Needed Software

  1. Macrium Reflect free edition to clone the two hard drives.
  2. resize2fs command line Linux tool which you will need to use if you get an error message similar to: “Either the superblocks or the partition table is likely to be corrupt”. If you get this message then you won’t be able to use fsck (another command line Linux tool stands for “file system check”) to fix the disk problem but you will need to use resize2fs to the correct (physical) size and then use fsck afterward. [Note: Use fsck with great care and at your own risk]
  3. Boot Repair tool (Ubuntu-based). This will be needed if the number of [Note: Use with care]

Steps

  1. Here comes the standard prerequisite to any hard drive operation: Perform data / Operating system backup in order to avoid data loss in case any error happened during the process.
  2. Connect the new SSD drive to your laptop using any of the methods described in the 1st or 2nd step of the hardware section. You will need to have the original hard drive as the bootable hard drive.
  3. Log on to Windows and install Macrium reflect to clone the hard drive to the new SSD. The following Youtube video details this step.
  4. If your new SSD drive is larger than or equal to your old hard drive then most probably you will not need to use further tools and things will work smoothly when you place the SSD in place of the old hard drive.
  5. Replace the old hard drive with the new SSD. You can see this Youtube video for the process. Another video can be found here.
  6. Boot the laptop.
  7. If you see the GRUB menu then Bingo, the swap has worked correctly and you do not need any further actions.
  8. If you are not able to see the GRUB menu and are getting an error message
error: no such partition.
Entering rescue mode

then don’t panic, you just need to point GRUB out where to look. Simply type:

    ls

This should list you the list of devices (ex: \dev\hd0, etc)

Most probably, the partitions on the new SSD are less than the partitions on the old drive, so type

set

It will show you something like:

cmdpath=(hd0) 
prefix=(hd0,msdos6)/boot/grub 
root=hd0,msdos6

This is a good place to start. GRUB is simply telling you that it is looking for the msdos6 partition on hd0, which probably it cannot find after the data clone since the new SSD is smaller than the original drive and you had to drop some of the logical drives, hence; You should point out GRUB to the new partition where it can load from.

In my case, I skipped one logical drive in the middle, so GRUB should be residing on msdos5 (instead of msdos6).

To inform GRUB to start booting from msdos5, type the following commands:

    set boot=(hd0,msdos5)    
    set prefix=(hd0,msdos5)/boot/grub
    insmode normal
    normal

Once you press Enter, you should be able to see the GRUB menu and select the operating system to boot from. Congratulations on this step, but the problem is that if you skip the next steps you will have to do this process every time you boot your laptop. What you need now is to re-install GRUB so that it reads the new parameters and starts applying them by itself at every boot.

9. When the GRUB menu appears (after executing the commands mentioned in the previous step), choose to boot Ubuntu and login into the system. The following article provides useful information and asks you to download the Boot-Repair tool. This is what you need now to fix the boot problem. Just follow the steps mentioned on the Ubuntu page describing the Boot-Repair tool in order to uninstall GRUB then install it again with the correct parameters which will lead to smooth loading of the boot loader and both Operating systems (Windows and Ubuntu Linux).

Assumptions

I assume you have both Windows and Ubuntu Linux with dual boot configured correctly before changing the hard drives. I also assume that the size of the new SSD is smaller than or equal the size of the original hard drive. If your new SSD hard drive is larger then the process is much simpler.

Add a Comment

Your email address will not be published. Required fields are marked *