Chinaunix首页 | 论坛 | 博客
  • 博客访问: 340097
  • 博文数量: 54
  • 博客积分: 497
  • 博客等级: 下士
  • 技术积分: 612
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-16 20:05
个人简介

行动…Don\'t ever let somebody tell you, you can\'t do something. you got a dream, you gotta protect it. people can\'t do something themselves they wanna tell you you can\'t do it.if you want something. go get it.

文章分类

全部博文(54)

文章存档

2021年(3)

2018年(1)

2017年(18)

2016年(7)

2015年(4)

2013年(1)

2011年(20)

我的朋友

分类: LINUX

2011-08-05 10:20:04

注:linuxman根据网上资料,加上个人理解整理。若有问题请各位指正,谢谢!
 
1、当我们按下电源按钮的那一刻起,BIOS进行了加电自检过程:
   (1)初始化硬件,时钟,显卡,内存,USB,PXE,CD-ROM,HDD等等
   (2)查找启动介质,若为硬盘。找到第一扇区0头0道1扇区(BootSector)
   (3)加载MBR(GRUB程序安装在Bootloader),DPT-Disk Partition Table 若发现不止
   一个活动的分区,则停止。
2、GRUB的Stage1是装载Stage2。由于stage2较大,存放在文件系统中,需要Stage1.5
   引导位于系统中的Stage2 (Stage1.5相当于桥梁,Stage2是GRUB核心映像)
   (1)/boot未独立分区路径: /boot/grub/grub.conf 
   (2)/boot独立分区路径: /grub/grub.conf
3、此步PC把CPU的控制权交给内核程序来控制。操作系统核心程序,软硬件都通过kernel做交互操作。 /boot/initrd:
   (1)在内存中释放供kernel使用的root filesystem
   (2)执行真正的根文件系统中的/sbin/init进程
4、/sbin/init读取/etc/inittab文件进行后续的工作。
    (1)执行/etc/rc.sysinit脚本对系统的配置进行初始化。做如下工作:
       #run network scripts
       #check selinux status
       #print a text banner
       #set the system clock
       #initialize hardware
       #load other user-defined modules
       #configure kernel parameters
       #set the hostname
       #initialize acpi bits
       #raid setup
       #device mapper & related initialization(LVM)
       #update quotas if neccssary
       #remount the root filesystem read-write
       #clean up selinux labels
       #mount all other filesystems (except for NFS & /proc)
       #start up swapping
       #initialize the serial ports
       #active syslog,write to log files;dmesg
   (2)读取/etc/fstab文件
   (3)读取并执行/etc/rc.d/rc.local
   (4)根据/etc/inittab中的设置,读取并执行/etc/rc.d/rc*.d/下的服务脚本
        SnnName script &  KnnName script (“*”为0~6的数字)
   (5)字符界面登录执行/sbin/mingetty 读取键盘输入的用户名密码与/etc/hosts.allow & deny
        比对。若无配置此文件进行/etc/passwd & shaddow较验。
           成功:向/var/log/lastlog & /usr/spool/mail写入消息。然后读取或
                 执 行/etc/profile;~/.bash_profile;~/.bash_login;~/.profile文件。运行shell
           失败:返回到登录界面。直到验证成功。
   (6)图形界面登录执行/etc/X11/prefdm来调用:gdm (gnome桌面环境)kdm (kde桌面环境)
        xdm (启动X Window) 
5、启动完成
阅读(1458) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~