Can LFS be copied from 1 hard drive to another after the build?

Andrew Benton b3nt at
Wed Jun 15 00:36:32 PDT 2005

rblythe wrote:
> I have completed the LFS 6.0 book.  System boots like a champ.  I have started 
> putting together things from BLFS.  Still working smoothly.  Before I go too 
> much farther, I would like to know:
> Can my current LFS be copied to another hard drive for future build 
> considerations.  I am only talking about the base LFS (no other packages 
> installed).  Currently, my LFS is on /dev/hda4.  I would like to copy it 
> to /dev/sda1 because I have a SCSI drive sitting there doing nothing.  My 
> host disto is on /dev/hda1 with /home on /dev/hda3.  The swap partition for 
> LFS and host is /dev/hda2.
> What I am hoping to do is copy (not move) the root LFS to /dev/sda1, 
> use /dev/sda2 for swap and /dev/sda3 for /home.  I know I should have set my 
> drive up with /dev/hda4, /dev/hda5, /dev/hda6 but I didn't realize the value 
> of that when I started LFS.
> Anyway, can it be copied?

I find tar to be quite effective

cd /mnt
tar cjf lfs.tar.bz2 lfs

then unmount the partition that has lfs on it, edit /etc/fstab to mount the blank partition in it's place and then untar lfs onto the new blank partition

cd /mnt
tar xjf lfs.tar.bz2

More information about the lfs-support mailing list