2016年3月17日 星期四

2016/03/18

講義
http://lins.pbworks.com/w/file/106056036/LFS101x.2.pdf
專有名詞中英文都要背

第三章
Learning Objectives
partitions分割磁區檔案系統 filesystems啟動程序


Section 1: Linux Filesystem Basics
>Filesystems方法 架構
>Different Types of Filesystems Supported by Linux
ext234...
flash(usb)
Databas

Partitions and Filesystems
>是什麼?
A partition is a logical part of the disk, whereas a filesystem is a method of storing/finding files on a hard disk (usually in a partition).
>先partition(邏輯)到filesystems(組織)
 Mounting Parameters掛在系統的參數(作業系統放在...)
 >The Filesystem Hierarchy Standard
建立了標準Filesystem Hierarchy Standard, or FHS檔案系統組織的標準
>Linux uses the ‘/’:沒有磁碟機代號
>大小寫有分: /boot, /Boot, and /BOOT

>習題:
A possible correct full path for a "photo.jpg" file on a Linux system is /data/user1/images/photo.jpg.

//////////////////////////////////////////////////////////////////////////
Section 2: The Boot Process

>X Window System:xwindow  圖形界面系統

https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen28.jpg 
ctrl alt+F123456....七部電腦在跑
>The Boot Process程序
https://preview.edge.edx.org/c4x/Linux/LFS101/asset/chapter03_flowchart_scr15_1.jpg 
BIOS - The First Step
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen16.jpg
x86-based(cp)Basic Input/Output System (BIOS)*專有名詞要背
啟動硬體,所以又稱為 POST (Power On Self Test) 


Master Boot Records (MBR) and Boot Loader
 https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen20.jpg
可擴展的Extensible Firmware Interface or EFI/UEFI systems
Once the POST is completed, the system control passes from the BIOS to the boot loader. The boot loader is usually stored on one of the hard disks in the system, either in the boot sector (for traditional BIOS/MBR systems) or the EFI partition (for more recent (Unified) Extensible Firmware Interface or EFI/UEFI systems). Up to this stage, the machine does not access any mass storage media. Thereafter, information on the date, time, and the most important peripherals are loaded from the CMOS values (after a technology used for the battery-powered memory store - which allows the system to keep track of the date and time even when it is powered off).
A number of boot loaders exist for Linux; the most common ones are GRUB (for GRand Unified Boot loader) and ISOLINUX (for booting from removable media). Most Linux boot loaders can present a user interface for choosing alternative options for booting Linux, and even other operating systems that might be installed. When booting Linux, the boot loader is responsible for loading the kernel image and the initial RAM disk (which contains some critical files and device drivers needed to start the system) into memory.

 Boot Loader in Action
兩個步驟
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen18.jpg 
The Linux Kernel
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen21.jpg 
The Initial RAM Disk
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen22.jpg 

/sbin/init and Services
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen24.jpg 
Text-Mode Login文字界面
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen26.jpg 
  ubuntu的圖形界面叫做bash (the GNU Bourne Again Shell)

 X Window System
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen28.jpg 
More About the X Window System
https://d37djvu3ytnwxt.cloudfront.net/asset-v1:LinuxFoundationX+LFS101x.2+1T2015+type@asset+block/LFS01_ch03_screen29.jpg 
問題:
Which one of the following component actually loads Linux?
Boot loader
_______ is responsible for starting system and network services at boot time.
init


//////////////////////////////////////////////////

Section 3: Linux Distribution Installation

Choosing a Linux Distribution


伺服器 桌面 embedded嵌入的來源

Questions to Ask When Choosing a Linux Distribution
安裝之前會問的問題 
  • What is the main function of the system? (server or desktop)要哪種系統
  • What types of packages are important to the organization? For example, web server, word processing, etc.哪些套件是一定會用到的
  • How much hard disk space is available? For example, when installing Linux on an embedded device, there will be space limitations.硬碟容量(模仿成硬碟來作)
  • How often are packages updated?多久要更新
  • How long is the support cycle for each release? For example, LTS releases have long term support.多久一次release
  • Do you need kernel customization from the vendor?kemel要不要客製化
  • What hardware are you running the Linux distribution on? For example, X86, ARM, PPC, etc.
  • Do you need long-term stability or short-term experimental software?要長期支援還是短期
 Linux Installation: Planning
More About Planning in Linux Installation
要哪些軟體伺服器
安裝資料來源
Linux Installation: Install Source
Linux Installation: The Process
Linux Installation: The Warning
先備份在安裝 
問題:

///////////////////////////////////////////////////////////////

Summary
You have completed this chapter. Let’s summarize the key concepts covered:
  • A partition(分割-磁碟分區) is a logical part of the disk.
  • filesystem is a method of storing/finding files on a hard disk.
  • By dividing the hard disk into partitions, data can be grouped and separated as needed. When a failure or mistake occurs, only the data in the affected partition will be damaged, while the data on the other partitions will likely survive.
  • The boot process has multiple steps, starting with BIOS, which triggers the boot loader to start up the Linux kernel. From there the initramfs filesystem is invoked, which triggers the init program to complete the startup process.
  • Determining the appropriate distribution to deploy requires that you match your specific system needs to the capabilities of the different distributions.


 


 ls
vi  









2016年3月10日 星期四

2016/03/11



http://lins.pbworks.com/w/file/106056036/LFS101x.2.pdf

 welcome and introduction 
 Three Important Pieces of Context 
1. Things change in Linux---linux隨時都在變動
2. We've repeated some things in the class material---課程內有些東西是重複出現的
3. We've tried to avoid holy wars---選擇哪個都可
(simply because it has a bigger user base, not because we are taking a position as to which is superior.)

 vi

CH1
 Learning Objectives
  • Understand the role of the Linux Foundation.了解 Linux Foundation的角色
  • Appreciate the learning opportunities provided by the Linux Foundation's training program.了解訓練計畫
  • Describe the software environment required for this course.了解軟體環境
  • Describe the three major Linux distribution families.描述發行版
Section 1

 S3
Focus on Three Major Linux Distribution Families
下面的是根據上面的發行版修改而來的
-------
打字
nano
gedit
終端機
echo myfile.txt
vi myfile.txt

linux指令

更新
sudo apt-get update
sudo apt-get upgrade 

關機
sudo shutdown -h now

sudo poweroff -h

                     -r

需要幫助
poweroff --help

更多資訊
shutdown --help | more(更多)

知道指令的用法or看文獻有三種方法
info poweroff
main poweroff

poweroff --help