Re: Strange authorisation isuses:
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
On 6/16/22 08:33, Dragan ([email protected] via alfs-discuss Mailing List) wrote: > On 16/06/2022 15:33, Pierre Labastie ([email protected] via alfs-discuss > Mailing List) wrote: >> On Thu, 2022-06-16 at 14:17 +0200, Dragan wrote: > I have just finished building jhalfs. I'm using the following to clean up lfs system > as lfs user: > > sudo rm -rv > $LFS/{bin,boot,dev,media,mnt,jhalfs,opt,proc,root,run,sbin,srv,sys,tmp,usr,etc,var,tools,build,home,lib,lib64,log} > $LFS/usr/{bin,lib,sbin} > > Sources in lfs are deliberately not removed. The build yesterday was with sources in > /lfs and today without them. I remember that yesterday script stated that linux > tarball was not found /sources nor /sources/sources and have downloaded them (updated > files from latest release). Attached are some scripts I use that you may find helpful. There are some extra directories there, so customize for your situation. > I have brought VM down after finishing previous build and booted in build system. > After that I have pulled jhalfs and started build. > > Below can you se difference in kernel build time!!!! > > Besides that I have noticed strong deviations in SBU build time with SBU at max 21s > with -j16 and 1min 15sec based on binutils standard and 73 sec as reported by jhalfs. > > > ------------------------------------------------------ > -------------------------------------------------------------------------------- > Building target 1002-kernel > [+++++++++++++++++++++++++++++++++\ ] 1 min. 33 sec > Target 1002-kernel OK Personally, I always turn on 'DO NOT use/display progress_bar'. I don't find that useful. I also do not use jhalfs to build the kernel. I prefer to do that manually as I usually customize the configuration each time. I'll not that building in virtualbox will probably be a bit faster since there is not real disk access, but a long time ago I did a full build on a ram disk and compared to a spinning disk and found a speedup of about 15%. > -------------------------------------------------------------------------------- > -------------------------------------------------------------------------------- > Building target create-sbu_du-report > /lfs/jhalfs/logs /lfs/jhalfs > Using binutils-pass1-2.38 to obtain the SBU unit value. > /lfs/jhalfs > The SBU unit value is equal to 73 seconds at -j16. Did you select 'Build Binutls pass1 without optimization (Real SBU)' If not, that will throw off your values from the book by quite a bit. -- Bruce -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page
clean-mnt-lfs.sh
(application/x-shellscript, 483 B)
#!/bin/bash
function rmrf
{
if test -d $LFS/$1 ; then
$SUDO rm -rf $LFS/$1
fi
}
if [ $EUID -ne 0 ]; then
SUDO=sudo
else
SUDO=""
fi
if [ x$LFS == x ]; then
echo "LFS not set"
exit 1
fi
sh umount-virt.sh || exit
rmrf bin
rmrf dev
rmrf home
rmrf lib
rmrf mnt
rmrf proc
rmrf run
rmrf sys
rmrf tools
rmrf var
rmrf boot
rmrf etc
rmrf jhalfs
$SUDO rm -rf $LFS/lib64
rmrf media
rmrf opt
rmrf root
rmrf sbin
rmrf srv
rmrf tmp
rmrf usr
mount-virt.sh
(application/x-shellscript, 712 B)
#!/bin/bash
function mountbind
{
if ! mountpoint $LFS/$1 >/dev/null; then
$SUDO mount --bind /$1 $LFS/$1
echo $LFS/$1 mounted
else
echo $LFS/$1 already mounted
fi
}
function mounttype
{
if ! mountpoint $LFS/$1 >/dev/null; then
$SUDO mount -t $2 $3 $4 $5 $LFS/$1
echo $LFS/$1 mounted
else
echo $LFS/$1 already mounted
fi
}
if [ $EUID -ne 0 ]; then
SUDO=sudo
else
SUDO=""
fi
if [ x$LFS == x ]; then
echo "LFS not set"
exit 1
fi
mountbind dev
mounttype dev/pts devpts devpts -o gid=5,mode=620
mounttype proc proc proc
mounttype sys sysfs sysfs
mounttype run tmpfs run
mkdir $LFS/run/shm
mountbind usr/src
mountbind boot
mountbind home
umount-virt.sh
(application/x-shellscript, 400 B)
#!/bin/bash
function unmount
{
if mountpoint $LFS/$1 >/dev/null; then
$SUDO umount $LFS/$1
echo $LFS/$1 unmounted
else
echo $LFS/$1 was not mounted
fi
}
if [ $EUID -ne 0 ]; then
SUDO=sudo
else
SUDO=""
fi
if [ x$LFS == x ]; then
echo "LFS not set"
exit 1
fi
unmount run
unmount sys
unmount proc
unmount dev/pts
unmount dev
unmount usr/src
unmount boot
unmount home