pe...@chubb.wattle.id.au wrote:
"Jam" == Jam  <j...@tigger.ws> writes:

Jam> On Tuesday, June 14, 2011 10:00:02 AM slug-requ...@slug.org.au
Jam> wrote:
Scenario:

* Ubuntu presently installed without LVM.  * New hard drive
formatted with: /boot ext3 partition (empty so far) LVM group
containing ext3 LV

I want to copy the original root partition onto the new LV so that
the new hard drive and LV is a bootable clone, and the old physical
drive can be removed/saved.

Jam> in general avoid dd. It mirrors what you have to what you want
Jam> and probably they dont fit.  If you are cloning disks then yes
Jam> dd. (same hw, same format)

Jam> I would: boot from a live cd mount (you may even have
Jam> /media/oldroot) mount (likewise new-lvm-root) from old-root: find
Jam> . |cpio -pdv newroot

+1 on find, but the comand line should be

   find . -depth -print0 | cpio -pvmd0 newroot

otherwise files with spaces in the name can get trashed, and the
permissions on directories may end up wrong.


Thanks for the cpio hint.

Next, how do I persuade the new partition to boot? Do I have to do some magic with grub? If so, what? Do I cpio the old /boot onto the new, non-LVM boot partition? or can I use /boot within the new LV?

Everything I read says to put /boot into a non-lvm partition. Does grub-install from a live CD give me the opportunity to spell out the right parameters?

I don't want to simply experiment in case I do bad things.
I have no experience with LVM until now.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to