[SOLVED] Migrate Mint 17.3 from HDD partition to SSD
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Rep:
Migrate Mint 17.3 from HDD partition to SSD
I have my Mint 17.3 Mate installed on 440Gb of a 1Tb WD 7200 rpm HDD. other half is storage from windows things eg Movie/vids. I have a 128gb crucial M4 that i had windows 7 on in another computer that i had used for a couple of yrs, I bought a new 250Gb samsung 850 EVO and just migrated the smaller to the new one.
I now put that crucial M4 128gb into the box with the WD 2 partition drive with the Mint on it.
I want to migrate that Mint from its 440gb partition onto the old ssd with the windows 7 x64 still on it.
I do not know if it is possible as is. the partition is 4x the size of the target 128 ssd.even though the size of the whole Mint is just about 55gb. I used gparted to get it to where it is, but did not make multiple partitions , just the swap and other ntfs side, the Linux side being ext4 .
I am wondering how to go about moving the thing intact so i do not have to completely rebuild what i have already.
i have tried to use clonezilla already but have failed each try for various reasons. mostly because i am pretty new to all this
only used gparted the one or two times i needed to create the few versions of mint i have. each time it was not a smooth process-needed to try a few times to get it sort of right.
I am wondering if i should use gparted to shrink down the HDD partition where Linux mint is first.
and if i should format the target ssd to ext4 prior to making any migration/clone attempts?
i know there is the option to just do a clean install onto the ssd, but i am not aat all comfortable with then trying to send my older system settings and such afterward
the windows 7 ssd to ssd migration was so smooth and only took a few minutes to accomplish i thought i might be able to do something similar and forgot about that huge hdd total partition size vs the 128gb ssd. i though only of the size of the system even including swap size being 55gb.
if someone could just point me in a direction, i think i may be able to persevere . i am just worried i will wipe out the system that is on the hdd in my trial and error methods
i have not found anything close to being helpful for my situation though i have searched and tried a dozen different methods from youtube, clonezilla and elsewhere.
thanks
john
Clonezilla won't work if (as appears to be your case) the target partition is smaller than the source. rsync from a liveCD/USB is usually the best answer.
Then you need to clean up - normally just fixing UUIDs in fstab, and re-installing grub.
Let's see the output from this for the machine with the 1 TB WD and 128 Gig SSD
ok thanks, I am so much of a novice I couldnt figure that out by myself yet
appreciate it
I did try to use the mint 17.1 live usb I made to do gparted and shrink down the partition on my hdd from 440gb (approx) to just more than the size of the system. but chickened out since I didnt know if i should move swap partition or whether to leave the shrunken part in place with the unallocated piece between it and swap. too many variables that might interfere with being able to re boot at all. I have already made a ton of mistakes that messed up the next reboot on my first linux mint experiments on other machines before i built this one
I wanted to be able to totally separate it from the hdd and be only linux on its own drive-ssd- and open up the old hdd for movie and old radio mp3 storage ,things like that.
You should be ok if you want to do the shrink with gparted and Clonezilla. Personally I wouldn't make it too small as gparted needs some work space to shuffle things around - maybe 80 or 90 Gig. gparted is pretty (make that extremely) good.
Delete the stuff on the SSD and make an ext4 partition on it of whatever size - even the entire thing is good.
Leave the swap where it is - it's at the end of the disk, out of the way.
You will have to fix the new /etc/fstab as the new ext4 partition on the SSD will have a different UUID. That lsblk should have shown UUIDs as well - what system did you run that command from ?. "sudo blkid" will show the UUIDs.
You will also need to update the boot-loader - here is a tute that should help.
Last edited by syg00; 02-19-2016 at 09:09 PM.
Reason: blkid
Thinking more on this, I'm not sure what Clonzilla will do with the UUID of the target partition (on the SSD). You may well finish up with both partitions with the same UUID. That will be a problem.
You won't have to fix fstab in that case, but you will have to force the UUID on the original partition to something else - try "tune2fs -U random /dev/sda2". See "man tune2fs" - even for ext4.
Clonezilla won't work if (as appears to be your case) the target partition is smaller than the source. rsync from a liveCD/USB is usually the best answer.
I agree. rsync is the way to go.
Quote:
Originally Posted by syg00
Then you need to clean up - normally just fixing UUIDs in fstab, and re-installing grub.
In addition to editing fstab and re-installing Grub, you probably have to refresh the initfs.
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
Quote:
Originally Posted by syg00
Thinking more on this, I'm not sure what Clonzilla will do with the UUID of the target partition (on the SSD). You may well finish up with both partitions with the same UUID. That will be a problem.
You won't have to fix fstab in that case, but you will have to force the UUID on the original partition to something else - try "tune2fs -U random /dev/sda2". See "man tune2fs" - even for ext4.
Thanks for all the thought and assistance you've put in here. I actually understand 75% of everything you showed me here
I was wondering about that UUID stuff and how i have this particular computer set up or what happened when i added the SSD from the last computer build i had used as the "C" drive in the windows7 part-i have linux mint on an eSATA external drive there with a dual boot set up, but had EasyBCD 2.2 in there somewhere from long ago. so there was boot loaders all over the place. it worked just fine where it was.
I took it out of that box and just slid it into my new build which was Linux only. Clonezilla had a boot folder put onto the 128Gb SSd with win7 on it. i didnt ever bother to try to boot into it but right after i fiddled around with the aborted clonezilla try to copy or clone , I noticed that there is now always a grub boot menu for dual booting. i forget if it got Easy BCD into the mix or not, since it probably was in the old win7 system i left on the ssd. i did that just in case i needed something off it after the migration I didnt notice right away after the proper windows7 migration from this 128gb ssd to the new Samsung850 evo 250Gb. it was perfectly executed by a good freeware program. but i didnt want to just purge the OS from the 128SSD -but it has been a few weeks now and i am fine with replacing it . besides i made an image inside mint with the disk app and saved it.
I am just getting back to the 'project' family birthdays and issues have me putting all my computers on hold.
thanks again. will be getting back in a few days on this. just did a dry run with gParted and appreciate these posts will need to read/re read them,though i will have them all up in my other display in another computer here. one benefit from saving parts and making back up computers.
i do not use smart phones or other devices, only my linux resuscitated old x64 2core laptop from 2008 had vista on it and refused to run. it now does all sorts of things. got me interested in Linux-Mint about 18 months ago. so i am fairly new with this but help such as this keeps me learning and advocating the platform to everyone i see, just about
john
Be sure to change "mountpoint1" and "mountpoint2" to the correct names.
Chroot to the new partition:
Code:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /media/mountpoint2$i; done
Be sure to change "mountpoint2" to the correct name.
Code:
sudo chroot /media/mountpoint2
Refresh the initfs:
Code:
update-initramfs -u
Install Grub to the approprate drive - sdc? sdb?
Code:
grub-install --recheck /dev/sdc
Code:
update-grub
Open /etc/fstab in your text editor: (mine is gedit)
Code:
gedit /etc/fstab
Enter the new UUID number for your new / partition. Save and exit.
CTRL-D to exit chroot
CTRL-D to exit the terminal
Wow!
Thanks for all this. I only recognize a little bit of those terminal code entries. better than i was a month ago though
I will look all this over and re read it so I dont just copy/paste before i know what the heck i just did
Part of Linux and Mint (Mate) in particular, is I am able to learn lots of new things if I take a few minutes to look at what is happening. It has become less daunting and more fun-which is half the battle. and, for me, more to the point of using it in the first place
People like you folks here are instrumental in me being able to use it at all, and I appreciate it very much.
I will be getting to this in a little while and trying it out, not that this is some pressing task or ,even close to monumental in the course of things
But it will, hopefully, get the computer to boot a lot faster than it currently does. One improvement for free is a step in the right direction
thanks again
john
I have cloned a / partition with gparted many times (simple Copy and Paste into unallocated space), and you do have to worry about the duplicate UUID numbers. You can use Gparted to assign a new UUID number immediately after the Paste, and then you use the chroot process to update Grub, fstab, and the initfs.
Using rsync is more versatile, tho, and faster.
Last edited by TxLonghorn; 02-28-2016 at 06:42 AM.
I have cloned a / partition with gparted many times (simple Copy and Paste into unallocated space), and you do have to worry about the duplicate UUID numbers. You can use Gparted to assign a new UUID number immediately after the Paste, and then you use the chroot process to update Grub, fstab, and the initfs.
Using rsync is more versatile, tho, and faster.
COOL!!
Thanks for that link,too. made my eyes spin around in their sockets first time through it. I am on the 3rd re-read. I never used(or heard of) rsync up till last week. Gparted seemed risky enough, but , at least I have plenty of experience using it over the past year . It is how i first set up Mint from the live CD and now USB drives. I am sort of comfortable with it by now.
Again, thanks, am about to boot from the live usb soon
John
Thinking more on this, I'm not sure what Clonzilla will do with the UUID of the target partition (on the SSD). You may well finish up with both partitions with the same UUID. That will be a problem.
You are dead right. I remember screwing things up royally some years ago whilst cloning and ended up with identical UUIDs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.