Can LFS be copied from 1 hard drive to another after the build?
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can LFS be copied from 1 hard drive to another after the build?
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?
Please also know that I understand that if it can be copied that the new /etc/fstab will have to be changed as well as /boot/grub/menu.lst, grub and recompiling the kernel (for scsi etc) all of which can be done from the host or the first LFS (using chroot) to be in the new environment. I just need to know what other considerations there are for this type of thing. My SCSI hard drive partition /dev/sda1 is larger than my /dev/hda4 so I am not concerned with running out of space. I am also not concerned with the time the computer may take in doing all of the copying. I just want to know if it can be done and what obstacles I may face.
Yes, I do this all the time, without problems, just make sure your copy method preserves file permissions and ownership and you should be in good shape.
Re: Can LFS be copied from 1 hard drive to another after the build?
Quote:
Originally posted by rblythe 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?
Please also know that I understand that if it can be copied that the new /etc/fstab will have to be changed as well as /boot/grub/menu.lst, grub and recompiling the kernel (for scsi etc) all of which can be done from the host or the first LFS (using chroot) to be in the new environment. I just need to know what other considerations there are for this type of thing. My SCSI hard drive partition /dev/sda1 is larger than my /dev/hda4 so I am not concerned with running out of space. I am also not concerned with the time the computer may take in doing all of the copying. I just want to know if it can be done and what obstacles I may face.
Thanks.
If I was you, I would try:
Code:
=> Boot host distro (assume sda1 has been formated)
# mount /dev/sda1 /mnt/sda1
# mount /dev/hda4 /mnt/lfs
# cd /mnt/lfs
# tar -c . | tar -xv -C /mnt/sda1
=> waiting for done :)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.