[Re: Building without chroot'ing]

Richard Lightman richard at nezumi.plus.com
Wed Jan 1 15:02:16 PST 2003


* Eric Miller <emiller at techskills.com> [2003-01-01 21:48]:
> >The simplest solution would be to mount --bind your cd onto your hard
> >disc, create a symlink forest on your hard disk that points to the
> >--bind, then chroot to your hard disk. Take care that the symlinks
> >do not include the mount point of the hard disc.
> 
> Thanks, Richard.  While this suggestion makes perfect sense, is it really
> necessary?
> 
>        --bind Remount a subtree somewhere  else  (so  that  its  contents  are
> available in both places). See above.
> 
> I am logged in as root to the CD environment, and I have my target (where I
> want a new LFS) partition mounted on /mnt/foo, so its contents is *already*
> available in both places.  This seems to me to be very similar to the
> situation created after chrooting at the beginning of ch6.  the only caveat is
> that the install commands (and others) need to be slightly modified to
> indicate /mnt/foo instead of /, because otherwise the commands as written will
> try to install to directories on the CD, which will def not be good.
> 
The tradition method of doing that is to add DESTDIR=$LFS to
'make install'. This does not work for all packages:

binutils flex hcc gzip groff m4 procinfo zlib: prefix=$LFS/usr
glibc: install_root=$LFS
kernel: install=INSTALL_MOD_PATH=$LFS
less: prefix=$LFS/usr bindir=$LFS/usr/bin
lilo sysvinit: ROOT=$LFS
net-tools: BASEDIR=$LFS
netkit-base: Do by hand
perl: Very tricky. Ask if you are interested.
shadow: Not as bad as perl.
sysklogd: BINDIR=$LFS/usr/sbin MANDIR=$LFS/usr/share/man


I install everything via DESTDIR, and it has taken a lot of time to
find out how. As you were looking at cutting the install time by
missing a few things out, I thought you would prefer to avoid the
hassle.

> Am I crazy here?  Most of the responses seem to indicate that I am either not
> asking the question correctly, or that there is a missing concept that I
> completly don't grasp.
> 
It sounded like a sensible question.

If you have been reading threads on glibc, you will realize that some
people will go to extra ordinary lengths to prevent faults in the host
system infecting LFS. If there are some unknown problems in LFS, you
may be propgating them to your new install. I think that explains some
of the posts.

BTW: Compiling all static:  1 hour
     Compiling everything: 50 hours (most of BLFS and some extras).

That is only a 2% performance gain, so its not worth the effort for me.


Richard
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list