Quote:
Originally Posted by sarah1
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:
or
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).
or
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.