Cheap Off-the-Shelf Tiny Linux By Dzuy Nguyen

Slides:



Advertisements
Similar presentations
Linux Booting Procedure Sirak Kaewjamnong. 2 How Linux boot?
Advertisements

Linux Booting Procedure
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Booting the Linux Kernel Dr. Michael L. Collard 1.
Linux on commodity network H/W Josh Parsons LUGOD talk August 15 th 2005.
Presented by: GREG UNGERER Lineo Inc 825 Stanley St Woolloongabba Qld 4102 Australia Ph: Building x86 Based.
A Guide to Unix Using Linux Fourth Edition
1 Unix Systems Administration Y. K. Chang Generic Unix Directory Structure /bin /dev /etc /sbin /home /lost+found / Root Dir /dsk /rdsk /term /pts /rmt.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
Lesson 15 – INSTALL AND SET UP NETWARE 5.1. Understanding NetWare 5.1 Preparing for installation Installing NetWare 5.1 Configuring NetWare 5.1 client.
Honeywall CD-ROM. Developers and Speakers  Dave Dittrich University of Washington  Rob McMillen USMC  Jeff Nathan Sygate  William Salusky AOL.
1 Web Server Administration Chapter 3 Installing the Server.
System initialisation
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Linux Linux File System.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
Linux Install. Resources Guide to Linux Installation and Administration, Nicholas Wells, Course Technology, 2000.
Use of Thin Clients in an Industrial Environment Foxboro Southeast User’s Group Birmingham, Al February 10-11, 2009 Walter Conner Senior Plant Engineer.
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
NETW-240 Linux Installation Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Guide To UNIX Using Linux Fourth Edition
Linux Booting Procedure
Manage Directories and Files in Linux
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Embedded Linux Systems Presented By: Kitrek Riese.
Chapter 2 Installation Overview. Planning the Installation Questions: –Size of partitions –Where to put partitions –Which software packages to install.
02/2008 MATRIX VISION GmbH 1 Presentation The intelligent camera and Image processing sensor.
Exploring Suitability of Linux for Embedded Vision Applications Ankit Mathur Mayank Agarwal Mini Project.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Linux Introduction What is Linux? How do you use it?
UNIX (Linux) Introduction Module-1. OS Kernel In computing, the kernel is the central component of OS. It is a bridge between applications and the actual.
Linux file system "On a UNIX system, everything is a file; if something is not a file, it is a process." Sorts of files (on a Linux system) Directories:
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
CIS Lesson 5 Lesson 5 New Skills Boot time GRUB edits (review) Changing BIOS boot order on a VM (review) Mounting CD ISO and floppy Image files on.
Outcome 1: Describe the structure and function of an operating system.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
Linux Development Lecture 7. Schedule Linux Root Filesystem.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
1 Setup and Compile Linux Kernel Speaker: Yi-Ji Jheng Date:
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
Linux Introduction Linux was developed in the early 1990’s by Linus Torvald computer science student at the University of Helsinki Linux is distributed.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The GRUB bootloader Michael.
1 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Linux development.
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II FILES AND FILE SYSTEM STRUCTURE.
An Embedded Wireless Mini-Server with Database Support Presented by: Amit Kumar.
The GRUB bootloader Michael Opdenacker Thomas Petazzoni Free Electrons
By Ganesan Alagu Ganesh Feb 26, 2008
Filesystem Management and Backups
Linux 101 Training Module Linux Basics.
By Ganesan Alagu Ganesh Feb 21, 2008
UNIT-V EMBEDDED LINUX.
UBUNTU INSTALLATION
Linux file system "On a UNIX system, everything is a file;
Structure of Unix OS.
Exploring the UNIX File System and File Security
Operating Systems Lecture 4.
Linux Architecture Overview.
Computer System Laboratory
Presentation transcript:

Cheap Off-the-Shelf Tiny Linux By Dzuy Nguyen dzuy@itlogistic.net COST Linux Cheap Off-the-Shelf Tiny Linux By Dzuy Nguyen dzuy@itlogistic.net

What it is Home-brewed tiny Linux distro. More like Linux From Scratch. Made from readily available hardware (i386) and binaries from your favorite distro. Customed compiled kernel. Small storage device: Solid State Disk (SSD) rather than spinning hard drive.

Usage: network appliances Firewall/VPN Router DNS server Load Balancer (LVS) Proxy server Any dedicated network service Other projects: Carputer Home automation

Advantage Secured. Reliable (no spinning part). Crash proof. Hardened (no extra software that you don't need). Easy upgrade: just replace file system images. Flexible: separation of root and application file system. Did I mention low COST?

Ingredients Kernel: (custom) compiled as module as much as you can to keep kernel small. Boot strap initrd to pre-load module and prepare memory as disk. /: Busy box Login: Tiny login (with PAM) Logs: can be remote or local (clean with cron). Other: binaries from your RPM or compiled apps.

Compressed file system images Root FS: for /. Resides in RAM disk (initrd), rw. Size: 4MB file system, ~2MB populated. Local FS: Other apps and libraries. Mount either from memory or flash disk. (ro). Size: 4-8MB depends on amount of apps. Sysconfig FS: Resides on flash disk (rw) for permanent storage. Stores system's configurations. Size: 100KB and up.

Prepare file system on disk Create a loopback file system (need loop module): # dd if=/dev/zero of=rootfs bs=1k count=<size> Make file system: # mke2fs -N 2048 rootfs Mount the file system # mount -o loop rootfs /mnt Copy files from target workspace.

The root file system Need: /dev, /proc, /etc, /sbin, /bin, /lib, /mnt, /usr, /var, /home, /tmp /dev: device files (hd*, ram*, tty*, std*, etc.) # cp -dpR /dev/hda[0-5] /mnt/dev/ /etc: fstab, passwd, group, inittab, mtab, resolv.conf, sysconfig, etc. (/usr)/bin and (/usr)/sbin: system utilities to be provided by busy box (and more). /lib: libc (must have), ld-linux (most popular), libscrypt (busybox), libdl, libnsl, libresolv (and more).

Shrink binaries - strip them Strip -s: remove debug symbols Strip -g: remove all symbols Strip libraries and executables only. Do not strip modules

Apps (/usr/local) file system /usr/local/bin, /usr/local/sbin: application binaries /usr/local/etc: rc scripts /usr/local/lib: other supporting library /usr/local/lib/modules: kernel modules /usr/local/lib/security: PAM modules /usr/local/lib/iptables: iptables modules (if firewall).

Sysconfig file system Store system configuration stuffs Network configuration files. modules.conf Other: syslog, logrotate.conf, sysctl.conf, hosts, passwd, shadow, group (link to /etc) Other apps' config files can be stored here and called appropriately.

Initrd file system Similar to root file system There must be a /linuxrc executable. The linuxrc executable can be a script or binary. If script, the shell must be present. All linked libraries must be present and accessible. Use linuxrc to pre-load modules and prepare (RAM) file system.

Boot loader Choice of your favorite bootloader: GRUB or LILO. GRUB Advantages: easy to config and don't need to re-run like LILO when kernel is upgraded. Splash screen possible. Disadvantages: larger than LILO. LILO Advantages: small, works on all medium. Must re-run LILO when kernel changes.

Boot process BIOS -> Boot loader -> kernel -> initrd -> linuxrc -> init Init is not really needed. Can run system from linuxrc, just make sure it does not exit. Most commercial embedded system does not use init. Init -> inittab -> rc -> rc.sys Busybox has its own init and shell (ash). Modify rc and rc.sys to bring up your system.

Hardware Any system with BIOS that is willing to boot our bootloader or kernel. Cheap thin clients are available on eBay Netier XL and SL series Capio II 2992 Acute Network Technologies GTC Allwell IBM NetVista 8363 N2200 Single Board Computers More (not yet hacked).

Solid State Disk DiskOnChip: manufactured by M-Systems. Available on selected boards only. GRUB must be burned in. Special driver module is needed. DiskOnModule: available in 40 and 44 pin IDE. Sticks right on your IDE port. BIOS sees it as hard disk. Compact Flash: cheapest SSD. Some boards have CF interface on board. IDE to CF converter is also available. DiskOnStick: USB flash disk. Some boards can boot from these. Need to load some USB drivers in order to see as /dev/sd (SCSI) disk.