# moving my linux mint partition to another hard drive



## Sanhime (Oct 18, 2014)

Hello.  I have a 3TB hard drive with Win7 occupying around 2.1TB and Linux Mint (Ubunutu) occupying 600GB.  I have a spare 1TB hard hard.  I want to move the Linux Mint to the other hard drive.  How do I properly do this?  And how do I properly edit GRUB# which is the current bootloader?

Thanks.


----------



## blobster21 (Oct 18, 2014)

Be carefull when you move your O.S from one disk to another :

The /boot/grub/grub.cfg makes a lot of references to your current 3TB through the use of UUIDs. Same goes for /etc/fstab way of adressing partitions.

Could you post the output of


```
sudo cat /etc/fstab
sudo blkid
sudo fdisk -l
```

to have a personnalized how-to ?

I would probably do something like this:

1/ Use gparted to clone the existing linux mint installation, from the 3TB hard drive to the new 1TB hard drive, using a simple copy and paste from disk to disk

2/ Still in gparted , set the "boot" flag on your new /dev/sdb1 partition containing the linux mint installation we just moved (assuming your 3TB hard drive is /dev/sd*a*,)

3/ Reinstall the new grub2 bootloader using:


```
sudo grub-install /dev/sdb
```

4/ Then update the boot menu with:

```
sudo update-grub
```

4bis/ Mount the newly moved linux mint installation partition onto your local file system, and update its /etc/fstab with the correct UUIDs. We'll need the output of the blkid command to do that:


```
sudo mount -t ext4 /dev/sdb1 /mnt
sudo nano /mnt/etc/fstab
```

then replace old UUIDs with the one associated with your 1TB hard drive, and unmount the drive


```
sudo umount /mnt
```

5/ Restart the system, go in the bios, and change the default boot sequence to set the 1TB hard drive as the first drive to boot.

6/ If everything is ok, proceed to remove the former linux mint installation from the 3TB hard drive to free those 600Gb and expand the windows partition (both can be done with gparted again)

7/ run sudo update-grub again in order to clean the boot menu from the duplicate linux mint entries


----------



## Sanhime (Oct 19, 2014)

Would it be easier to install linux on the other hard drive, delete the linux from the 3TB drive, and update GRUB the way you described above?


----------



## blobster21 (Oct 19, 2014)

That would be safer indeed. To avoid any confusion, i would suggest you unplug your 3TB during installation.

After the installation, plug the 3TB back online. At that point, both hard drives will be bootable, so you'll have to set the highest priority to your 1TB in the bios boot sequence.

Boot on your freshly installed linux mint, and delete the old linux mint partition + associated swap, then run the sudo update-grub command, and your windows partition should be added to the bootloader menu.


----------

