First run this program from your Mint 18 Cinnamon 64 bit menu called Disks it lets you have a look at a disk diagnostic assessment and partition your system to receive new installs a good idea is to install a extra partition for a separate Linux you can use later if you run into difficulty.

 ( i have tried to make the scripts compatible with 32 bits but i don't use that anymore ) Note this is a dangerous process for your data so backup using other tools so you can be sure not to lose data. I try my best but no responsibility taken.

so your drive is about to fail with the message in assessment tag the red text DISK IS ABOUT TO FAIL so what do do? This message can come up when the drive has reached is maximum useful life and you need to replace it.  First identify the drive that needs to be replaced.

so do this command at the terminal ( This will allow you to find the mounted name of /dev/sda1 which is the drive id of the device with a potential failure condition below it is 289ddbde-40e7-4aa6-8a16-c9cfc315bfax ) df -h 

Filesystem      1K-blocks       Used Available Use% Mounted on
udev              2900376          0   2900376   0% /dev
tmpfs              584260       8740    575520   2% /run
/dev/sda1      1922299728 1138768304 685861232  63% /mnt/289ddbde-40e7-4aa6-8a16-c9cfc315bfax
tmpfs             2921284     287800   2633484  10% /dev/shm
tmpfs                5120          8      5112   1% /run/lock
tmpfs             2921284          0   2921284   0% /sys/fs/cgroup
/dev/sdb5        99651124    8137488  86428552   9% /mnt/cd818a0c-6ef4-48a5-8aea-dcbadfe40490
cgmfs                 100          0       100   0% /run/cgmanager/fs
tmpfs              584260         20    584240   1% /run/user/1000
/dev/sdb7        50625196    5120292  42910192  11% /media/maggie777/98963bb6-6458-4a5b-bbc5-9567c8a1339e

But from the Disks program above you can see the partitions of the drive says  /sda1 is the 2 TB Western Digital (WDC) drive and the drive to be replaced is called the Seagate ST31 drive in this situation because it is about to fail ( Its reversed above but you can see the idea i just ran out of picture space for my google account so you have the other image  ).

Firstly we can run my backup program before any failure occurs its called Zenzilla and is a clone program like Clonezilla but this script is used while Mint is running and not from a bootable CDROM so is more hack-able to get your perfect program tailored to your system.

it isn't much for now just a single command using rsync but its hard to remember so i put it in a bash script file to help me use it later oh and note it should be all on one line ( reason for the small font ) so you can copy and paste it.

rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/289ddbde-40e7-4aa6-8a16-c9cfc315bfae

This line does a backup of your most important system directories onto a device called /mnt/289 etc this is the Western Digital drives mount location so this is the location to copy your new files. Note while you have the program running just make sure you have a partition ready to accept it ( should be 100 Gig enough for some programs expansion later but leaving your main storage drive at about 1.7 TB. (1700 Gigs) for movies and stuff.

Ok copy all done !!! now just tell the bootloader to see the new system.


Get your internet connection working on the new system then copy your internet DNS settings using as when your chrooted you will loose your internet for the session. ( you can try it chroot now and do apt-get update and you will get lots of can't reach server etc back it up first with cp /etc/resolv.conf /etc/resolv.bak just in case you get confused )

cp /etc/resolv.conf to /mnt/289ddbde-40e7-4aa6-8a16-c9cfc315bfax/etc/resolv.conf

now you need to chroot into the system you have just created and cd into it first download it below its called chroot.sh

cd /mnt/289ddbde-40e7-4aa6-8a16-c9cfc315bfax/

mount -t proc proc proc/

mount --rbind /sys sys/

mount --rbind /dev dev/
chroot / /mnt/289ddbde-40e7-4aa6-8a16-c9cfc315bfax/

Now this will mount the right drives to your system. Last cleaning up to do is update your ram disk (Initrd file) but if you want to update your system first with apt you can do it now as that will make sure you have a up to date ram disk file when you build it with the update-intramfs command script.

update-initramfs -u -k all

Done now reboot if you have problems try rebooting into recovery mode and you can fix it from within this is what happened to me as i forgot the update ram disk stage ( recovery mode uses a different boot process ) Good Luck on your new system transfer.

Stephen P,
Nov 8, 2016, 12:53 AM
Stephen P,
Nov 6, 2016, 10:27 AM