Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Pocket Linux Guide

Pocket Linux Guide

Ratings: (0)|Views: 23 |Likes:
Published by sajs201

More info:

Published by: sajs201 on Dec 16, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/13/2010

pdf

text

original

 
Pocket Linux Guide
David Horton
<dhorton<AT>NOSPAM.member.fsf.org>
Revision History
Revision 3.120050409Revised by: DHMinor clarifications and spelling corrections.Revision 3.020041102Revised by: DHChanged bootloader to GRUB rather than LILO. Updated versions on all source code packages. Made minorclarifications to some shell commands and scripts.Revision 2.120040218Revised by: DHCorrected typos. Changed resource site hosting to SourceForge. Added appendix B to include the GNU FreeDocumentation License as part of this document.Revision 2.020031108Revised by: DHUpdated to use GNU coreutils in place of fileutils, sh−utils and textutils. Updated version numbers on manysource code packages. Introduced Freshmeat as a resource for finding source code. Changed /etc/mtab to areal file rather than using a symlink to /proc/mounts. Corrected local_fs script errors. Updated email address.Revision 1.220030531Revised by: DHCorrected errors in "strip −o library" commands.Revision 1.120030521Revised by: DHBug fixes, typo corrections and improved XML markup.Revision 1.020030217Revised by: DHInitial Release, reviewed by LDP.The Pocket Linux Guide is for anyone interested in learning the techniques of building a GNU/Linux systemfrom source code. The guide is structured as a project that builds a small diskette−based GNU/Linux systemcalled Pocket Linux. Each chapter explores a small piece of the overall system explaining how it works, whyit is needed and how to build it. After completing the Pocket Linux project, readers should possess anenhanced knowledge of what makes GNU/Linux systems work as well as the confidence to explore larger,more complex source−code−only projects.
 
Tableof Contents
Legal Information...............................................................................................................................................1
1. Copyright and License.........................................................................................................................12. Disclaimer............................................................................................................................................1
Introduction.........................................................................................................................................................2
1. About PocketLinux.............................................................................................................................22. Prerequisite Skills................................................................................................................................23. Project Format......................................................................................................................................24. Help& Support....................................................................................................................................25. Feedback..............................................................................................................................................3
Chapter 1. Project Initiation..............................................................................................................................4
1.1. A Brief History of GNU/Linux.........................................................................................................41.2. TheGoal of Pocket Linux.................................................................................................................41.3. Working Within The Constraints......................................................................................................4
Chapter 2. A Simple Prototype..........................................................................................................................6
2.1. Analysis............................................................................................................................................62.2. Design...............................................................................................................................................62.2.1. Simplification..........................................................................................................................62.2.2. BootDisk.................................................................................................................................62.2.3. Root Disk.................................................................................................................................72.2.4. CPU Compatibility..................................................................................................................72.3. Construction......................................................................................................................................72.3.1. Prepare the boot disk media....................................................................................................72.3.2. Build theGRUB bootloader....................................................................................................72.3.3. Copy thebootloader files to diskette.......................................................................................82.3.4. Finish bootloader installation..................................................................................................82.3.5. Build theLinux kernel.............................................................................................................82.3.6. Copy thekernel to diskette......................................................................................................92.3.7. Unmountthe boot disk............................................................................................................92.3.8. Prepare the root disk media.....................................................................................................92.3.9. Build BASH............................................................................................................................92.3.10. Copy BASH to the root disk..................................................................................................92.3.11. Create device files that BASHneeds....................................................................................92.3.12. Unmount the root disk...........................................................................................................92.4. Implementation...............................................................................................................................102.4.1. System startup.......................................................................................................................102.4.2. Testing what works...............................................................................................................102.4.3. Noting what does not work...................................................................................................102.4.4. System shutdown...................................................................................................................11
Chapter 3. Saving Space...................................................................................................................................12
3.1. Analysis..........................................................................................................................................123.2. Design.............................................................................................................................................123.2.1. Shared Libraries....................................................................................................................123.2.2. Stripped Binaries...................................................................................................................123.2.3. Compressed Root Filesystem................................................................................................12
Pocket Linux Guidei
 
Table of Contents
Chapter 3. Saving Space
3.3. Construction....................................................................................................................................133.3.1. Create a ramdisk....................................................................................................................133.3.2. Rebuild the BASH shell........................................................................................................133.3.3. Determinewhich libraries are required.................................................................................133.3.4. Copy BASH and its libraries to the ramdisk.........................................................................133.3.5. Createa console device.........................................................................................................143.3.6. Compressthe ramdisk image................................................................................................143.3.7. Copy thecompressed image to diskette................................................................................143.4. Implementation...............................................................................................................................143.4.1. System startup.......................................................................................................................143.4.2. Verify results.........................................................................................................................153.4.3. System shutdown...................................................................................................................15
Chapter 4. Some Basic Utilities........................................................................................................................16
4.1. Analysis..........................................................................................................................................164.2. Design.............................................................................................................................................164.2.1. Determining Required Commands........................................................................................164.2.2. Locating Source Code...........................................................................................................164.2.3. Leveraging FHS....................................................................................................................164.2.4. Downloading Source Code....................................................................................................174.3. Construction....................................................................................................................................174.3.1. Create a staging area..............................................................................................................174.3.2. Copy contents of phase 2 rootdisk........................................................................................174.3.3. Install binaries from GNU coreutils......................................................................................184.3.4. Copy additional libraries.......................................................................................................184.3.5. Stripbinaries and libraries.....................................................................................................184.3.6. Create a compressed root disk image....................................................................................184.3.7. Write theroot disk image to floppy.......................................................................................184.4. Implementation...............................................................................................................................194.4.1. System startup.......................................................................................................................194.4.2. Testing new commands.........................................................................................................194.4.3. System shutdown...................................................................................................................20
Chapter 5. Checking and Mounting Disks.....................................................................................................21
5.1. Analysis..........................................................................................................................................215.2. Design.............................................................................................................................................215.2.1. Determining necessary utilities.............................................................................................215.2.2. Finding source code...............................................................................................................215.2.3. Automating fsck and mount..................................................................................................225.2.4. File dependencies..................................................................................................................225.3. Construction....................................................................................................................................235.3.1. Install utilities from e2fsprogs...............................................................................................235.3.2. Install utilities from util−linux..............................................................................................235.3.3. Check library requirements...................................................................................................245.3.4. Strip binaries to save space...................................................................................................245.3.5. Create additional device files................................................................................................245.3.6. Create the fstab and mtab files..............................................................................................24
Pocket Linux Guideii

Activity (5)

You've already reviewed this. Edit your review.
1 hundred reads
samar liked this
yoginikoo liked this
Sai100 liked this
voidoid1 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->