[SOLVED] How To Gain Access For lfs User To Comply With 3rd Important Note in LFS Man., Sec. 5
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.
Hi - I've managed to install binutils and gcc but now I'm stuck at para. 5.6.1 - Installation of Linux API Headers - this is what is returned when I run the required commands:
Quote:
lfs@daisy:~$ make mrproper
make: *** No rule to make target `mrproper'. Stop.
lfs@daisy:~$ sudo make mrproper
[sudo] password for lfs:
make: *** No rule to make target `mrproper'. Stop.
lfs@daisy:~$ make headers_check
make: *** No rule to make target `headers_check'. Stop.
lfs@daisy:~$ sudo make headers_check
make: *** No rule to make target `headers_check'. Stop.
lfs@daisy:~$ make INSTALL_HDR_PATH=dest headers_install
make: *** No rule to make target `headers_install'. Stop.
lfs@daisy:~$ cp -rv dest/include/* /tools/include
cp: cannot stat `dest/include/*': No such file or directory
Is this what I should expect? Appreciate your help.
Hi - druuna, no I didn't go to the linux kernel source. I'll do that right now. Thank you.
Am I correct in deleting the un-tarred directories and build directories after they've been installed?
Kind regards,
Glen
Last edited by gdawg; 05-18-2011 at 11:12 AM.
Reason: Forgot to ask a question.
Yes delete the dirs You can rebuild them if you need to. Also later in book you have to rebuild them again so they will be fresh -build dirs to start on 2nd time.
Hi folks - I've managed to get to the "chroot" environment but I'm hung-up at section 6.5 of manual version 6.8 (Creating Directories). When I enter the commands I get the following results:
Code:
[root@daisy ~]# mkdir -v $LFS/{dev,proc,sys}
mkdir: cannot create directory `/dev': File exists
mkdir: cannot create directory `/proc': File exists
mkdir: cannot create directory `/sys': File exists
[root@daisy ~]# mknod -m 600 $LFS/dev/console c 5 1
mknod: `/dev/console': File exists
[root@daisy ~]# mknod -m 666 $LFS/dev/null c 1 3
mknod: `/dev/null': File exists
[root@daisy ~]# mount -v --bind /dev $LFS/dev
/dev on /dev type none (rw,bind)
[root@daisy ~]# mount -vt devpts devpts $LFS/dev/pts
devpts on /dev/pts type devpts (rw)
[root@daisy ~]# mount -vt tmpfs shm $LFS/dev/shm
shm on /dev/shm type tmpfs (rw)
[root@daisy ~]# mount -vt proc proc $LFS/proc
mount: proc already mounted
[root@daisy ~]# mount -vt sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
[root@daisy ~]# chroot "$LFS" /tools/bin/env -i \
> HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> /tools/bin/bash --login +h
chroot: cannot change root directory to : No such file or directory
[root@daisy ~]# mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
mkdir: created directory `/etc/opt'
[root@daisy ~]# mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
mkdir: created directory `/media/floppy'
mkdir: created directory `/media/cdrom'
mkdir: created directory `/srv'
[root@daisy ~]# install -dv -m 0750 /root
[root@daisy ~]# install -dv -m 1777 /tmp /var/tmp
[root@daisy ~]# mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
[root@daisy ~]# mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir: created directory `/usr/local/share/doc'
mkdir: created directory `/usr/local/share/locale'
[root@daisy ~]# mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir: cannot create directory `/usr/share/misc': File exists
mkdir: cannot create directory `/usr/share/terminfo': File exists
mkdir: cannot create directory `/usr/share/zoneinfo': File exists
mkdir: created directory `/usr/local/share/misc'
mkdir: created directory `/usr/local/share/terminfo'
mkdir: created directory `/usr/local/share/zoneinfo'
[root@daisy ~]# mkdir -pv /usr/{,local/}share/man/man{1..8}
[root@daisy ~]# for dir in /usr /usr/local; do
> ln -sv share/{man,doc,info} $dir
> done
`/usr/man' -> `share/man'
`/usr/doc' -> `share/doc'
`/usr/info' -> `share/info'
`/usr/local/man' -> `share/man'
ln: failed to create symbolic link `/usr/local/doc': File exists
`/usr/local/info' -> `share/info'
[root@daisy ~]# case $(uname -m) in
> x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
> esac
[root@daisy ~]# mkdir -v /var/{lock,log,mail,run,spool}
mkdir: cannot create directory `/var/lock': File exists
mkdir: cannot create directory `/var/log': File exists
mkdir: cannot create directory `/var/mail': File exists
mkdir: cannot create directory `/var/run': File exists
mkdir: cannot create directory `/var/spool': File exists
[root@daisy ~]# mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
mkdir: created directory `/var/lib/locate'
I'm confused about all of the "mkdir: cannot create directory ...:File exists" Is this to be expected?
Hi druuna - you are absolutely right. "echo $LFS" as root was blank. I went back to find how to set root up and did "export LFS=/mnt/lfs" as root and all is well. I'm sure I was told to check it but I forgot to and/or didn't remember how to reset it. Well, I'm certainly learning a lot. Thank you very much.
Ran into a bunch of failures while running "make -k check" at 6.16.GCC-4.5.2 of LFS manual. Everything was looking good until I ran this test. Here is a summary of the test:
Quote:
=== gcc Summary ===
# of expected passes 35662
# of unexpected failures 12978
# of expected failures 163
# of unresolved testcases 8270
# of unsupported tests 704
/sources/gcc-build/gcc/xgcc version 4.5.2 (GCC)
The downloaded files and patches are still in "sources". The test was run as
Quote:
root:/sources/gcc-build#
The manual states that some failures are expected but 12978 seems excessive. All help is appreciated. After the test I ran echo $LFS as root: and got nothing. I then re-ran "export LFS=/mnt/lfs". Was this correct?
Ran into a bunch of failures while running "make -k check" at 6.16.GCC-4.5.2 of LFS manual. Everything was looking good until I ran this test.
The manual states that some failures are expected but 12978 seems excessive.
Some errors are expected, but you are correct in saying that 12000+ are too many.
There's not enough information posted to point you to a specific problem so I can only give you some general pointers:
- Did you remove the gcc and gcc build directory before starting? You need to start with a clean building environment. If, for whatever reason, you use a previously used building environment things can go wrong. Suggestion: remove the gcc-4.5.2 and gcc-build directory and start with untarring gcc-4.5.2.tar.bz2 and then follow the instructions in chapter 6.16.
- If the errors are still present: Please post some of them so we can have a look and maybe find the reason(s).
- Are you sure the previous packages build correctly?
Quote:
After the test I ran echo $LFS as root: and got nothing. I then re-ran "export LFS=/mnt/lfs". Was this correct?
No it isn't. Once you enter the chrooted environment LFS isn't needed/used. The chroot command puts you in a jailed environment where /mnt/lfs/ becomes / (your "new" root directory).
Thanks for the replies spiky0011 and druuna. I'm totally lost now. Can't get back to where I was last night. I've been logging in as desktop user john, then "su - lfs" to get to "lfs" prompt. I went back to section 6.2 as "root @ daisy" and tried to repeat steps I took during last session but couldn't get past "I have no name" prompt. I can go to Dolphin, find "Root", open it locate "sources" and see the packages that I downloaded but can't seem to get there via console. When I "su -" and get prompt "root@daisy", "ls -l" doesn't show "Root" nor "sources". I don't know how to get back to where I was during previous session. Request guidance, please.
The following steps need to be done to enter chapter 6:
Code:
- become root user
- check if LFS is set: echo $LFS
- check if LFS is mounted: df -h | grep $LFS
- If the above 2 are ok then:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h
You are now set to continue were you left of last time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.