Hot answers tagged

8

Short answer: You can use the same swap partition as the data in swap is not preserved from one boot to the next. It is totally normal to have multiple linux installations on a disk with a single swap. There is one exception/caveat I know of, however: if you use hibernate (aka, 'suspend to disk'), hibernate uses your swap space for storage. If you then ...


8

In old versions of bash you had to quote variables after <<<. That was fixed in 4.4. In older versions, the variable would be split on IFS and the resulting words joined on space before being stored in the temporary file that makes up that <<< redirection. In 4.2 and before, when redirecting builtins like read or command, that splitting ...


7

do I need to have a swap partition for each distro or can LFS use the swap partition I already have? As goldilock says, unless you are hibernating (suspend to disk), yes. Otherwise no, because you could overwrite swap of a hibernated system - either it's saved state or the part that was used as regular swap at suspend time. If so, would the swap ...


6

The correct virtual link is: ln -s /tools/lib/crt*.o /tools/lib/gcc/i686-lfs-linux-gnu/4.8.2/


5

Debian is built from scratch in the sense that each package maintainer builds his package from the source, so that you don't have to. Most distros work that way (exceptions are for example Gentoo or LFS). So the "tools" to build the software are depending on each component, and the packaging into a .deb or .rpm is often handled by a distro specific tool. To ...


5

I was also trying to build LFS system on my system. I am using Ubuntu 14.04. I got the same message during version-check. I went ahead with chapter 5 and during installing gcc, make failed with error. Checking few online help and mailing lists, I found that I had to point to the place where the libraries existed i.e. /usr/lib which I found out from this ...


5

Make is simply for convenience. You can build software without it, it is just more difficult. When you run make to build something, it shows you the commands it is running. You can run those commands manually and get the same effect. $ echo "int main() {}" > test.c $ make test cc test.c -o test Which created a file called test. I can get the same ...


5

su - username runs the login shell of username as an interactive shell. su username command arguments runs command arguments non-interactively under the account username. You command su lfs - -c "source ~/.bash_profile" means run - -c "source ~/.bash_profile" as the user lfs non-interactively. Now the shell sees the option - and says, I am to run as an ...


5

You need to chroot so the compiled programs can be placed and linked to correct places and files. You want to compile a program and install it's files in /usr/share/program/somefiles instead of /mnt/lfs/usr/share/program/somefiles so it can find those files when the new system is running. Also, in chroot, you can make sure your new system doesn't link to ...


4

You need to build bash with a better bison (yacc) on your host. Bash uses yacc grammar rules and only GNU bison will generate the correct parsing code for the Bash build.


4

You /mnt/lfs directory is restricted to user leo (mode 0700), no-one else can enter it. Change that to 755 (chmod go+rx /mnt/lfs) and things should work out.


4

Correct. As the Dragon Book explains, you must first build a host binary that builds for the target, and then you use that to build a target binary that builds for the target.


4

I don't know whether the previous answer I submitted is correct or not. I decided to continue doing LFS-7.5 in Linux Mint, where user lfs was present in the sudoers file. After finishing Chapter 5, I again got an error at Chapter 6.7 make mrproper. So, I deleted all folder under $LFS except $LFS/sources and started from the beginning. After finishing the ...


4

The errors you're getting are all listed in the LFS book as known and safe to ignore. Run make check again after the failure and it should complete without errors. The reason it doesn't fail the second time is because it skips tests that have already been run (even the failed ones).


4

No, you don't partition a partition. And you can only have 4 primary partitions, one of which can be an extended partition that can contain logical partitions. Personally, I'd leave it alone. When I did my LFS system (18 years ago) I kept it all on one partition. Easy to clone data, etc. off to a new one if really needed, but I'd keep it simple as you can ...


3

You can only claim to have done something from scratch if you really wrote the software yourself. If you just bundling some software you can give the bundle/distribution a name but that's it. If you expect to receive karma points/get famous/improve your cv by creating a distribution and just giving it your own name you are mistaken. It can even backfire if ...


3

No, of course not. You did not write any of the software, you just compiled it. All the licenses and copyrights that the software was distributed with apply to an LFS system just like any other.


3

Short answer: You don't. Long answer: If you know what you are doing, you certainly can organize the directories in whatever way you want, and give them names in Swahili too. But that means that you'd have to adjust each and every package you install to use this non-standard layout. You will find that some packages' configuration silently ignores the ...


3

This value of PS1 is set by the bash system-wide configuration file /etc/bash.bashrc. You can override it by setting it from your ~/.bashrc. PS1 is a shell variable. Its meaning depends on the shell. It should normally not be exported since it is not supposed to be in process's environments, though you can get away with it if you only ever use one shell. ...


3

A less time consuming option is Gentoo Linux. The install process starts further along than the Linux From Scratch book and there are options to install some of the bigger packages from binary to avoid compiling your Desktop Environment from scratch for example. As a side note the only reason to install Linux from Scratch is as a educational experience.


3

The way I would solve this problem is by having what is called an "initrd". I don't know how familiar you became with initrd when doing Linux from scratch, but they have a page about initrd here: http://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html What initrd does is act as a small root filesystem the kernel boots in to after loading the ...


3

This creates a file of installed packages: dpkg --get-selections > package_list cat package_list | grep ^gcc -> OK! cat package_list | grep gmp -> libgmp10:amd64 cat package_list | grep mpfr -> libmpfr4:amd64 cat package_list | grep mpc -> libmpc3:amd64 locate libgmp10 -> /var/lib/dpkg/info/libgmp10:amd64.list locate libmpfr4 -> /...


3

Jimminy Cricket, that hint is Old: CHANGELOG: [2002-06-12] * Initial hint. [2003-09-17] * Changed format to fit new guidelines, added disclaimer about dpkg 1.10. Can you reverse everything you did and try the Use dpkg (.deb) package management on LFS 6.3., which is newer (but not by much): CHANGELOG: [2008-11-05] * Initial hint. I ...


3

Everyone else is up and running save for my installation, which has been set up and run on an external SSD, running on an MSI GL62 laptop, while everyone else is using quite older hardware. Oh blast. It's hard to watch when people with ancient hardware get ahead of you in a project that mainly involves compiling stuff. With my course final this coming ...


3

LFS run it's own kernel. In LXC container or any container based virtualization guest system shares the host's kernel. So LFS can't be run inside a container based VM. Further in absence of dedicated kernel guest suffers several restrictions inside container. Like guest can't load it's own kernel module (i.e. drivers), can't drop cache etc. Another plan ...


3

You should not use sda or sdb. While in practice it is likely that the internal disk will be recognized first and become sda, you don't know for sure. You may also come across a computer with two internal disks, and then sdb will be wrong. To identify your USB drive, use either the UUID or the label of the partition you want to use. It will be something ...


2

You need to make sure quotes, parentheses and any other grouping structures are nested properly within your script. This error is a typical result of such issues.


2

According to the doc you link, you should be in the unix subdirectory of tcl8.5.9 to run the configure script, not in the tools subdirectory.


2

That segment is for if you were building a script to compile glibc automatically in order to run it on this system. The "i?86" is a pattern; if the outut of uname -m matches it, it will run the following commands until it gets to ;;. You probably don't need it; it was specifically meant to figure out if your architecture type was i386 since glibc doesn't ...


2

This appears to me to be a bug in align.c 2.6.39 and previous with respect to GCC >= 4.6. I am guessing that you are building on a recent Fedora that has GCC 4.6 as the default installed GCC. The bug should not appear using GCC < 4.6 IMHO. The variable "instruction" is declared on line 704 and initialized to zero. It is then re-assigned on line 746. This ...


Only top voted, non community-wiki answers of a minimum length are eligible