Master zero-based full custom release version-linux from Scratch

Source: Internet
Author: User
Tags arch linux

Linux from scratch is a true master in the production of Linux distributions. Linux from scratch is an e-book created by the online community to help people who are deeply rooted in ways to improve their computer's performance (tweaker) to help them create their own, unique release version without controversy.

Linux from Scratch

difficulty level: high; time requirement: 200 minutes; customization: Very High

There is no more thorough way to build your own core and each important component from the core-driven selection to the default text editor, or the real Linux powerhouse that wants to customize all of their distributions, whether it's the scratch or emacs. This is the meaning of the existence of Linux from scratch. LFS (Linux from Scratch) is an e-book created by the online community to help people who are deeply rooted in ways to improve their computer's performance (tweaker) to help them create their own, unique release version without controversy.

The ebook itself (which can be found on the cover CD this month) contains all the details you need to know, from building a cross-platform compiler to using Chroot to build your user environment. However, there are still a lot of tricks (gotchas) to keep in mind when you create your LFS system. However, we have put forward these difficult parts, so you don't have to worry about it. The following is the essence of this ebook, LXF, each of which means that the brain is bloodshot, sweating sleepless nights for everyone. Our test is based on LFS6.3, because this stable live CD contains all the tools, packages and patches we need, but if you want the latest and most powerful LFS (we're going to publish 6.5), then all the ebooks cover how to build the LSF system with your mainstream release. Whichever path you choose, these tips will help you install without controversy!

The Linux from scratch ebook version is clearly formatted and ensures that each stage is in place.

Partition

When you start initializing Cfdisk, the most common mistake is to exit without saving your changes (people then wonder why the MKE2FS hint ' dev/hda1 doesn't exist ' error), so be sure to check your partition again for your user's system before you submit your program.

Local source

If you use the LFS live CD, all of your tools, sources and patches are stored in/lfs-sources. Once you have established a ' lfs ' user, it is recommended that you copy these sources to the $LFS/sources, as you will then be able to complete most stages correctly without the need for root permission. If you encounter any problems, check your working directory again $LFS/sources. The following command returns the/mnt/lfs:

Echo $LFS

Guide

Once you run the GCC build (using the ' bootstarp ' option), we recommend you to leave for a cup of coffee. Then go for another drink, this particular stage takes some time, because you have to compile three times gcc and then compare the third build with the second build. The point of this is to check that the second and third builds are the same, which shows that the GCC you built the first time is correct.

Skipping Bootstarp is possible, but we do not recommend it because it can add strange errors that are not easily diagnosed behind them. Users who have just contacted LFS dispersed in many forums want to know why GCC is talking so long to build and ask if this is normal. That's true, but now enough patience, there will be fewer problems in the future.

In the corresponding topic, it is common for the building process to complete your installation in such a short time that you have decided that it will take longer rather than your short memory to remember. Make sure you don't have anything to forget, or you'll have to go back and fix your mistakes later.

Core API Explorer (Hernel API headers)

The usual error is to mistakenly assume that the kernel API headers is included in your software package. This is not a problem, you need to extract the kernel source package (usually the LINUX-2.6.X.TAR.BZ2 format) and then move the extraction path based on the steps in the ebook.

The strange behavior of the shell

Before you start your LFS, it is important to understand the subtleties of Bsah. You will create a system link, write multiple lines of command (which means you see, you need to press ENTER). You can find this problem in the format of the ebook. Each line in the multi-line command for the entire ebook will not contain > (although you will see it in the terminal). Then, if you see > in the E-book, make sure you enter this character when you knock the command. We may not be aware of the accident and write like this:

Gcc-dumpspecs | Sed ' [email protected]^/lib/[email protected]/tools&@g ' > ' dirname $ (gcc-print-libgcc-file-name) '/specs

This will cause a singular error state and the file does not exist. The second line should look like this:

> > ' dirname $ (gcc-print-libgcc-file-name) '/specs

With a lot of time and dedication, you can build a version that is as useful as Nutyx.

No typesetting (typos)

If you use the mainstream distribution as your main system, we heartily recommend using copy and Paste commands in the shell. This is mainly because there is no spelling error, and a spelling error may cause a new error in the process behind it (this problem can usually only be resolved using a completely rebuilt method). For those who must manually enter or use the Live CD, be sure to check repeatedly before you execute the command, repeatedly checking that you are using the correct type of parentheses. The manual input will make sense at the beginning, but eventually you will encounter this special Beast Command (Beast):

Gcc_includedir= ' DirName $ (gcc-print-libgcc-file-name) '/include &&find ${gcc_includedir}/*-maxdepth 0-xtype D-exec rm-rvf ' {} '; &&RM-VF ' grep-l ' don't EDIT this FILE ' ${gcc_includedir}/* ' &&unset gcc_includedir

We tried to enter all of this at once, accidentally using a separate parenthesis, which would erase all the things we've done right! You can either copy and paste or enter each line individually when you see &&.

Don't take it lightly

When GCC passes the second time, the configuration becomes simple and the same steps can be used to install a series of packages:

./configure--prefix=/toolsmakemake Install

However, this is not always effective, through the work environment and LFS patches you will follow the quick hit package to make them work correctly. For this reason, you have to review your ebook as often as you have time, so that you can avoid strange behavior and possible errors later on.

Transfer to Root

You should log in to the system with the user ' LFS ', but once you execute the command you should refrigerator to root. You can go back to the LFS user by holding down the ALT and RIGHT ARROW keys (you can use the arrow keys button). In this step, be sure to do the backup as described in the ebook. All of this could result in a bad RM command being executed in the wrong path, which will make you a few hours of hard work. You can create an archive with the following command (thus saving some space):

TAR-CVF--file= $LFS/tools/lfs_build.tar $LFS/tools

Then copy the compressed package to an external storage medium or you can easily restore the system to a place. Even if you're not using an archive backup, you can use it to quickly build another LFS system in the future.

Build the release of your Dreams

Linux from scratch accompanies the ebook, opening the endless possibilities of Windows beyond Linux from Scrach to build an extensible, customizable, standard LFS-based system. LFS discusses how to build a desktop environment and a general package for software package management.

To see how much Linux from scratch can do, then look at Nutyx (www.nutyx.org). This is a French website and has not been used in English so far, but this release already has a comprehensive desktop and application suite, which is very useful.

LFS The key thing is that you can fully master which patches and updates can be applied. Everything is compiled from source code, so it's as fast as lightning. You can always choose whether to upgrade the kernel, which software can, and which software can not run on your system. This may take some time to complete this release build heaven, and then learn to maintain it, but the results are worthwhile.

or the Gentoo way.

If you can't get a release with enough customization potential, it's worth looking at Gentoo. Like Arch Linux, Gentoo supports rolling upgrades, but unlike Arch,gentoo you choose Linux or BSD as the core choice. It also includes services for 300 developer-maintained 10,000 packages, which are distributed through the most advanced package management systems in the Linux world, called Portage, as required by the Gentoo community.

Gentoo compiles all the packages from source code to achieve a stable system, but the arch Linux installation binaries are designed to be the cutting-edge of free software development. Which version you use is determined by your purpose and how much you want to control, but if you can't make a choice between arch and Linux from scratch, Gentoo is worth a try.

Gentoo is a better choice for people who also like LFS and Arch Linux.

Master zero-based full custom release version-linux from Scratch

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.