1 / 10

LINUX 服务器管理技术

LINUX 服务器管理技术. 田 钧. 第十章 系统引导. 授课内容 什么是启动管理器 GRUB LILO 授课目标 熟悉修改 grub.conf 配置文件 了解启动管理器和 lilo.conf 配置文件的意思. 什么是启动管理器.

Download Presentation

LINUX 服务器管理技术

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LINUX 服务器管理技术 田 钧

  2. 第十章 系统引导 • 授课内容 • 什么是启动管理器 • GRUB • LILO • 授课目标 • 熟悉修改grub.conf配置文件 • 了解启动管理器和lilo.conf配置文件的意思 2

  3. 什么是启动管理器 启动管理器是存储在磁盘开始扇区中的一段程序,例如,硬盘的MBR(Master Boot Record),在系统完成启动测试后,如果系统是从MBR启动,则BIOS(Basic Input/Output System)将控制传送给MBR。然后存储在MBR中的这段程序将运行。这段程序被称为启动管理器。它的任务就是将控制传送给操作系统,完成启动过程。 3

  4. 硬盘结构的介绍(回顾) 主分区 mbr 逻辑分区 扩展分区 16字节 16字节 16字节 16字节 55AAH 446字节 Mbr:主引导扇区,共512个字节,其中446个字节在windows中用于存储错误代码在linux中用于存储内核,16个字节表示用于存储主分区的信息,55AA表示跳转2个字节。即(446+16*4+2=512) 注意:所以在安装多系统时要注意安装顺序 4

  5. GRUB • 什么是GRUB GRUB(GRand Unified Bootloader)是一个将引导装载程序安装到主引导记录的程序,主引导记录是位于一个硬盘开始的扇区。它允许位于主引导记录区中特定的指令来装载一个GRUB菜单或是GRUB的命令环境。这使得用户能够开始操作系统的选择,在内核引导时传递特定指令给内核,或是在内核引导前确定一些系统参数(如可用的RAM大小)。 • GRUB的特点 • 支持大硬盘 • 支持开机画面 • 菜单式选择 • 分区位置改变后不必重新配置 • 不支持汉字 5

  6. Grub.conf配置文件 • 位置:/boot/grub/grub.conf • default=linux timeout=10/0/-1 color=green/blacklight-gray/bluesplashimage=(hd0,0)/boot/grub/splash.xpm.gz • title linuxroot (hd0,1)kernel /vmlinuz root=/dev/hda5kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/initrd /boot/initrd-2.4.18-14.img • title windowsrootnoverify (hd0,0)root (hd0,0)chainloader +1 6

  7. LILO • 什么是LILO LILO (Linux Loader)是一个优秀的开机启动管理程序,它的最大的好处就是独立于文件系统,可以启动各种操作系统:从Microsoft、OS/2、SCO Unix、Unixware、PC-DOS到Linux等等。 • LILO的安装位置 LILO可安装在: • 第一硬盘的引导扇区 • 软盘的引导扇区。 • 第一硬盘的Linux 文件系统分区上的引导扇区。 7

  8. Lilo.conf配置文件 • 位置:/etc/lilo.conf boot=/dev/hda delay=40 compact vga=normal root=/dev/hda1 read-only image=/bzImage-2.5.99 label=try image=/bzImage-1.0.9 label=1.0.9 8

  9. /etc/inittab • id:5:initdefault • ca::ctrlaltdel:/sbin/shutdown -t3 -r now • pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" • pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled“ 9

  10. linux系统启动过程 • 1 加电自检,加载BIOS • 2 BIOS扫描MBR • 3 MBR中的引导管理器加载内核 • 4 内核加载后,执行/sbin/init • 5 执行文件:/etc/rc.d/rc.sysinit • 6 执行文件:/etc/inittab • 7 执行运行级中的脚本文件 • 8 执行文件:/etc/rc.d/rc.local • 9 执行/bin/login • 10 启动登陆画面 10

More Related