On Fri, Nov 18, 2016 at 10:20:13PM +0300, Константин wrote: > On Fri, Nov 18, 2016 at 04:30:28PM +0100, Raffaele BELARDI wrote: > > I want to move the main disk contents (hda, PATA) to another, larger > > disk (sda, SATA). > > > > hda contains 4 ext3 partitions (root, home, data, swap). > > I created 4 ext3 partitions on sda and copied the data over from the > > corresponding hda partitions using 'cp -ax'. > > Didn't you do this from working system on hda? In this case there > really could be troubles with special files etc. Imho live-cd better > for this purpose. > > At any case imho it's better to split this task > > 0. Boot from live-cd.
If I can’t be bothered with live CDs, I bind-mount the root partition. I use that frequently to do root-backups. That way you can get the files within /dev which are required even before /dev is populated (null and zero, IIRC). This will, of course, not prevent files from being changed during the rsync run, because the system is still live and kicking. So I usually run it several times to see what has changed in the meantime. mkdir /mnt/bindroot mount --bind / /mnt/bindroot rsync -ahXAHi --delete /mnt/bindroot/ /path/to/new/partition/ Since this is a bindmount, no need for -x. Use -A and -X if you use acls and xattrs, respectively. But you definitely want -H. For example git installs all its commands as hardlinks to a single binary. -- Gruß | Greetings | Qapla’ Please do not share anything from, with or about me with any social network. Idealism grows with the distance to the problem.
signature.asc
Description: Digital signature