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.
I am completely new to LFS. I have got as far as setting up the LFS partitions, creating the user and creating the two directories "source" and "tools", and filled "source" with all the required software. I could see both directories when logged in as user lfs. Everything was ready to go (I thought) to start building the software. Up to this point I had had terminal open all the time. I then logged out and when I logged back in to try and build the first software package lo and behold user lfs can no longer see "source " or "tools". In Dolphin (logged in as root) these directories are visible.
I am guessing this is a permissions problem, but when I look at the directory permissions in Dolphin it says that the user of these is lfs, but the group is root.
I am completely new to LFS. I have got as far as setting up the LFS partitions, creating the user and creating the two directories "source" and "tools", and filled "source" with all the required software. I could see both directories when logged in as user lfs. Everything was ready to go (I thought) to start building the software. Up to this point I had had terminal open all the time. I then logged out and when I logged back in to try and build the first software package lo and behold user lfs can no longer see "source " or "tools". In Dolphin (logged in as root) these directories are visible.
I am guessing this is a permissions problem, but when I look at the directory permissions in Dolphin it says that the user of these is lfs, but the group is root.
Help would be much appreciated.
jackplughd
What do you mean by "see"? What do you get from the command
As i was unable to solve my problems with building the LFS toolchain, I have started again from the begining (reformatted the LFS partition etc).
I am now at the point of wishing to start the toolchain build. I have 2 questions:
Where should I create the dedicated build folder for binutils?
Who should i be logged in as to build the folder?
When i try to create the above as user lfs i am told "permission denied". If i prefix "sudo" to the command i am told "user lfs is not in the sudoers file. This problem will be reported."
I am trying to build LFS 6.5 using Kubuntu 8.04 (Hardy). My machine in a Toshiba Satellite A30, 2.4Ghz with 764MB RAM.
As i was unable to solve my problems with building the LFS toolchain, I have started again from the begining (reformatted the LFS partition etc).
I am now at the point of wishing to start the toolchain build. I have 2 questions:
Where should I create the dedicated build folder for binutils?
Exactly where the book tells you. See sec. 5.4. Specifically, from the binutils directory that you untarred and cd'ed into, enter the following commands:
Code:
mkdir -v ../binutils-build
cd ../binutils-build
Quote:
Originally Posted by jackplughd
Who should i be logged in as to build the folder?
As user lfs. Make sure you have set up the environment as required under sec. 4.4.
Quote:
Originally Posted by jackplughd
When i try to create the above as user lfs i am told "permission denied". If i prefix "sudo" to the command i am told "user lfs is not in the sudoers file. This problem will be reported."
Did you follow all the instructions in sec. 4.3? In particular, did you enter:
Code:
chown -v lfs $LFS/tools
chown -v lfs $LFS/sources
To check, you can enter:
Code:
ls -lh $LFS/tools $LFS/sources
If lfs is not listed as the owner of all the files in those two directories, than it would appear you didn't enter the two chown commands correctly.
Note that all of the commands in sec. 4.3 must be entered as root. To become root in Kubuntu, you can (as yourself, not as user lfs) enter:
When I enter the command you suggest, I get the result below:
jack@phoenix:~$ ls -lh $LFS/tools $LFS/sources
/mnt/lfs/sources:
total 259M
-r--r--r-- 1 jack jack 1.3M Mar 1 20:40 autoconf-2.64.tar.bz2
-r--r--r-- 1 jack jack 1.1M Mar 1 20:40 automake-1.11.tar.bz2
-rw-r--r-- 1 jack jack 40K Mar 2 18:10 bash-4.0-fixes-3.patch
-r--r--r-- 1 jack jack 6.0M Mar 1 20:41 bash-4.0.tar.gz
-r--r--r-- 1 jack jack 16M Mar 1 20:41 binutils-2.19.1.tar.bz2
-r--r--r-- 1 jack jack 1.4M Mar 1 20:42 bison-2.4.1.tar.bz2
-r--r--r-- 1 jack jack 822K Mar 1 20:42 bzip2-1.0.5.tar.gz
-rw-r--r-- 1 jack jack 102K Mar 2 18:16 coreutils-7.4-i18n-1.patch
-rw-r--r-- 1 jack jack 4.5K Mar 2 18:17 coreutils-7.4-uname-1.patch
-r--r--r-- 1 jack jack 9.3M Mar 1 20:43 coreutils-7.4.tar.gz
-r--r--r-- 1 jack jack 1.1M Mar 1 20:43 dejagnu-1.4.4.tar.gz
-rw-r--r-- 1 jack jack 18K Mar 2 18:18 diffutils-2.8.1-i18n-1.patch
-r--r--r-- 1 jack jack 762K Mar 1 20:43 diffutils-2.8.1.tar.gz
-r--r--r-- 1 jack jack 4.3M Mar 1 20:44 e2fsprogs-1.41.8.tar.gz
-rw-r--r-- 1 jack jack 6.7K Mar 2 18:19 expect-5.43.0-spawn-1.patch
-rw-r--r-- 1 jack jack 4.1K Mar 2 18:19 expect-5.43.0-tcl_8.5.5_fix-1.patch
-r--r--r-- 1 jack jack 514K Mar 1 20:44 expect-5.43.0.tar.gz
-rw-rw-r-- 1 jack jack 602K May 6 2009 file-5.03.tar.gz
-r--r--r-- 1 jack jack 2.1M Mar 1 20:45 findutils-4.4.2.tar.gz
-rw-r--r-- 1 jack jack 1017 Mar 2 18:20 flex-2.5.35-gcc44-1.patch
-r--r--r-- 1 jack jack 1.2M Mar 1 20:45 flex-2.5.35.tar.bz2
-r--r--r-- 1 jack jack 2.3M Mar 1 20:45 gawk-3.1.7.tar.bz2
-rw-r--r-- 1 jack jack 1.5K Mar 2 18:20 gcc-4.4.1-startfiles_fix-1.patch
-r--r--r-- 1 jack jack 60M Mar 1 20:47 gcc-4.4.1.tar.bz2
-r--r--r-- 1 jack jack 224K Mar 1 20:47 gdbm-1.8.3.tar.gz
-rw-r--r-- 1 jack jack 2.9K Mar 2 18:21 gettext-0.17-upstream_fixes-2.patch
-r--r--r-- 1 jack jack 12M Mar 1 20:47 gettext-0.17.tar.gz
-r--r--r-- 1 jack jack 16M Mar 1 20:48 glibc-2.10.1.tar.bz2
-r--r--r-- 1 jack jack 100K Mar 1 20:48 glibc-libidn-2.10.1.tar.bz2
-r--r--r-- 1 jack jack 1.8M Mar 1 20:48 gmp-4.3.1.tar.bz2
-rw-r--r-- 1 jack jack 27K Mar 2 18:26 grep-2.5.4-debian_fixes-1.patch
-r--r--r-- 1 jack jack 707K Mar 1 20:48 grep-2.5.4.tar.bz2
-r--r--r-- 1 jack jack 3.5M Mar 1 20:49 groff-1.20.1.tar.gz
-rw-r--r-- 1 jack jack 4.8K Mar 2 18:28 grub-0.97-256byte_inode-1.patch
-rw-r--r-- 1 jack jack 28K Mar 2 18:27 grub-0.97-disk_geometry-1.patch
-rw-rw-r-- 1 jack jack 950K May 8 2005 grub-0.97.tar.gz
-r--r--r-- 1 jack jack 452K Mar 1 20:49 gzip-1.3.12.tar.gz
-r--r--r-- 1 jack jack 201K Mar 1 20:49 iana-etc-2.30.tar.bz2
-rw-r--r-- 1 jack jack 5.5K Mar 2 18:29 inetutils-1.6-no_server_man_pages-1.patch
-r--r--r-- 1 jack jack 1.6M Mar 1 20:49 inetutils-1.6.tar.gz
-r--r--r-- 1 jack jack 360K Mar 1 20:49 iproute2-2.6.29-1.tar.bz2
-rw-r--r-- 1 jack jack 13K Mar 2 18:30 kbd-1.15-backspace-1.patch
-r--r--r-- 1 jack jack 1.3M Mar 1 20:50 kbd-1.15.tar.gz
-r--r--r-- 1 jack jack 297K Mar 1 20:50 less-429.tar.gz
-r--r--r-- 1 jack jack 42K Mar 1 20:50 lfs-bootscripts-20090812.tar.bz2
-r--r--r-- 1 jack jack 2.8M Mar 1 20:50 libtool-2.2.6a.tar.gz
-r--r--r-- 1 jack jack 57M Mar 1 20:59 linux-2.6.30.2.tar.bz2
-r--r--r-- 1 jack jack 985K Mar 2 08:25 m4-1.4.13.tar.bz2
-r--r--r-- 1 jack jack 1.1M Mar 2 08:26 make-3.81.tar.bz2
-rw-r--r-- 1 jack jack 825 Mar 2 18:31 man-db-2.5.5-fix_testsuite-1.patch
-r--r--r-- 1 jack jack 1.9M Mar 2 08:26 man-db-2.5.5.tar.gz
-r--r--r-- 1 jack jack 1.1M Mar 2 08:26 man-pages-3.22.tar.bz2
-r--r--r-- 1 jack jack 865K Mar 2 08:26 module-init-tools-3.10.tar.bz2
-r--r--r-- 1 jack jack 1.1M Mar 2 08:26 mpfr-2.4.1.tar.bz2
-rw-r--r-- 1 jack jack 2.4M Nov 3 2008 ncurses-5.7.tar.gz
-rw-r--r-- 1 jack jack 1.7K Mar 2 18:31 patch-2.5.9-fixes-1.patch
-rw-rw-r-- 1 jack jack 198K Jun 1 2004 patch-2.5.9.tar.gz
-rw-r--r-- 1 jack jack 7.1K Mar 2 19:22 perl-5.10.0-consolidated-1.patch
-rw-r--r-- 1 jack jack 15M Mar 2 08:31 perl-5.10.0.tar.gz
-r--r--r-- 1 jack jack 1009K Mar 2 08:32 pkg-config-0.23.tar.gz
-rw-r--r-- 1 jack jack 3.6K Mar 2 19:23 procps-3.2.8-watch_unicode-1.patch
-r--r--r-- 1 jack jack 280K Mar 2 08:32 procps-3.2.8.tar.gz
-r--r--r-- 1 jack jack 304K Mar 2 08:32 psmisc-22.8.tar.gz
-rw-r--r-- 1 jack jack 3.6K Mar 2 19:24 readline-6.0-fixes-1.patch
-r--r--r-- 1 jack jack 2.2M Mar 2 08:33 readline-6.0.tar.gz
-r--r--r-- 1 jack jack 879K Mar 2 08:33 sed-4.2.1.tar.bz2
-rw-r--r-- 1 jack jack 1.8M Jul 24 2009 shadow-4.1.4.2.tar.bz2
-r--r--r-- 1 jack jack 85K Mar 2 08:34 sysklogd-1.5.tar.gz
-rw-r--r-- 1 jack jack 97K Dec 10 2004 sysvinit-2.86.tar.gz
-r--r--r-- 1 jack jack 2.0M Mar 2 08:34 tar-1.22.tar.bz2
-r--r--r-- 1 jack jack 4.3M Mar 2 08:35 tcl8.5.7-src.tar.gz
-r--r--r-- 1 jack jack 2.7M Mar 2 08:35 texinfo-4.13a.tar.gz
-r--r--r-- 1 jack jack 518K Mar 2 08:35 udev-145.tar.bz2
-r--r--r-- 1 jack jack 13K Mar 2 08:35 udev-config-20090523.tar.bz2
-r--r--r-- 1 jack jack 3.4M Mar 2 08:36 util-linux-ng-2.16.tar.bz2
-rw-r--r-- 1 jack jack 827K Mar 2 19:24 vim-7.2-fixes-5.patch
-rw-r--r-- 1 jack jack 1.4M Aug 9 2008 vim-7.2-lang.tar.gz
-rw-r--r-- 1 jack jack 6.9M Sep 6 2008 vim-7.2.tar.bz2
-r--r--r-- 1 jack jack 416K Mar 2 08:36 zlib-1.2.3.tar.bz2
/mnt/lfs/tools:
total 0
When I try and change ownership I get:
root@phoenix:/mnt/lfs# chown -v lfs $LFS/sources
chown: cannot access `/sources': No such file or directory
failed to change ownership of `/sources' to lfs
root@phoenix:/mnt/lfs# chown -v lfs $LFS/tools
ownership of `/tools' retained as lfs
root@phoenix:/mnt/lfs#
In addition, itried the below and got the results shown:
root@phoenix:/mnt/lfs# chown -v lfs $LFS/sources
chown: cannot access `/sources': No such file or directory
failed to change ownership of `/sources' to lfs
This means that LFS is not defined for root. See, $LFS/sources is expanded to /sources, that means LFS is a null-string.
root@phoenix:/mnt/lfs# ls -lh $LFS/tools $LFS/sources
ls: cannot access /sources: No such file or directory
lrwxrwxrwx 1 root root 14 Jan 20 16:03 /tools -> /mnt/lfs/tools
root@phoenix:/mnt/lfs# cd..
bash: cd..: command not found
root@phoenix:/mnt/lfs# cd ..
root@phoenix:/mnt# ls -lh /mnt
total 12K
drwxr-xr-x 2 root root 4.0K Jan 28 15:41 binutils-build
drwxr-xr-x 2 root root 4.0K Feb 13 10:36 ipod
drwxrwxr-- 5 root root 4.0K Mar 2 19:27 lfs
Don't worry about the binutils-build directory I am going to delete that one. But lfs is now owned by "root" as you can see, and "tools" is also owned by "root", but "root still can't see "sources"!
So chown finally worked. /mnt/lfs/sources directory needs execute permission if you want to do things like chown or cd into that directory. However, you shouldn't have exited here. You are supposed to be root when you switch to user lfs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.