- To: Jam <jam@xxxxxxxxx>
- Subject: Re: [SLUG] clone non-LVM system onto new LVM drive
- From: peter@xxxxxxxxxxxxxxxxxx
- Date: Tue, 14 Jun 2011 13:32:35 +1000
- Cc: slug@xxxxxxxxxxx
- User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
>>>>> "Jam" == Jam <jam@xxxxxxxxx> writes:
Jam> On Tuesday, June 14, 2011 10:00:02 AM slug-request@xxxxxxxxxxx
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.
Peter C