Linux file system with the boot process

A, Linux file system

1. / etc important system initialization file

    / Etc / sysconfig / network-scripts / ifcfg-eth0: NIC configuration file

    /etc/resolv.conf: Linux System DNS client configuration file

    / Etc / hostname: (CentOS 7) hostname configuration file

    / Etc / sysconfig / network: (CentOS 6) hostname configuration file

    / Etc / hosts: local DNS resolution file system

    / Etc / fstab: Configure boot device automatically mount file

    /etc/rc.local: storing boot files from the startup procedure commands

    / Etc / inittab: system startup configuration file to set operation level, etc.

    / Etc / profile and / etc / bashrc: configure the system environment variables / aliases file

    /etc/profile.d: after the user logs directory where the script execution

    / Etc / issue and /etc/issue.net: configuration before the user logs terminal displays file information []

    /etc/init.d: ​​software startup program directory (CentOS 6)

   / Usr / lib / systemd / system: software startup program directory (CentOS 7)

   / Etc / motd: prompt is displayed after a user logs on the contents of the file system

   / Etc / redhat-release: Statement Redhat version number and file name information

   /etc/sysctl.conf:Linux kernel parameter settings file

   /etc/security/limits.conf: user handles

   

  

  

  

 

 

2. / proc important path

   / Proc / meminfo: Information System Memory

   / Proc / cpuinfo: processor information regarding

   / Proc / loadavg: results of the system load information, uptime of

   / Proc / mounts: a list of mounted file systems

 

3. / var directory file

    / Var / log: directory information recording system and software to run the log files are located

    / Var / log / message: System level log file

    / Var / log / secure: user login information log file

    / Var / log / dmesg: recording hardware information log file loading conditions

Two, Linux boot process

1. bios self-test, the main check whether the hardware is healthy.

2. bios-> post, bios for power on self test (POST) process, a variety of computer hardware information detecting

3. MBR boot disk where the operating system to read core files

4. GRUB boot, the kernel is loaded into the

5. Load the core and are initialized itself.

6. Start init process, init sequence starts: / sbin / init -> / etc / init -> / bin / init -> / bin / sh

7. Read / etc / inittab file, which defines the system default run level. Initialization run level, system initialization script, the corresponding level of the script catalog.

8. Do /etc/rc.d/rc.sysinit program, system initialization scripts, mainly to complete, set the host name, a banner and so on.

9. Run / bin / login, execute / bin / login program, waits for the user to log

  CentOS 6 CentOS 7 and start the process almost, just to start the init program, modified into systemd.

  1. uefi bios or initialization, start post POST

  2. mbr loaded into memory

  3. Load the kernel module and inintamfs

  4. The kernel starts initialization, instead of using the init program systemd

      Performing initrd.target, the system comprising a mount / etc / fstab file, the mount case, you can switch to the root directory

     Switching from the initramfs root file system to disk root directory

      systemd perform the default target configuration

Guess you like

Origin www.cnblogs.com/jiawei2527/p/12641587.html