LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Move Fedora 13 installation to another disk (https://www.linuxquestions.org/questions/fedora-35/move-fedora-13-installation-to-another-disk-823176/)

beumont 07-31-2010 04:08 AM

Move Fedora 13 installation to another disk
 
Hello,

I have a pc with a very slow hard drive. I wanna move the whole content of this drive to a new drive. Can anybody tell me how to achieve this?

zirias 07-31-2010 04:26 AM

1. format the new drive
2. mount it somewhere (e.g. /mnt/newroot)
3. cd /mnt/newroot
4. (cd /; tar -c --one-file-system --preserve-permissions - .) | tar -x --preserve-permissions -
[optionally add a -v switch to the second tar command if you want to see each copied file listed]
5. chroot in the new system:
Code:

mount --bind /dev dev
mount --bind /proc proc
mount --bind /sys sys
chroot .

Now you have two possibilities. Either you make sure the new drive will have the old drive's device node after reboot (by plugging the cables accordingly), then all you need to do is "grub-install /dev/sdb" (put correct device node here).

If you don't want to do this, you'll first have to change /etc/fstab and /boot/grub/menu.lst and maybe some other files if you use things like encryption or lvm to make your new system bootable.

Leave the chroot, umount dev, proc and sys and reboot.


All times are GMT -5. The time now is 12:13 AM.