Linux from Scratch HOWTO Linux from Scratch HOWTO

Total Page:16

File Type:pdf, Size:1020Kb

Linux from Scratch HOWTO Linux from Scratch HOWTO Linux From Scratch HOWTO Linux From Scratch HOWTO Table of Contents Linux From Scratch HOWTO...........................................................................................................................1 Gerard Beekmans ....................................................................................................................................1 1.Introduction...........................................................................................................................................1 2.Software packages you need to download............................................................................................1 3.Preparing the new system.....................................................................................................................1 4.Installing Sysvinit.................................................................................................................................2 5.Installing a kernel..................................................................................................................................2 6.Installing the GNU C and C++ Libraries..............................................................................................2 7.Installing the GNU C and C++ compilers............................................................................................2 8.Installing login utilities.........................................................................................................................2 9.Installing Vim.......................................................................................................................................3 10.Creating initial boot scripts.................................................................................................................3 11.Reinstalling statically linked software................................................................................................3 12.Installing the rest of the basic system software..................................................................................4 13.Setting up basic networking................................................................................................................4 14.Setting up Email sub system...............................................................................................................4 15.Installing Internet Servers...................................................................................................................4 16.Installing X Window System..............................................................................................................5 17.Installing Window Maker...................................................................................................................5 18.Configuring system for Internet..........................................................................................................5 19.Migrations from old to new setups.....................................................................................................5 20.Copyright & Licensing Information...................................................................................................6 1. Introduction..........................................................................................................................................6 1.1 What's this all about?.........................................................................................................................6 1.2 New versions......................................................................................................................................6 1.3 Version history...................................................................................................................................6 1.4 Current Projects.................................................................................................................................8 1.5 TODO................................................................................................................................................8 1.6 Mailinglists........................................................................................................................................8 Subscribing ................................................................................................................................8 Unsubscribing ............................................................................................................................9 1.7 Contact info........................................................................................................................................9 10. Creating initial boot scripts................................................................................................................9 10.1 Preparing the directories and master files........................................................................................9 10.2 Creating the reboot script...............................................................................................................10 10.3 Creating the halt script...................................................................................................................10 10.4 Creating the mountfs script............................................................................................................10 10.5 Creating the umountfs script..........................................................................................................11 10.6 Creating the sendsignals script.......................................................................................................11 10.7 Set file permissions and create symlinks.......................................................................................12 10.8 Creating the /etc/fstab file..............................................................................................................12 10.9 Testing the system.........................................................................................................................12 11. Reinstalling statically linked software.............................................................................................13 11.1 Reinstaling GCC−2.7.2.3...............................................................................................................13 11.2 Installing the Termcap library........................................................................................................13 11.3 Installing the Readline library........................................................................................................14 11.4 Reinstalling Bash...........................................................................................................................14 i Linux From Scratch HOWTO Table of Contents 11.5 Reinstalling Sysvinit......................................................................................................................14 11.6 Reinstalling Make..........................................................................................................................14 11.7 Reinstalling Sed.............................................................................................................................15 11.8 Reinstalling Shell Utils..................................................................................................................15 11.9 Reinstalling File Utils....................................................................................................................15 11.10 Reinstalling + Installing Util Linux.............................................................................................15 11.11 Reinstalling Text Utils.................................................................................................................16 11.12 Reinstalling Tar............................................................................................................................16 11.13 Reinstalling Gzip.........................................................................................................................17 11.14 Reinstalling Bison........................................................................................................................17 11.15 Installing Flex..............................................................................................................................17 11.16 Reinstalling Binutils....................................................................................................................17 11.17 Reinstalling Grep.........................................................................................................................17 11.18 Reinstalling Mawk.......................................................................................................................18 11.19 Reinstalling Find Utils.................................................................................................................18 11.20 Reinstalling Diff Utils..................................................................................................................18 11.21 Installing Less..............................................................................................................................18 11.22 Reinstalling Perl...........................................................................................................................18 11.23 Reinstalling M4............................................................................................................................19
Recommended publications
  • Process Text Streams Using Filters
    Process Text Streams Using Filters OBJECTIVE: Candidates should should be able to apply filters to text streams. 1 Process Text Streams Using Filters KeyKEY knowledge KNOWLEDGE area(s): AREAS: Send text files and output streams through text utility filters to modify the output using standard UNIX commands found in the GNU textutils package. 2 Process Text Streams Using Filters KEY FILES,TERMS, UTILITIES cat nl tail cut paste tr expand pr unexpand fmt sed uniq head sort wc hexdump split join tac 3 cat cat the editor - used as a rudimentary text editor. cat > short-message we are curious to meet penguins in Prague Crtl+D *Ctrl+D - command is used for ending interactive input. 4 cat cat the reader More commonly used to flush text to stdout. Options: -n number each line of output -b number only non-blank output lines -A show carriage return Example cat /etc/resolv.conf ▶ search mydomain.org nameserver 127.0.0.1 5 tac tac reads back-to-front This command is the same as cat except that the text is read from the last line to the first. tac short-message ▶ penguins in Prague to meet we are curious 6 head or tail using head or tail - often used to analyze logfiles. - by default, output 10 lines of text. List 20 first lines of /var/log/messages: head -n 20 /var/log/messages head -20 /var/log/messages List 20 last lines of /etc/aliases: tail -20 /etc/aliases 7 head or tail The tail utility has an added option that allows one to list the end of a text starting at a given line.
    [Show full text]
  • Ethereal Developer's Guide Draft 0.0.2 (15684) for Ethereal 0.10.11
    Ethereal Developer's Guide Draft 0.0.2 (15684) for Ethereal 0.10.11 Ulf Lamping, Ethereal Developer's Guide: Draft 0.0.2 (15684) for Ethere- al 0.10.11 by Ulf Lamping Copyright © 2004-2005 Ulf Lamping Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. All logos and trademarks in this document are property of their respective owner. Table of Contents Preface .............................................................................................................................. vii 1. Foreword ............................................................................................................... vii 2. Who should read this document? ............................................................................... viii 3. Acknowledgements ................................................................................................... ix 4. About this document .................................................................................................. x 5. Where to get the latest copy of this document? ............................................................... xi 6. Providing feedback about this document ...................................................................... xii I. Ethereal Build Environment ................................................................................................14 1. Introduction .............................................................................................................15
    [Show full text]
  • A Compiler Front-End for the WOOL Parallelization Library
    A compiler front-end for the WOOL Parallelization library GEORGIOS VARISTEAS KTH Information and Communication Technology Master of Science Thesis Stockholm, Sweden 2010 TRITA-ICT-EX-2010:291 Royal Institute of Technology A compiler front-end for the WOOL Parallelization library Georgios Varisteas yorgos(@)kth.se 15 October, 2010 A master thesis project conducted at Examiner: Mats Brorsson Supervisor: Karl-Filip Faxén Abstract WOOL is a C parallelization library developed at SICS by Karl-Filip Faxén. It provides the tools for develop- ing fine grained independent task based parallel applications. This library is distinguished from other similar projects by being really fast and light; it manages to spawn and synchronize tasks in under 20 cycles. However, all software development frameworks which expose radically new functionality to a programming language, gain a lot by having a compiler to encapsulate and implement them. WOOL does not differ from this category. This project is about the development of a source-to-source compiler for the WOOL parallelization library, supporting an extension of the C language with new syntax that implements the WOOL API, transform- ing it and eventually outputting GNU C code. Additionally, this compiler is augmented with a wrapper script that performs compilation to machine code by using GCC. This script is configurable and fully automatic. The main advantage gained from this project is to satisfy the need for less overhead in software development with WOOL. The simplified syntax results in faster and more economical code writing while being less error- prone. Moreover, this compiler enables the future addition of many more features not applicable with the current state of WOOL as a library.
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [Show full text]
  • LFS-8.4-Fr.Pdf
    Linux From Scratch Version 8.4 Créé par Gerard Beekmans Rédacteur en chef : Bruce Dubbs Linux From Scratch: Version 8.4 par Créé par Gerard Beekmans et Rédacteur en chef : Bruce Dubbs Copyright © 1999-2019 Gerard Beekmans Copyright © 1999-2019, Gerard Beekmans Tous droits réservés. Ce livre est distribué sous la Creative Commons License. Les instructions d'ordinateur peuvent être extraites du livre sous la MIT License. Linux® est une marque déposée de Linus Torvalds. Linux From Scratch - Version 8.4 Table des matières Préface ................................................................................................................................................................... viii i. Avant-propos ................................................................................................................................................ viii ii. Public visé ..................................................................................................................................................... ix iii. Architectures cibles de LFS ........................................................................................................................ ix iv. LFS et les standards ...................................................................................................................................... x v. Raison de la présence des paquets dans le livre .......................................................................................... xi vi. Prérequis ...................................................................................................................................................
    [Show full text]
  • Toolchains Instructor: Prabal Dutta Date: October 2, 2012
    EECS 373: Design of Microprocessor-Based Systems Fall 2012 Lecture 3: Toolchains Instructor: Prabal Dutta Date: October 2, 2012 Note: Unless otherwise specified, these notes assume: (i) an ARM Cortex-M3 processor operating in little endian mode; (ii) the ARM EABI application binary interface; and (iii) the GNU GCC toolchain. Toolchains A complete software toolchain includes programs to convert source code into binary machine code, link together separately assembled/compiled code modules, disassemble the binaries, and convert their formats. Binary program file (.bin) Assembly Object Executable files (.s) files (.o) image file objcopy ld (linker) as objdump (assembler) Memory layout Disassembled Linker code (.lst) script (.ld) Figure 0.1: Assembler Toolchain. A typical GNU (GNU's Not Unix) assembler toolchain includes several programs that interact as shown in Figure 0.1 and perform the following functions: • as is the assembler and it converts human-readable assembly language programs into binary machine language code. It typically takes as input .s assembly files and outputs .o object files. • ld is the linker and it is used to combine multiple object files by resolving their external symbol references and relocating their data sections, and outputting a single executable file. It typically takes as input .o object files and .ld linker scripts and outputs .out executable files. • objcopy is a translation utility that copies and converts the contents of an object file from one format (e.g. .out) another (e.g. .bin). • objdump is a disassembler but it can also display various other information about object files. It is often used to disassemble binary files (e.g.
    [Show full text]
  • Université De Montréal Context-Aware
    UNIVERSITE´ DE MONTREAL´ CONTEXT-AWARE SOURCE CODE IDENTIFIER SPLITTING AND EXPANSION FOR SOFTWARE MAINTENANCE LATIFA GUERROUJ DEPARTEMENT´ DE GENIE´ INFORMATIQUE ET GENIE´ LOGICIEL ECOLE´ POLYTECHNIQUE DE MONTREAL´ THESE` PRESENT´ EE´ EN VUE DE L'OBTENTION DU DIPLOME^ DE PHILOSOPHIÆ DOCTOR (GENIE´ INFORMATIQUE) JUILLET 2013 ⃝c Latifa Guerrouj, 2013. UNIVERSITE´ DE MONTREAL´ ECOLE´ POLYTECHNIQUE DE MONTREAL´ Cette th`ese intitul´ee: CONTEXT-AWARE SOURCE CODE IDENTIFIER SPLITTING AND EXPANSION FOR SOFTWARE MAINTENANCE pr´esent´eepar: GUERROUJ Latifa en vue de l'obtention du dipl^ome de: Philosophiæ Doctor a ´et´ed^ument accept´eepar le jury d'examen constitu´ede: Mme BOUCHENEB Hanifa, Doctorat, pr´esidente M. ANTONIOL Giuliano, Ph.D., membre et directeur de recherche M. GUEH´ ENEUC´ Yann-Ga¨el, Ph.D., membre et codirecteur de recherche M. DESMARAIS Michel, Ph.D., membre Mme LAWRIE Dawn, Ph.D., membre iii This dissertation is dedicated to my parents. For their endless love, support and encouragement. iv ACKNOWLEDGMENTS I am very grateful to both Giulio and Yann for their support, encouragement, and intel- lectual input. I worked with you for four years or even less, but what I learned from you will last forever. Giulio, your passion about research was a source of inspiration and motivation for me. Also, your mentoring and support have been instrumental in achieving my goals. Yann, your enthusiasm and guidance have always been a strength for me to keep moving forward. Research would not be as much fun without students and researchers to collaborate with. It has been a real pleasure and great privilege working with Massimiliano Di Penta (University of Sannio), Denys Poshyvanyk (College of William and Mary), and their teams.
    [Show full text]
  • Licensing Information User Manual Release 9.0 Revision 1.2
    Oracle SD-WAN Edge Licensing Information User Manual Release 9.0 Revision 1.2 October 2020 Licensing Information User Manual Oracle SD-WAN Edge 8.2 Oracle SD-WAN Edge Licensing Information ser !an"al# Release 9.0 Copyright Information $o%yrig't ( 2020# Oracle and)or its a*liates. All rig'ts reser+ed. ,'is soft-are and related doc"mentation are %rovided "nder a license agreement containing restrictions on "se and disclosure and are %rotected by intellect"al %ro%ert& la-s. E.ce%t as e.%ressly %ermitted in &o"r license agreement or allo-ed by la-# &o" may not "se# co%&# re%rod"ce# translate# broadcast# modif&# license# transmit# distrib"te# e.'ibit# %erform# %"blish# or display any %art# in any form# or by any means. Re+erse engineering# disassembl&# or decom%ilation of t'is soft-are# "nless re/"ired by la- for intero%erabilit&# is %ro'ibited. ,'e information contained 'erein is sub0ect to change -it'o"t notice and is not -arranted to be error-free. If &o" find any errors, %lease re%ort t'em to "s in -riting. If t'is is soft-are or related documentation t'at is deli+ered to t'e .S. 2o+ernment or an&one licensing it on be'alf of t'e .S. 2o+ernment# t'en t'e follo-ing notice is a%%licable3 .S. 2O4ERN!EN, END SERS3 Oracle %rograms, incl"ding any o%erating s&stem# integrated soft-are# any %rograms installed on t'e 'ard-are# and)or documentation# deli+ered to .S.
    [Show full text]
  • IBM Education Assistance for Z/OS V2R1
    IBM Education Assistance for z/OS V2R1 Item: ASCII Unicode Option Element/Component: UNIX Shells and Utilities (S&U) Material is current as of June 2013 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option Agenda ■ Trademarks ■ Presentation Objectives ■ Overview ■ Usage & Invocation ■ Migration & Coexistence Considerations ■ Presentation Summary ■ Appendix Page 2 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Version Trademarks ■ See url http://www.ibm.com/legal/copytrade.shtml for a list of trademarks. Page 3 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Presentation Objectives ■ Introduce the features and benefits of the new z/OS UNIX Shells and Utilities (S&U) support for working with ASCII/Unicode files. Page 4 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Version Overview ■ Problem Statement –As a z/OS UNIX Shells & Utilities user, I want the ability to control the text conversion of input files used by the S&U commands. –As a z/OS UNIX Shells & Utilities user, I want the ability to run tagged shell scripts (tcsh scripts and SBCS sh scripts) under different SBCS locales. ■ Solution –Add –W filecodeset=codeset,pgmcodeset=codeset option on several S&U commands to enable text conversion – consistent with support added to vi and ex in V1R13. –Add –B option on several S&U commands to disable automatic text conversion – consistent with other commands that already have this override support. –Add new _TEXT_CONV environment variable to enable or disable text conversion.
    [Show full text]
  • Implementation of C Library for Constructing Packrat Parser with Statically Allocated Memory
    Journal of Information Processing Vol.26 335–344 (Mar. 2018) [DOI: 10.2197/ipsjjip.26.335] Regular Paper Implementation of C Library for Constructing Packrat Parser with Statically Allocated Memory Yuta Sugimoto1,a) Atusi Maeda1 Received: July 23, 2017, Accepted: September 28, 2017 Abstract: Packrat parsing is a recursive descent parsing method with backtracking and memoization. Parsers based on this method require no separate lexical analyzers, and backtracking enables those parsers to handle a wide range of complex syntactic constructs. Memoization is used to prevent exponential growth of running time, resulting in linear time complexity at th cost of linear space consumption. In this study, we propose CPEG – a library that can be used to write parsers using Packrat parsing in C language. This library enables programmers to describe syntactic rules in an internal domain-specific language (DSL) which, unlike parser combinators, does not require runtime data structures to represent syntax. Syntax rules are just expressed by plain C macros. The runtime routine does not dynamically allocate memory regions for memoization. Instead, statically allocated arrays are used as memoization cache tables. Therefore, programmers can implement practical parsers with CPEG, which does not depend on any specific memory management features, requiring fixed-sized memory (except for input string). To enhance usability, a translator to CPEG from an external DSL is provided, as well as a tuning mechanism to control memoization parameters. Pars- ing time compared to other systems when parsing JavaScript Object Notation and Java source files are given. The experimental results indicate that the performance of CPEG is competitive with other libraries.
    [Show full text]
  • Qgis-1.0.0-User-Guide-En.Pdf
    Quantum GIS User, Installation and Coding Guide Version 1.0.0 ’Kore’ Preamble This document is the original user, installation and coding guide of the described software Quantum GIS. The software and hardware described in this document are in most cases registered trademarks and are therefore subject to the legal requirements. Quantum GIS is subject to the GNU General Public License. Find more information on the Quantum GIS Homepage http://qgis.osgeo.org. The details, data, results etc. in this document have been written and verified to the best of knowledge and responsibility of the authors and editors. Nevertheless, mistakes concerning the content are possible. Therefore, all data are not liable to any duties or guarantees. The authors, editors and publishers do not take any responsibility or liability for failures and their consequences. Your are always welcome to indicate possible mistakes. This document has been typeset with LATEX. It is available as LATEX source code via subversion and online as PDF document via http://qgis.osgeo.org/documentation/manuals.html. Translated versions of this document can be downloaded via the documentation area of the QGIS project as well. For more information about contributing to this document and about translating it, please visit: http://wiki.qgis.org/qgiswiki/DocumentationWritersCorner Links in this Document This document contains internal and external links. Clicking on an internal link moves within the document, while clicking on an external link opens an internet address. In PDF form, internal links are shown in blue, while external links are shown in red and are handled by the system browser.
    [Show full text]
  • GNU Coreutils Cheat Sheet (V1.00) Created by Peteris Krumins ([email protected], -- Good Coders Code, Great Coders Reuse)
    GNU Coreutils Cheat Sheet (v1.00) Created by Peteris Krumins ([email protected], www.catonmat.net -- good coders code, great coders reuse) Utility Description Utility Description arch Print machine hardware name nproc Print the number of processors base64 Base64 encode/decode strings or files od Dump files in octal and other formats basename Strip directory and suffix from file names paste Merge lines of files cat Concatenate files and print on the standard output pathchk Check whether file names are valid or portable chcon Change SELinux context of file pinky Lightweight finger chgrp Change group ownership of files pr Convert text files for printing chmod Change permission modes of files printenv Print all or part of environment chown Change user and group ownership of files printf Format and print data chroot Run command or shell with special root directory ptx Permuted index for GNU, with keywords in their context cksum Print CRC checksum and byte counts pwd Print current directory comm Compare two sorted files line by line readlink Display value of a symbolic link cp Copy files realpath Print the resolved file name csplit Split a file into context-determined pieces rm Delete files cut Remove parts of lines of files rmdir Remove directories date Print or set the system date and time runcon Run command with specified security context dd Convert a file while copying it seq Print sequence of numbers to standard output df Summarize free disk space setuidgid Run a command with the UID and GID of a specified user dir Briefly list directory
    [Show full text]