On 03/11/09 15:45, Leo wrote:
> Keith Edmunds wrote:
>> On Thu, 29 Oct 2009 20:56:58 +0000, li...@fractal.me.uk said:
>>
>>> If I were to create four partitions on the new disk (not
>>> necessarily the same sizes as the old ones), copy the data
>>> across from the old disks, and tell the BIOS to boot from the new
>>> /boot partition, would Ubuntu be happy?
>>
>> You'd need to write the boot sector too, probably using Grub, but
>> otherwise yes, it should be happy.
>>
>
> Well I believe I've sorted grub. However I now realise that in order
> to copy / I need something to cope with links (I need them kept the
> same), and mounts (specifically: /home/ and /boot/ are different
> disks so I don't want them copied, but I don't know if e.g. /dev/
> must copied?)

/dev on a modern Linux system is usually managed by udev and should not
need copying. To check this:
# grep /dev /etc/fstab

> Google suggests a few different ways of doing it (copy, rsync,...)
> and I was wondering which is best?
>
> Leo

For the others I would probably use rsync as it will preserve hard and
soft links as well as permissions if needed (mind you, cp -a should do
this as well)
rsync has about a million commandline options, however, leading to
commands like this:

rsync -avxPHAX /source/mount/ /dst/mount/

Which should preserve hard and soft links, permissions, acls, xattrs,
ownership etc and not cross filesystem boundaries and show you how far
it's got.
The trailing / on the paths is very important. rsync copies everything
after the last / in each path.


but, by 'keep them the same', did you mean that you're going to reuse 
the existing /home and /boot/ ?

Or just that you want to ensure they're separate FSs again?
in that case just mount the new disks under /dst/mount/home and 
/dst/mount/boot and rsync the entire / into /dst/mount


Regards,

Stuart
-- 
Stuart Sears RHCA etc.
"It's today!" said Piglet.
"My favourite day," said Pooh.

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

Reply via email to