[blfs-support] Complete Backup of {,B}LFS

Aleksandar Kuktin akuktin at gmail.com
Sun Dec 22 13:25:41 PST 2013


>On Sun, 22 Dec 2013 12:06:23 -0600
>Dan McGhee <beesnees at grm.net> wrote:

> 1.  Set up and mount a new partition for this system--done
> 2.  As root in / run: $ find . -xdev -depth -print0 | cpio --null -pd 
> <mount point>
> 3.  Enter chroot environment as in LFS book
> 4.  Reconfigure kernel
> 5.  Boot new system

Assuming find does not choke on something or makes cpio choke on
something, I think this is a good plan. But there is a better one: make
a new mount point and mount your / there. If you want to, mount
additional filesystems under it, if you need to do that. Then, run find
over the newly mounted filesystem(s) and cpio from the mount point.

$ mkdir /mnt/stuff
$ mount /dev/of/root /mnt/stuff
$ mount /dev/of/usr /mnt/stuff/usr
$ cd /mnt/stuff
$ find . -print0 > /tmp/list
$ cpio -p -0md --sparse /mnt/destination < /tmp/list

That should collect everything and give you the result which is as
close as you can get without cloning the underlying device/filesystem.

-- 
You don't need an AI for a robot uprising.
Humans will do just fine.



More information about the blfs-support mailing list