[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
Original Poster
Rep:
Quote:
Originally Posted by beachboy2
syg00,
You are dead right. I remember screwing things up royally some years ago whilst cloning and ended up with identical UUIDs.
Not recommended!
clonezilla added a boot folder and all of a sudden , well, not quite, but next boot up I had the Grub dual boot menu come up without the Shift key on the boot process, and, it showed a windows7 option. only place it could have been was that ssd, which i did not want to boot anyway. so never tried to select it. figure it will go away once i put the Mint onto that SSD, or clean install to it which was my fall back option
However, I hve gotten so much excellent help and detailed links for how to-tutorial quality information , i am definitely going to clone or migrate whatever it's called. cant go wrong? I've said that too many times before....
thanks,
John
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
I have made progress with Gparted-I formatted my 128gb SSD to ext4, from the live CD Mint17,3. Opened a terminal on the desktop and got stuck on the : udisk --mount/dev/sda1 entry. i got the [OPTIONS] list of all the -- for udisk, Also for the "df -h" entry i got no devices on the bottom of the result. should have had one 1Tb drive and the newly reformatted 128gb ssd.
i read a few things and re tried the code a number of times and kept getting the same results -missing devices. i shut the thing down because i was repeating the same mistake over. I need to go back to it and will see what i did wrong. I knew the sda 1,2&3 were there as was the cdrom listed as well as the sdb1 &2 were listed. so, i was doing something wrong and repeating it , i think ,or hope
so, i got stuck at step 1 on each of the 2 methods i attempted.
not a big deal for me, i am used to messing up initial attempts.
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
thanks
I knew i was doing the same dumb thing over and over.
am just getting ready to go at it again. i did not notice the space between mount /dev. not sure i would have without the tip here.
i can not remember if i typed disk or disks , no problem got it now
i thought the reason nothing showed up was due to the devices not being mounted. but didnt know exactly what to do next, and with more than one mess up, i thought it was best to go away from it for a while
i couldnt copy/paste because i had the tutorial and these posts up on a separate computer. and , again, got off the thing rather than put up the browser on the computer i was working on.
will be headed in the right direction next time though. will re boot into the live usb now.
thanks again
John
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
[QUOTE=syg00;5503178]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.
WHOOPS!
With all the influx of information and added tutorial page, i skipped right past the part regarding reducing the size of that partition. Just noticed as I learned how i didnt mount the drives . no big deal. I made a few errors and only noticed 2 of 3 or 4 , with help, that i neglected to shrink that drive down. since i couldnt post any drive information, no one could possibly been able to make that suggestion.
back at it one more time
I think i have all the information and tools to be able to do this fairly simple task, but i can always make more typing entry errors .
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
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
I have gone to the How to do the mint copy hyper link you've provided but got stuck right at the point to edit the etc/fstab. I had no idea what to copy or save and whether to add a line or replace a line. I saw the example but it used sda1 for mount point in both 'before' and 'after' examples. I have sda2 and sdb2 as the before and after or from and to. I will be keeping both drives and partitions though removing the original sda2 as a boot partition. it is ext4 and on a hdd partition shared with the ntfs windows type other half. i will remove the content from the ext4 side but leave the movies videos and whatnot on that ntfs side as is.
i have not turned the computer off , it is still booted with the live usb and i fear i have gone just far enough to keep it from booting into either , that is, not booting at all. i have 2 terminals up , one with nano editor and the other with the blkid list. i had saved copies of each partition uuid prior to all of the changes and backed up the whole shrunken partition. all that worked fine too.
i am afraid to make any alterations in the mountpoints since i do not know just what I was supposed to insert with the next commandline substitute mountpoint 1 or mountpoint2 with . i dint know if it was the long number or just sda2, etc.
john
Well, the purpose of editing /etc/fstab is to enter the new UUID number.
The example was to edit fstab while you are using chroot. You don't have to do it that way. You can edit the fstab without doing the chroot process.
Open a terminal, and enter:
Code:
inxi -pou
That will give you all the UUID numbers.
Leave that terminal open, and in your file manager, use the Go menu > Computer. Click on the new root partition to open it. You will see the standard directories - bin, boot, cdrom, dev, etc... Right-click on the etc directory > Open in terminal. In the terminal enter:
Code:
gksudo gedit fstab
You will see the 2 lines which refer to the / partition:
Code:
# / was on /dev/sda2 during installation
UUID=a2cd308e-2307-4bb4-8382-b54b792b8a79 / ext4 errors=remount-ro 0 1
The first # line is just a comment - you can edit it any way you like.
On the second line change the UUID number to the new one that is shown in your other terminal (that you left open). Just change the number.
UUID=a2cd308e-2307-4bb4-8382-b54b792b8a79 / ext4 errors=remount-ro 0 1
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
Quote:
Originally Posted by TxLonghorn
Well, the purpose of editing /etc/fstab is to enter the new UUID number.
The example was to edit fstab while you are using chroot. You don't have to do it that way. You can edit the fstab without doing the chroot process.
Open a terminal, and enter:
Code:
inxi -pou
I did that in a 2nd terminal and got the info, just got myself overloaded with the order of that particular tutorial page.
The first # line is just a comment - you can edit it any way you like.
On the second line change the UUID number to the new one that is shown in your other terminal (that you left open). Just change the number.
UUID=a2cd308e-2307-4bb4-8382-b54b792b8a79 / ext4 errors=remount-ro 0 1
this is exactly what i figured needed to be changed. I had too many sda1, sda2, sda3 and sdb1, sdb2 which is the new drive, and sdb3.
knowing i just need to put the proper number in there makes it seem easier now
I have booted it up 2x and works fine still. just need to change over the uuid to sdb2 i think. sda2 was the 'from' sdb2 is the new copied spot on the ssd. am guessing that i associate that number with the "TO' now , then work on the swap , that i am guessing i can do in Gparted ,too.
I am just so new at this i freeze up on making changes without knowing exactly what is happening. all those uuid numbers strung out were daunting .
thanks again, this really helps to clarify what goes were.
one thing i noticed ,that just by shrinking down the old partition of the HDD made everything happen much faster.opening up apps ,boot up .
it all just started out as a trial and possible learning process but has worked out very well thanks to the help i've gotten here.
John
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
Quote:
Originally Posted by TxLonghorn
If you post the result of
Code:
inxi -pou
and tell us which ones are the new partitions you want to use...
- and post the contents of the fstab
we can tell you the correct changes.
Quote:
GNU nano 2.2.6 File: /media/TO/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=44dd054b-1e33-4db9-a413-520acb0f04c5 / ext4 errors=remoun$
# swap was on /dev/sda3 during installation
UUID=60182cbd-4a5f-4d38-920c-4b889ee0264f none swap sw $
[ Read 11 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell
and hopefully this is going to be something you understand.
I want to use the sdb2 as the boot drive/partition.
sda2 is the 'old' one that i have not been able to chnge yet. seems as if the copy and all that went ok. i need to move the swap .too to the sdb partition. i will , then change the sda2 ext4 partition as more storage and back up space i have sda1 as the original ntfs windows half of the 1TB drive with movies videos on it which was fine with linux apps. i plan to leave that whole 1TB drive in the box and use the ssd as the main boot drive . there is the 100Mb partition left over from the original windows 'reserved' part i didnt get G0parted to include in the format. it wouldnt let me combine them. i thought i could expand it for swap use later(now) at the time.and use gparted to do that.
was only guessing but thought i might be able to do it using the live usb to boot with
thanks
John
Last edited by johnniedoo; 03-03-2016 at 10:10 AM.
Reason: closed browser by accident
sdb2 is the new mount the 128gb ssd
the old one came from the 95gb partition which is still the one booting i gather.
at least i can still boot into one of them
I have a gui program called I-Nex which shows a view of all the hardware and system info. there is a ton of information in it and on the desktop. has the df, udisks and all the uuid, codes and way more information than I know what to do with.
I just noticed that all the information i couldnt pull up in the terminal at first was residing a click or 2 away in the I-Nex gui. It is sort of like a much more detailed old windows desktop utility CPUID and GPU-Z and HWinfo all combined in one very accessible app. I just didnt know what to do with it all.
Last edited by johnniedoo; 03-03-2016 at 02:19 PM.
Reason: ADD P.S.
The UUID for sdb2 (the new / partition) is: 04c1c1f0-4d4d-4724-8ca8-a7eab6801606
The 2 lines in fstab for the / partition are:
# / was on /dev/sda2 during installation
UUID=44dd054b-1e33-4db9-a413-520acb0f04c5 / ext4 errors=remount-ro 0 1
So change those lines to:
# / partition - /dev/sdb2
UUID=04c1c1f0-4d4d-4724-8ca8-a7eab6801606 / ext4 errors=remount-ro 0 1
Delete the line:
/dev/sdb2: UUID="04c1c1f0-4d4d-4724-8ca8-a7eab6801606" TYPE="ext4"
Right now it is set to use /dev/sda3 (uuid: 60182cbd-4a5f-4d38-920c-4b889ee0264f) as swap. If you want to change that to a new swap partition, do that in the same way. Just replace the UUID number.
Last edited by TxLonghorn; 03-03-2016 at 05:29 PM.
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
Quote:
Originally Posted by TxLonghorn
The UUID for sdb2 (the new / partition) is: 04c1c1f0-4d4d-4724-8ca8-a7eab6801606
The 2 lines in fstab for the / partition are:
# / was on /dev/sda2 during installation
UUID=44dd054b-1e33-4db9-a413-520acb0f04c5 / ext4 errors=remount-ro 0 1
So change those lines to:
# / partition - /dev/sdb2
UUID=04c1c1f0-4d4d-4724-8ca8-a7eab6801606 / ext4 errors=remount-ro 0 1
Delete the line:
/dev/sdb2: UUID="04c1c1f0-4d4d-4724-8ca8-a7eab6801606" TYPE="ext4"
Right now it is set to use /dev/sda3 (uuid: 60182cbd-4a5f-4d38-920c-4b889ee0264f) as swap. If you want to change that to a new swap partition, do that in the same way. Just replace the UUID number.
Thanks again,
I was pretty sure on the UUID change over, but, I never would have gotten the other line to change the "/" /partition ... in a million years. I read too much and missed a few key items , lucky i stopped before i screwed it up, too much
I have a dual boot menu showing up though only has one result regardless of which i pick..both end up with the same original drive as would be expected the way i left it. I was fearful of creating cloned systems and saving one uuid number without deleting and changing the mount point.
I should be ok from here, though, never know.
Distribution: MINT17.3 Mate, Cinnamon , Mint MATE 18.1
Posts: 73
Original Poster
Rep:
[QUOTEDelete the line: /dev/sdb2: UUID="04c1c1f0-4d4d-4724-8ca8-a7eab6801606" TYPE="ext4" line i dont know where to delete from
(and i just made a linux-swap partition on the new ssd after i made the first gparted ext4 124 of 128gb space on the ssd.)
[/QUOTE]
I do not know where to make these changes. I am on info overload. I absolutely understand what needs to be done, however i am not clear where these changes need to be altered. I have /etc/fstab in both partitions. I would have just taken out the other drive but I have plans for it where it is.
I have set up the new SSD with a swap partition and main partition and just left the 100mb partition as ext4 rather than unallocated. it refused to join up with the first format and after i made the change , i didnt want to mess up any alignment-if that could have happened. i only know the term and not the actual process.
In the prior email I indicated a couple of the gui applications i have for disk management, and i probably have one or 2 others i may have collected in anticipation of cloning or moving the stuff over a few months
I did not have gedit i guess on the live usb which confused me when i called it in the command line. i know i have it installed on both partitions now. so, i used nano and got part of what i need to change with the right click on the ssd 'etc' folder in terminal. I guess i could alter it in the folder when the partitions are unmounted. so , that is the question. do i need to change etc/fstab in both copies? ran into empty gedit or nano pages in the terminal. some error i made somehow.
I got used to the extreme ease of using the windows freeware partition or clone apps and took a while to grasp the linux method. it isnt hard , just i missed the process and confuse myself with the details. of course, making sure i do not cause extra issues which is keeping me cautious with this . I did destroy plenty of my early attempts last year by reckless cut/paste codes without having a clue.
Last edited by johnniedoo; 03-04-2016 at 02:35 PM.
Reason: highlite/underline
That all sounds pretty confusing, but it shouldn't be.
You have Mint on the HDD (sda). The bootloader (Grub) for that Mint should be installed to sda. That Mint's fstab was correct before you cloned it, and it is still correct - unless you move (or delete) the swap partition.
Your clone on the SSD (sdb), has now been configured to boot that Mint. So there is no problem.
As for the line you don't need:
/dev/sdb2: UUID="04c1c1f0-4d4d-4724-8ca8-a7eab6801606" TYPE="ext4"
- that was in the new Mint clone's fstab that you posted above - Post #25
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.