Re: How to copy a Fedora-4 system? Again!



Timothy Murphy wrote:
So my query is: how exactly should one copy a Fedora-4 system
to another partition?


I asked this question a couple of days ago,
and received quite a lot of responses.

However, I tried out all the suggestions,
and none of them worked,
which leads me to think that none of the "advisors"
had actually tested their advice.

I should say that dd is not appropriate
since the source is not all in one partition,
as perhaps I should have made clear;
/usr , /usr/share and /usr/local are all in separate partitions,
although I planned to have one large / partition for the new system
(using an old Windows partition for this purpose).

The problem, as I see it, is: which directories should one exclude?
In particular, if I copied /dev then the system booted,
but there were a number of errors reported during the boot,
and a number of services did not start.
If I didn't copy /dev the re-boot seemed to hang when init starts.

If you boot your system in rescue mode, there's no need
to exclude neither /dev nor /proc

I would do like this:

Boot in rescue mode, don't mount the partitions automatically.

When you get a command prompt, do like this:

cd /mnt
mkdir old new

Mount your old partitions under old:

mount /dev/hda1 old
mount /dev/hda2 old/usr
mount /dev/hda3 old/usr/share
mount /dev/hda4 old/usr/local
mount /dev/hda5 old/boot
etc.

Of course you'll have to replace hda[1-5] with the right
names.

Create the new file system on the empty partition:

mke2fs -j -L/ -O dir_index,sparse_super /dev/yournewpartition

mount it:

dev /dev/yournewpartition /mnt/new

cd /mnt/old
tar cf - .|(cd /mnt/new; tar xpf -)

Wait...

cd /mnt/new/etc

edit fstab so that the right partitions are mounted.
Note, sometimes partitions are referenced using the
label (the -L/ i mke2fs gives the label "/" to the
new partition).

Do you have a separate boot partition?
What about swap?

Are you planning to remove the disk with the old partitions
and just boot with the new?

Then you'll have to shutdown, remove the old disk,
boot in rescue mode again, mount the new partition

mkdir /mnt/new
mount /dev/yournewpartion /mnt/new
chroot /mnt/new

Doublecheck /etc/fstab
cd /boot/grub
Check grub.conf

Make sure that "root=" matches your new root partition,
either by name or by label.

Install the boot loader on the new disk:

grub-install /dev/hda

(or whatever name your disk has).

This step might fail if /proc is not mounted,
and /dev/hda does not exist.

The command ps -ef will tell you how to mount /proc

The hda* files does not exist in the /dev folder,
and you'll need to create them:

cd /dev
mknod hda b 3 0
mknod hda1 b 3 1
mknod hda2 b 3 2
etc. as needed

When grub-install has succeded, umount /proc and
remove the hda files in /dev

ctrl-D twice to make the system reboot.

This has worked for me many times. However,
it is not quite clear for me how your partitions
are now, and how it will look like in your final
system.

Mogens

--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@xxxxxx Homepage: http://www.crc.dk

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • SUMMARY: Moving /usr From Under Root "/" To Its Own Partition
    ... One of the reasons for doing this is to end up with a smaller root ... Install the boot block and boot off the new drive. ... " In order for the root partition to be fscked and remounted ... D> temporarily on the existing disk. ...
    (SunManagers)
  • Re: laptop - new HD - no CD or floppy drive
    ... I put the laptop HD back in the PC and I could boot from it. ... If the primary partition has an incorrect boot sector. ... If the disk geometry is incorrect. ...
    (microsoft.public.windowsxp.hardware)
  • Re: laptop - new HD - no CD or floppy drive
    ... I put the laptop HD back in the PC and I could boot from it. ... If the primary partition has an incorrect boot sector. ... If the disk geometry is incorrect. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Can I boot of an XP System disk, nested in a logical volume
    ... I'll boot of Partition Magic or some other kind of magic and fix it that-a-way. ... It's been a long time since I messed with partitions like this, but in the back of my head I have this fragment about boring registry hands-on editing, 'derived Disk ID's' and the 'Master Boot Sector' -- that's S as in 'Senile'. ... One reason for the drive letter change on cloned drives is to keep the parent drive hooked up the first time the clone is booted, being that the clone has the same Mount Manager database, and being that the Mount Manager *always* respects drive letter assignments, it will see the parent drive and its valid disk signature and assign the C: drive letter to the original C: drive, so there will be no C: letter available for the clone. ...
    (microsoft.public.windowsxp.basics)
  • Re: Three Linux Operating Systems in One Computer (Is it possible?)
    ... Hard Disk 1 19.42GiB IDE ... The GRUB boot loader is installed on the first hard disk. ... I am planning to combine /dev/hda6 with /devhda1 using the Gnome Partition ...
    (Ubuntu)