LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   How to move Mint to new computer easily? (https://www.linuxquestions.org/questions/linux-mint-84/how-to-move-mint-to-new-computer-easily-4175578364/)

sarah1 04-26-2016 08:48 AM

How to move Mint to new computer easily?
 
I'm helping friend to move Linux Mint 17.2 Cinnamon to new laptop.

Where i can find instructions for newbie how to move old apps, settings, own files etc to new laptop?

We don't want to move hard drive because new one has SSD.

Thanks

Wells 04-26-2016 08:58 AM

For the old apps, I would just hand-write a list of the apps and re-install them from scratch. You really don't want to go about with actual transfers of those kinds of things.

As for settings, a user's settings are typically stored in files in their home directories, so you could copy those. Not really recommended, but I have done it before with some success. Usually you are better off with just setting those from scratch when you fire up the program and desktop environments.

As for the files that are on the system that you want to transfer, there are two ways that come to mind that would do the trick (sure, there are more, but these are the two easiest)

1. Use a USB thumb drive. Copy the files to it, then copy them off on the new machine.
2. Hook up an ethernet cable between the two machines and scp/rsync the files between the two. You have to know something about networking settings to get this to work properly, but it would work, particularly if you have a lot of files that won't all fit on a USB thumb drive in one or two passes.

syg00 04-26-2016 10:02 AM

Copy /home over in-toto to a new partition - rsync is fine.
Install Mint clean onto the SSD but using the just-copied /home (no format). Make sure you create same user(s)/password(s) as old system. The Ubuntu derivatives have always been really good at this.
Re-install old apps as required - they will recognise the "dot" files in /home. May be some massaging of /etc files needed, but generally minor - and you always have the old disk to refer to.

Teufel 04-26-2016 10:37 AM

Archive your system into tarball, move it to destination HDD, unpack it there and restore bootloader.
Thats all.

It's explained/detailed here: http://www.gentoo-wiki.info/HOWTO_Custom_Stage4
The article written for Gentoo, but it works for any other Linux distro.

sarah1 04-26-2016 11:27 AM

Quote:

Originally Posted by Teufel (Post 5536807)
Archive your system into tarball, move it to destination HDD, unpack it there and restore bootloader.
Thats all.

It's explained/detailed here: http://www.gentoo-wiki.info/HOWTO_Custom_Stage4
The article written for Gentoo, but it works for any other Linux distro.

Thanks.

Your instructions would copy all without any reinstalling apps etc, but instructions in your link looks scary for newbie.

Is there any GUI which helps to move to new machine?

Mint is for newbies? So there should be easy way to move.

sarah1 04-26-2016 11:43 AM

Quote:

Originally Posted by syg00 (Post 5536788)
May be some massaging of /etc files needed

What does this mean?

Teufel 04-26-2016 12:42 PM

Quote:

Originally Posted by sarah1 (Post 5536843)
Thanks.

Your instructions would copy all without any reinstalling apps etc, but instructions in your link looks scary for newbie.

Yeah, it looks a bit scary, but you need, in fact, only 7 commands from that instruction.
1. tar -c (create archive)
2. mount partition
3. tar -x (extract it to destination partition)
4. mount /proc /sys and /dev
5. create device nodes
6. chroot into mounted filesystem
7. grub-install && grub-mkconfig

It really easy, much more easy then it looks like when you reading the article

sarah1 04-26-2016 01:02 PM

Quote:

Originally Posted by Teufel (Post 5536884)
Yeah, it looks a bit scary, but you need, in fact, only 7 commands from that instruction.
1. tar -c (create archive)
2. mount partition
3. tar -x (extract it to destination partition)
4. mount /proc /sys and /dev
5. create device nodes
6. chroot into mounted filesystem
7. grub-install && grub-mkconfig

It really easy, much more easy then it looks like when you reading the article

Thanks, thats looks much more easy, but i'm sure if we try this it will fail because we don't know anything about unix.

We don't dare to try this unless we have even more detailed instructions.

sarah1 04-26-2016 11:04 PM

Quote:

Originally Posted by syg00 (Post 5536788)
Copy /home over in-toto to a new partition - rsync is fine.
Install Mint clean onto the SSD but using the just-copied /home (no format).

Can you give more detailed instructions? Second sentence is especially blurry. ;-) Thanks.

Teufel 04-27-2016 05:31 AM

Quote:

Originally Posted by sarah1 (Post 5536899)
Thanks, thats looks much more easy, but i'm sure if we try this it will fail because we don't know anything about unix.

We don't dare to try this unless we have even more detailed instructions.

Well, assuming you have at your system only / partition, and /boot is just a directory, not a separate partition.
This case

1. Open terminal and get root privileges:
Code:

sudo su
or
Code:

su
2. Create exclude file, things mentioned there will not be moved to new destination system. File content described at Gentoo wiki is a good start point for first time:

Code:

touch /root/things.excl
echo ".bash_history" >> /root/things.excl
echo "/mnt/*" >> /root/things.excl
echo "/media/*" >> /root/things.excl
echo "/tmp/*" >> /root/things.excl
echo "/proc/*" >> /root/things.excl
echo "/sys/*" >> /root/things.excl
echo "/dev/*" >> /root/things.excl
echo "/etc/ssh/ssh_host_*" >> /root/things.excl
echo "/usr/src/*" >> /root/things.excl
echo "/stage4.tar.bz2" >> /root/things.excl

the last string pointing to the place where archive will be saved: at top level of your filesystem: /stage4.tar.bz2
And default Mint mount directory should be added to this list (like /mnt/*)
I'm not sure where Mint mounts external drives/usb sticks, you should know this directory, add it to the list.
And detach every sticks that attached and remove CD/DVD disk if inserted

3. Create archive:
Code:

tar cvjf /stage4.tar.bz2 / -X /root/things.excl
4. Wait awhile, when tar will finish and exit, copy resulting archive to pen drive, boot at destination laptop into LiveCD/USB, attach your pen drive.

5. Create partitions at destination hard drive and make ext4 filesystem there. Usually LiveCD/USB has GParted tool for creating partitions and filesystems, so you can use it.

6. Once root filesystem created, mount it somewhere, e.g. at /mnt directory (should be done as root).
Code:

sudu su
or
Code:

su
Code:

mount /dev/sdaX /mnt
replace sdaX with real partition number (sda1/sda2 or whatever else, it can be obtained from "fdisk -l command" or can be found in GParted)

7. Connect pen drive with archive and copy it to newly created filesystem:
Code:

cp /where/your/pendrive/was/mounted/stage4.tar.bz2 /mnt/stage4.tar.bz2
8. Extract archive content and create some device nodes to proceed:
Code:

cd /mnt
tar -xvjpf stage4.tar.bz2
mknod -m 660 /mnt/dev/console c 5 1
mknod -m 660 /mnt/dev/null c 1 3
mknod -m 660 /mnt/dev/tty1 c 4 1

9. Mount /proc and /dev into the chroot
Code:

mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev

10. Chroot into copied system:
Code:

chroot /mnt/ /bin/bash
11. Install bootloader:
Code:

grub2-install /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg

grub2-install should point to your hard drive, assuming it is sda (without number).

12. Correct /etc/fstab file to get it pointing to / filesystem.

Reboot.

P.S.
Don't worry, you will not loose anything if it fail at any stage.
P.P.S.
And one note: LiveCD/USB should be the same architecture like your system. They both should be 32bit or 64bit, otherwise you cannot chroot into your copied system

P.P.P.S.
Make sure you have enough free space at your donor filesystem to fit archive there.
Archive will be 2.5 Gb at least and may be large depending on how mach things you have installed and pictures/movies saved. By the way, this things may be excluded from archive as well.

beachboy2 04-27-2016 10:08 AM

sarah1,

What exactly is on the new laptop?

Is another Linux Mint OS installed on there?

What size is the SSD?

What is the total size of documents, photos, music etc that you are planning to transfer from the older machine?

sarah1 04-27-2016 08:11 PM

Quote:

Originally Posted by beachboy2 (Post 5537344)
sarah1,

What exactly is on the new laptop?

Is another Linux Mint OS installed on there?

What size is the SSD?

What is the total size of documents, photos, music etc that you are planning to transfer from the older machine?

Currently Windows 10 is installed. It's brand new laptop. SSD is 128 or 256. Documents etc are about 50GB.

We might want to keep Windows 10 installed too. Not sure how much that takes SSD space.

beachboy2 04-28-2016 04:06 AM

sarah1,

Use this link to find out what sizes are reported in W10:
http://www.howtogeek.com/225073/how-...es-free-space/

You would need to shrink the W10 drive to accommodate Linux Mint for a dual-boot arrangement like this:

http://www.dedoimedo.com/computers/d...-8-ubuntu.html

Before doing much else, I would backup your personal data on the old computer to an external hard drive.

If you wish to keep W10, I would also clone the W10 drive to another drive in case of any subsequent problems.

Alternatively you could download and install VirtualBox in W10 and then install Linux Mint:

http://cybrwrld.blogspot.co.uk/2012/...rtual-box.html

I am afraid that life can get complicated at times.

Dual-booting Windows and Linux is not particularly straightforward as evidenced by the many cries for help on these forums.

It would be much simpler to delete W10 and then do a fresh installation of Linux Mint. However, I do appreciate that you may wish to keep W10, at least for the time being.

sarah1 04-28-2016 04:36 AM

Quote:

Originally Posted by beachboy2 (Post 5537719)
sarah1,

Use this link to find out what sizes are reported in W10:
http://www.howtogeek.com/225073/how-...es-free-space/

You would need to shrink the W10 drive to accommodate Linux Mint for a dual-boot arrangement like this:

http://www.dedoimedo.com/computers/d...-8-ubuntu.html

Before doing much else, I would backup your personal data on the old computer to an external hard drive.

If you wish to keep W10, I would also clone the W10 drive to another drive in case of any subsequent problems.

Alternatively you could download and install VirtualBox in W10 and then install Linux Mint:

http://cybrwrld.blogspot.co.uk/2012/...rtual-box.html

I am afraid that life can get complicated at times.

Dual-booting Windows and Linux is not particularly straightforward as evidenced by the many cries for help on these forums.

It would be much simpler to delete W10 and then do a fresh installation of Linux Mint. However, I do appreciate that you may wish to keep W10, at least for the time being.

Thanks. It looks like it's easier to trash W10 first.


All times are GMT -5. The time now is 11:13 PM.