Booting and shutting down
Số trang: 18
Loại file: ppt
Dung lượng: 1.65 MB
Lượt xem: 21
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
quá trình boot linux boot loader (boot manager)kernel image va initrdtiến trình init và file inittabtiến trình rc.sysinit/etc/rc.d/rc script
Nội dung trích xuất từ tài liệu:
Booting and shutting downTàiLiệuHướngDẫnHọc LinuxLPI Bootingand shuttingdown www.athena.edu.vn Biên soạn : Nguyễn Trí Thức Tel: 38244041 1Nộidung(tt)l QuátrìnhbootLinuxi Bootloader(bootmanager) • BootloaderGRUB • BootloaderLILO• Kernelimagevàinitrdi Tiếntrìnhinitvàfileinittabi Tiếntrìnhrc.sysiniti /etc/rc.d/rcscripti QuátrìnhshutdownLinux 2Quátrìnhbootlinux Master Boot Record Hard disk Server image= label=linux read only Load kernel và detect hardware grub.conf vmlinuz và initrd Server The grand father of Mount file system all process read only /etc/inittab Run all scripts pointed Run level to from run level 3 LoginQuátrìnhbootLinuxi BIOS/POSTi MBR(lilohoặcgrub):chophéplựachọnhệ điềuhànhboot.i Kernel+initrd:loadkernelvàdetecthardware. Mountrootfilesystem(readonly)s /sbin/init:tiếntrìnhchacủamọitiếntrình.s /etc/inittab:quyếtđịnhrunlevelvàgọistartcác dịchvụcầnthiếtcủarunlevelđó.s Hiểnthịđồhọanếuởrunlevel5. 4Bootloader Bootloaderhaycòngọilàbootmanagerchophépquản lýnhiềuhệđiềuhành,chọnbootvàohệđiềuhành nào. HaibootloaderphổbiếncủaLinux: • LILO(LInuxLOader) • GRUB(GRandUnifiedBootloader)i Khithayđổifilecấuhình,GRUBtựđộngnhậnbiết, LILOthìphảidùnglệnh/sbin/lilođểupdatecấuhình.i Ngàynay,GRUBlàbootloadermặcđịnhcủađạiđasố cáchệđiểuhànhLinux. 5BootloaderGRUBl Filecấuhìnhgrub.conf: default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu titleLinuxFedora(2.6.51.358smp) root(hd0,0) Đĩa đầu tiên, partition đầu tiên kernel/vmlinuz2.6.51.358smproroot=LABEL=/rhgbquiet initrd/initrd2.6.51.358smp.img titleWindowsserver20003 rootnoverify(hd0,1) chainloader+1 6BootloaderGRUB(tt) CáchphânbiệtpartitiontrongbootloaderGRUB khácvớicáchthôngthườngcủaLinux. GRUBkhôngphânbiệtIDE,vàSCSI.đĩacứng đượchiểulà:hd%d. %d:làsốnguyên,bắtđầutừzerođểchỉ partitionđầutiên. LILOcócáchhiểuthôngthườngnhưLinux: hdXY,sdXY. 7BootloaderGRUB(tt) Mộtsốlệnhcủagrub:sửdụngtrongmode grub,hoặctrongfilegrub.conf 8BootloaderLILO, Filecấuhìnhlilo.conf: boot=/dev/hda prompt timeout=10 image=/boot/vmlinuz2.6.51.358smp label=LinuxFedora(2.6.51.358smp) root=/dev/hda1 Đĩa IDE đầu tiên, partition đầu tiên readonly other=/dev/hda2 label=Windowsserver2003 table=/dev/hda 9BootloaderLILO(tt) ĐểcàiđặtLILOlàmbootloader,dùnglệnh: • /sbin/lilo–yêucầuphảicófilelilo.conf• GỡbỏbootloaderLILO,dùnglệnh: • /sbin/lilo–u• Tìmhiểulệnhlilo: • manlilo• Tìmhiểufilecấuhìnhbootloaderlilo: • manlilo.conf 10Kernelimagevàinitrdi Kernelimagelàhìnhảnhnhỏnhấtcủakernel đượcnénthànhfilevmlinuzversion.tar.gz.i Kernelimagechứanhữngthànhphầnquan trọngcầnthiếtđầutiênđểbootmáytính.i initrd–initialramdisk:đượcsửdụngđểdetect phầncứngvàloaddriver.i Đồngthờimountfilesystemsdướidạngread onlyđểtiếnhànhkiểmtra. 11Tiếntrìnhinitvàfileinittabl Tiếntrìnhinitlàchacủamọitiếntrình.l Tiếntrìnhinitsẽtìmđọcfile/etc/inittabđể quyếtđịnhrunlevelnàosẽđượcboot.l Mỗidòngtrong/etc/inittabcódạngnhưsau: – id:runlevels:action:process Nếu không định nghĩa, sẽ boot vào runlevel nào??? 12Tiếntrìnhinit…(tt) 13Tiếntrìnhrc.sysinitS Tiếntrìnhrc.sysinitthựcthinhữngnhiệmvụsau: • thiếtlậphostnamecủamáytínhvàdetectmôitrườngnetwork. • Mount/procfilesystem. • Thiếtlậpcácthamsốcủakernel. • Thiếtlậpgiờhệthống,fonts. • Khởitạophânvùngswap. • Checkfilesystemvàmountlạiởmodereadwrite. • Loadnhữngmodulecầnthiết. 14/etc/rc.d/rcscripti Thựcthitấtcảscriptliênquanđếnrunlevelđó.i Vd:nếurunlevellà5,sẽgọithựcthicácscript trong/etc/rc.d/rc5.dr Cácscriptnàylàfilesymboliclink,linkđếncác ...
Nội dung trích xuất từ tài liệu:
Booting and shutting downTàiLiệuHướngDẫnHọc LinuxLPI Bootingand shuttingdown www.athena.edu.vn Biên soạn : Nguyễn Trí Thức Tel: 38244041 1Nộidung(tt)l QuátrìnhbootLinuxi Bootloader(bootmanager) • BootloaderGRUB • BootloaderLILO• Kernelimagevàinitrdi Tiếntrìnhinitvàfileinittabi Tiếntrìnhrc.sysiniti /etc/rc.d/rcscripti QuátrìnhshutdownLinux 2Quátrìnhbootlinux Master Boot Record Hard disk Server image= label=linux read only Load kernel và detect hardware grub.conf vmlinuz và initrd Server The grand father of Mount file system all process read only /etc/inittab Run all scripts pointed Run level to from run level 3 LoginQuátrìnhbootLinuxi BIOS/POSTi MBR(lilohoặcgrub):chophéplựachọnhệ điềuhànhboot.i Kernel+initrd:loadkernelvàdetecthardware. Mountrootfilesystem(readonly)s /sbin/init:tiếntrìnhchacủamọitiếntrình.s /etc/inittab:quyếtđịnhrunlevelvàgọistartcác dịchvụcầnthiếtcủarunlevelđó.s Hiểnthịđồhọanếuởrunlevel5. 4Bootloader Bootloaderhaycòngọilàbootmanagerchophépquản lýnhiềuhệđiềuhành,chọnbootvàohệđiềuhành nào. HaibootloaderphổbiếncủaLinux: • LILO(LInuxLOader) • GRUB(GRandUnifiedBootloader)i Khithayđổifilecấuhình,GRUBtựđộngnhậnbiết, LILOthìphảidùnglệnh/sbin/lilođểupdatecấuhình.i Ngàynay,GRUBlàbootloadermặcđịnhcủađạiđasố cáchệđiểuhànhLinux. 5BootloaderGRUBl Filecấuhìnhgrub.conf: default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu titleLinuxFedora(2.6.51.358smp) root(hd0,0) Đĩa đầu tiên, partition đầu tiên kernel/vmlinuz2.6.51.358smproroot=LABEL=/rhgbquiet initrd/initrd2.6.51.358smp.img titleWindowsserver20003 rootnoverify(hd0,1) chainloader+1 6BootloaderGRUB(tt) CáchphânbiệtpartitiontrongbootloaderGRUB khácvớicáchthôngthườngcủaLinux. GRUBkhôngphânbiệtIDE,vàSCSI.đĩacứng đượchiểulà:hd%d. %d:làsốnguyên,bắtđầutừzerođểchỉ partitionđầutiên. LILOcócáchhiểuthôngthườngnhưLinux: hdXY,sdXY. 7BootloaderGRUB(tt) Mộtsốlệnhcủagrub:sửdụngtrongmode grub,hoặctrongfilegrub.conf 8BootloaderLILO, Filecấuhìnhlilo.conf: boot=/dev/hda prompt timeout=10 image=/boot/vmlinuz2.6.51.358smp label=LinuxFedora(2.6.51.358smp) root=/dev/hda1 Đĩa IDE đầu tiên, partition đầu tiên readonly other=/dev/hda2 label=Windowsserver2003 table=/dev/hda 9BootloaderLILO(tt) ĐểcàiđặtLILOlàmbootloader,dùnglệnh: • /sbin/lilo–yêucầuphảicófilelilo.conf• GỡbỏbootloaderLILO,dùnglệnh: • /sbin/lilo–u• Tìmhiểulệnhlilo: • manlilo• Tìmhiểufilecấuhìnhbootloaderlilo: • manlilo.conf 10Kernelimagevàinitrdi Kernelimagelàhìnhảnhnhỏnhấtcủakernel đượcnénthànhfilevmlinuzversion.tar.gz.i Kernelimagechứanhữngthànhphầnquan trọngcầnthiếtđầutiênđểbootmáytính.i initrd–initialramdisk:đượcsửdụngđểdetect phầncứngvàloaddriver.i Đồngthờimountfilesystemsdướidạngread onlyđểtiếnhànhkiểmtra. 11Tiếntrìnhinitvàfileinittabl Tiếntrìnhinitlàchacủamọitiếntrình.l Tiếntrìnhinitsẽtìmđọcfile/etc/inittabđể quyếtđịnhrunlevelnàosẽđượcboot.l Mỗidòngtrong/etc/inittabcódạngnhưsau: – id:runlevels:action:process Nếu không định nghĩa, sẽ boot vào runlevel nào??? 12Tiếntrìnhinit…(tt) 13Tiếntrìnhrc.sysinitS Tiếntrìnhrc.sysinitthựcthinhữngnhiệmvụsau: • thiếtlậphostnamecủamáytínhvàdetectmôitrườngnetwork. • Mount/procfilesystem. • Thiếtlậpcácthamsốcủakernel. • Thiếtlậpgiờhệthống,fonts. • Khởitạophânvùngswap. • Checkfilesystemvàmountlạiởmodereadwrite. • Loadnhữngmodulecầnthiết. 14/etc/rc.d/rcscripti Thựcthitấtcảscriptliênquanđếnrunlevelđó.i Vd:nếurunlevellà5,sẽgọithựcthicácscript trong/etc/rc.d/rc5.dr Cácscriptnàylàfilesymboliclink,linkđếncác ...
Tài liệu liên quan:
-
183 trang 321 0 0
-
80 trang 267 0 0
-
117 trang 239 1 0
-
Giáo trình Hệ điều hành: Phần 2
53 trang 230 0 0 -
Giáo trình Hệ điều hành Linux (Ngành: Công nghệ thông tin) - CĐ Công nghiệp Hải Phòng
103 trang 204 0 0 -
271 trang 167 0 0
-
Hướng dẫn sử dụng Windows 7 với Boot Camp
8 trang 156 0 0 -
Nghiên cứu xây dựng bộ sinh số ngẫu nhiên tích hợp với nhiều hệ điều hành
5 trang 132 0 0 -
Giáo trình Hệ điều hành Linux và Unix
214 trang 126 0 0 -
212 trang 112 0 0