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

Bruce Dubbs bruce.dubbs at gmail.com
Sun Dec 22 10:55:15 PST 2013

Dan McGhee wrote:
> I should have thought of this when I had a minimal, bootable LFS. But I
> didn't.  I'm asking for comments so that the probability of getting
> another bootable LFS-7.4 system is high.  Here are the steps in my plan:
> 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>

Why not just 'cp -a /  <mount point>'

You will want to clean the virtual file systems in any case.  You could 
also do:  'tar -c --one-file-system - | tar -x -C <mount point>' which 
will avoid the virtual file system problem (but the virtual file systems 
mount points need to be created).

If you boot to a 3rd system and do not have the virtual file systems 
mounted, you can just do:

$ sudo cp -a /mnt/lfs  mnt/lfs2

> 3.  Enter chroot environment as in LFS book
> 4.  Reconfigure kernel
> 5.  Boot new system

You may also want to change a couple of configuration files: hostname, 
fstab, ifconfig.eth0, etc.

> I need to reconfigure the kernel since I use the efi-stubs and put the
> kernel image on the EFI partition.

Another reason EFI sucks.  Not needed on non-EFI systems.

> And, although I don't know this for
> a fact, it seems logical to me that the kernel must be reconfigured to
> account for moving to a new partition.

Why?  It only needs to be told the root partition.

   -- Bruce

More information about the blfs-support mailing list