Can LFS be copied from 1 hard drive to another after the build?
wwh20610 at cmsu2.cmsu.edu
Wed Jun 15 07:38:45 PDT 2005
On Wed, 15 Jun 2005 08:36:32 +0100, Andrew Benton wrote:
> 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
> cd /mnt
> tar xjf lfs.tar.bz2
Don't forget permissions -p --preserve-permissions, or --preserve to preserve permissions and preserve order, and ya really don't need those lost+found if ya using extended filesystems --exclude=lost+found ! Don't forget to preserve your permissions. Helps to do it all verbose, too.
More information about the lfs-support