什么是LFS?

LFS──Linux from Scratch,就是一种从网上直接下载源码,从头编译LINUX的安装方式。它不是发行版,只是一个菜谱,告诉你到哪里去买菜(下载源码),怎么把这些生东西( raw code) 作成符合自己口味的菜肴──个性化的linux,不单单是个性的桌面。

LFS 有什么优势呢?现在看来,它可以提供最快和最小的 Linux。但是最大的优势就是,安装LFS是菜鸟变成高手的捷径。第一次安装,需要按照LFS文档安装,如果在此期间所有文档内容你都认真的阅读,保证你受益匪浅;然后发现很多地方可以不按照别人的老路操作,这个时候用自己的方式参考第一次安装的经验,再一次建立linux,完成的时候,你会发现你在 LinuxSir.Org 上已经再也不是菜鸟了。

安装两次LFS,总共要用去你一个多礼拜(说不定一个多礼拜还装不完)的业余时间。但是这一个多礼拜将是你linux水平进步最快的一个多礼拜。

当然,不是说LFS要装两遍,也没有说,一定要装那么长时间。如果闷头装,什么都不管,大概一共十个小时就有一个高效的完整的linux系统呈现在你面前。(根据机器速度不同时间上会有差异)

最后,在我们开始之前,你想一下,丰富的 Linux 知识对于你来说比在 Mplayer 上看片,用 KDE 作PP桌面等来说是不是更重要。如果是,我们期盼你成功完成LFS系统加入我们LFS爱好者的行列!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

What is Linux From Scratch? [原文]

What is Linux From Scratch?

Linux From Scratch (LFS) is a project that provides you with the steps necessary to build your own custom Linux system.
Okay, so how do I get an LFS system?

The instructions how to create an LFS system are provided in the LFS book. Check out the URL's in the menu on the left to view the latest book version online, or download it. You'll also find information to other resources such as mailing lists, mailing list archives, newsgroups, search engine, faq and more.

Why would I want an LFS system?

There are a lot of reasons why somebody would want to install an LFS system. The question most people raise is "why go through all the hassle of manually installing a Linux system from scratch when you can just download an existing distribution?". That is a valid question which I hope to answer for you.

The most important reason for LFS's existence is teaching people how a Linux system works internally. Building an LFS system teaches you about all that makes Linux tick, how things work together, and depend on each other. And most importantly, how to customize it to your own taste and needs.

One of the key benefits of LFS is that you are in control over your system without having to rely on somebody else's Linux implementation. You are in the driver's seat now and are able to dictate every single thing such as the directory layout and boot script setup. You will also know exactly where, why and how programs are installed.

Another benefit of LFS is that you can create a very compact Linux system. When you install a regular distribution, you end up installing a lot of programs you probably would never use. They're just sitting there taking up (precious) disk space. It's not hard to get an LFS system installed under 100 MB. Does that still sound like a lot? A few of us have been working on creating a very small embedded LFS system. We installed a system that was just enough to run the Apache web server; total disk space usage was aproximately 8 MB. With further stripping, that can be brought down to 5 MB or less. Try that with a regular distribution.

If we were to compare a Linux distribution with a hamburger you buy at a supermarket or fast-food restaurant, you would end up eating it without knowing precisely what it is you are eating, whereas LFS gives you the ingredients to make a hamburger. This allows you to carefully inspect it, remove unwanted ingredients, and at the same time allow you to add ingredients to enhance the flavour of your hamburger. When you are satisfied with the ingredients, you go on to the next part of putting it together. You now have the chance to make it just the way you like it: broil it, bake it, deep-fry it, barbeque it, or eat it raw.

Another analogy that we can use is that of comparing LFS with a finished house. LFS will give you the skeleton of a house, but it's up to you to install plumbing, electrical outlets, kitchen, bathtub, wallpaper, etc.

Another advantage of a custom built Linux system is added security. You will compile the entire system from source, thus allowing you to audit everything, if you wish to do so, and apply all the security patches you want or need to apply. You don't have to wait for somebody else to provide a new binary package that fixes a security hole. Besides, you have no guarantee that the new package actually fixes the problem (adequately). You never truly know whether a security hole is fixed or not unless you do it yourself.