LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 09-14-2020, 04:33 PM   #16
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled

./tools/x86_64-lfs-linux-gnu/lib/ldscripts/elf_x86_64.xdc
./boot/
tar: Exiting with failure status due to previous errors
michael@archlinux LFS$


./tools/x86_64-lfs-linux-gnu/lib/ldscripts/elf_x86_64.xdc
./boot/
tar: Exiting with failure status due to previous errors
michael@mxlinux:~/chroot-lfs/mnt/lfs$
 
Old 09-14-2020, 04:38 PM   #17
hendrickxm
Member
 
Registered: Feb 2014
Posts: 278

Rep: Reputation: Disabled
I can't think of anything else but lack of disk space. How much space do you have left on your / and/or /home partition?
Code:
df -h
With most modern file managers you can extract a file without using the terminal as well but the tar command itself being corrupt seems unlikely.
 
Old 09-14-2020, 04:42 PM   #18
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
check this out:

michael@archlinux LFS$ tar -xf lfs-tools-10.0-systemd.tar.xz
tar: ./dev/null: Cannot mknod: Operation not permitted
tar: ./dev/console: Cannot mknod: Operation not permitted
tar: Exiting with failure status due to previous errors
michael@archlinux LFS$
 
Old 09-14-2020, 04:44 PM   #19
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
michael@mxlinux:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 788M 2.7M 786M 1% /run
/dev/mapper/rootfs 914G 116G 752G 14% /
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.6G 190M 1.4G 12% /dev/shm
/dev/sda2 488M 159M 294M 36% /boot
/dev/sda1 253M 258K 252M 1% /boot/efi
cgroup 12K 0 12K 0% /sys/fs/cgroup
tmpfs 788M 4.0K 788M 1% /run/user/118
tmpfs 788M 16K 788M 1% /run/user/1000
michael@mxlinux:~$

space isnt the issue.
 
Old 09-14-2020, 06:33 PM   #20
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
So I got it to work on my arch linux laptop. Not sure why not on my MX linux.
 
Old 09-14-2020, 07:30 PM   #21
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
On my host I was able to chroot in. In chapter 7.6 I get this output:

(lfs chroot) root:~#
(lfs chroot) root:~# ln -sv /proc/self/mounts /etc/mtab
ln: failed to create symbolic link '/etc/mtab': File exists
(lfs chroot) root:~#
(lfs chroot) root:~#
(lfs chroot) root:~#
(lfs chroot) root:~# cd /etc
(lfs chroot) root:/etc# ls
bash_completion.d group hosts mtab opt passwd porgrc rpc sysconfig
(lfs chroot) root:/etc# cat mtab
cat: mtab: No such file or directory
(lfs chroot) root:/etc#
 
Old 09-14-2020, 07:39 PM   #22
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
Sorry that wasn't the issue. I was able to resolve that. I can't create the user test:

(lfs chroot) root:~#
(lfs chroot) root:~# echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd
ls: cannot access 'not': No such file or directory
ls: cannot access 'a': No such file or directory
ls: cannot access 'tty': No such file or directory
(lfs chroot) root:~# echo "tester:x:101:" >> /etc/group
(lfs chroot) root:~# install -o tester -d /home/tester
install: invalid user 'tester'
(lfs chroot) root:~#
 
Old 09-15-2020, 02:05 AM   #23
hendrickxm
Member
 
Registered: Feb 2014
Posts: 278

Rep: Reputation: Disabled
Everything from http://www.linuxfromscratch.org/lfs/...atingdirs.html and further needs to be done again, as the backup does not contain the packages you have build in your previous attempt after backupping.
The user tester still needs to be added, inside the chroot as in http://www.linuxfromscratch.org/lfs/...eatefiles.html
I added this user right before final GCC. My temp-tools have porg as a package logger. Instead of
Code:
make && make install
you can use
Code:
make && porg -lp packagename-version "make install"
and this way the files that belong to a package can be listed.
It's nothing like dpkg, pacman or even pkgtools.
 
Old 09-15-2020, 04:25 AM   #24
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 4,640
Blog Entries: 12

Rep: Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635
Quote:
Originally Posted by cast37 View Post
(lfs chroot) root:~# echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd
ls: cannot access 'not': No such file or directory
ls: cannot access 'a': No such file or directory
ls: cannot access 'tty': No such file or directory
That means that the command ls -n $(tty) has returned "not a tty" rather than the directory entry for the console you are using. In other words there's something wrong with your /dev directory in chroot. Probably you omitted to bind it to your host's /dev directory. There was no point in continuing with the following commands before sorting out this error.
 
Old 09-15-2020, 07:20 AM   #25
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
Is this normal from http://www.linuxfromscratch.org/lfs/...er08/gcc.html:

lfs chroot) root:/sources/gcc-10.2.0/build# chown -Rv tester .
chown: invalid user: 'tester'
(lfs chroot) root:/sources/gcc-10.2.0/build# su tester -c "PATH=$PATH make -k check"
No passwd entry for user 'tester'
(lfs chroot) root:/sources/gcc-10.2.0/build#

the tester user does exist:

(lfs chroot) root:/sources/gcc-10.2.0/build# tail -n 2 /etc/passwd
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
tester:x::101::/home/tester:/bin/bash
(lfs chroot) root:/sources/gcc-10.2.0/build#


Do I setup a passwd for the tester user? It did not specify that in the book.
 
Old 09-15-2020, 08:28 AM   #26
hendrickxm
Member
 
Registered: Feb 2014
Posts: 278

Rep: Reputation: Disabled
I did not set a password for the user tester. The user will be deleted at the end of chapter 8. Usually I don't do the make check/test but since others were having issues, I tried to verify those this time.
You can always set a password, like you do for user lfs.
 
Old 09-15-2020, 10:09 AM   #27
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
I deleted the user "tester" and added it again and it worked. On http://www.linuxfromscratch.org/lfs/...ter08/gcc.html when it is time to "make install", I get a fatal error:

In file included from ../../libcc1/findcomp.cc:21:
/usr/include/c++/10.2.0/string:38:10: fatal error: bits/c++config.h: No such file or directory
38 | #include <bits/c++config.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:599: findcomp.lo] Error 1
make[2]: Leaving directory '/sources/gcc-10.2.0/build/libcc1'
make[1]: *** [Makefile:10418: install-libcc1] Error 2
make[1]: Leaving directory '/sources/gcc-10.2.0/build'
make: *** [Makefile:2401: install] Error 2
 
Old 09-15-2020, 12:06 PM   #28
hendrickxm
Member
 
Registered: Feb 2014
Posts: 278

Rep: Reputation: Disabled
You are getting error after error. I would have given up already myself. Some advice: familiarize with one distro, use it as your main OS for a few months, understand the ins and outs of the package management, try to build some packages from source. Experiment with a source based distro and try LFS gain after that. You will learn a lot more this way. Going from error to error isn't going to be productive.
Both NuTyx and aryalinux are LFS-based distros that are worth trying out.
 
Old 09-15-2020, 12:29 PM   #29
cast37
LQ Newbie
 
Registered: Sep 2020
Posts: 17

Original Poster
Rep: Reputation: Disabled
Your right. I will try your suggestion. Thanks for all you help brother!
 
Old 09-15-2020, 01:18 PM   #30
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 4,640
Blog Entries: 12

Rep: Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635Reputation: 2635
When you get into this sort of a bind with LFS, there is only one answer: clear your partition and start again. It is not productive to bumble around like this; you are just getting frustrated and it stops being fun.

Some considerations for your second try:

1) Pay special attention to the preparatory steps in Chapter 4. New LFS users often find this chapter boring. They are eager to move on to the actual build. But if you make a mistake here, it can stymie the whole thing.

2) Whenever you get an error message, do not simply go on to the next command. You have a tendency to do that, judging by some of the code you have posted. 4 times out of 5, the next command won't work either! Instead, find out what caused the error and repeat that step correctly. Then go on to the next command.

3) If you are working over several sessions (and most people do), put the instructions for mounting partitions and then going into chroot into an executable script in /root on your host system. Then you can run that script as the root user at the start of each chrooted session. It will ensure that all the necessary dynamic partitions are mounted (which is not always the case when you mount them by hand). If your script makes use of $LFS, make sure that the LFS variable is defined for your root user.

4) With a complex command, like that one for creating a "tester" entry in /etc/passwd, it is worth experimenting in another terminal on bits of that command (but don't do it as root!). For example, see what 'ls -l $(tty)' actually does. Then add the '|cut -d" " -f3' instruction and see what that does. Especially you need to do this if the operation gives you an error. Otherwise you have no way of knowing whereabouts in the string the error occurred.

When I did my first LFS build, I had a spare terminal open and checked in this way every instruction that I couldn't immediately understand.

Good luck!

Last edited by hazel; 09-15-2020 at 01:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2) erkant Linux From Scratch 4 11-26-2012 01:26 PM
nvidia display drivers installation error with binutils, binutils allready installed mandrakeBren Linux - Newbie 9 01-06-2009 12:52 PM
LFS 6.3 - binutils 2.17 installation seb_01630 Linux From Scratch 5 07-31-2008 06:52 AM
binutils-2.16.1 or binutils-2.17 Hern_28 Linux From Scratch 2 07-15-2007 09:05 AM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration