moving fedora to a new system

John Summerfied debian at herakles.homelinux.org
Sat Feb 25 13:38:47 UTC 2006


Jaime Davila wrote:
> Hello all,
> 
> I've been using fedora for a while in my personal laptop. I am about to 
> get a new laptop, and would like to end up with a system as close to the 
> one I have as possible in terms of the packages that are installed in 
> it. Everything I have installed so far I have installed via yum. Is 
> there a way of making yum output what it knows is installed (in my 
> current system), and then feed that to yum in my new system?

I generally do a disk to disk copy using dd for such. Knoppix is 
probably best, but fedora rescue disks will probably work.

Network the two machines, boot both from CD and create a partition at 
least as large as your old one, then _carefully_

dd if=/dev/hda2 | ssh otherbox dd of=/dev/hda2

Change hda2 as appropriate for each box.

Once the copy's done you will need to run e2fsck (assuming ext2 or 3), 
and you will need to run resize2fs of otherbox has a larger partition.

resize2fs may give you additional instructions.

Alternative, safer, ways of copying include making your filesystem on 
otherbox and then using tar (or similar tool) in a similar manner to dd 
above:
tar clC /mnt/hda2 | ssh otherbox tar xpC /mnt/hda2
or scp
scp -pr /mnt/hda2 otherbox:/mnt/hda2

or rsync
rsync --times --perms --recursive (and probably more options) \
   /mnt/hda2 otherbox:/mnt/hda2

Note tar and rsync can omit files and directories, and you may wish to 
do this - do you want /tmp's contents?
You could also export one of the filesystems to the other using nfs.

Each requires manually configuring grub on otherbox which you can do:
chroot /mnt/hda2
vim /boot/grub/menu.lst
install-grub '(hd0)'


For your own sake, read the relevant documentations: I'm likely to have 
forgotten something you need to know.

Did I mention backup? Okay, you know that.


Even if you choose a fresh install, some of these can be used to copy 
the contents of /home (and other valuables) to otherbox.





-- 

Cheers
John

-- spambait
1aaaaaaa at computerdatasafe.com.au  Z1aaaaaaa at computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/

do not reply off-list




More information about the fedora-list mailing list