Professional Documents
Culture Documents
Chuong 4 - 2
Chuong 4 - 2
Boot process
Linux boot process
Linux boot process (Cont.)
Linux boot process (Cont.)
• MBR hoặc boot sector có thể tải trực tiếp nhân hệ điều hành
• Chỉ sử dụng các thao tác đọc đĩa bậc thấp và đơn giản
• Không đọc được các tệp lớn, vị trí phức tạp (vd LBA)
• Thực tế
• MBR tải một chương trình nhỏ (vẫn lớn hơn MBR) để chương trình này có thể
tải nhân hệ điều hành
• Phức tạp hơn, nhiều bước hơn
• Nhân HĐH có thể phức tạp hơn
• CT nhỏ: ntosloader, lilo, grub
Linux boot process (Cont.)
Linux boot process (Cont.)
Linux boot process (Cont.)
Linux boot process (Cont.)
Linux boot process (Cont.)
Linux boot process (Cont.)
Runlevel
INIT /etc/inittab
Run
levels 0-6
Linux boot process (Cont.)
inittab
id:rstate:action:process
Field Description
id unique identifier for the entry
rstate Lists the run levels to which this entry applies
action Identifies how the process that is specified in the process field is to be run.
(initdefault, wait, respawn…)
process Defines the command or script to execute.
Linux boot process (Cont.)
inittab
id:rstate:action:process
action Description
powerfall starts the process when the init process receives a power failure signal
respawn starts the process and restarts it when it dies
Initdefault default run level.
wait starts the process and waits for it to finish before going on to the next entry for this run level
… …
rc: startup directories
5. Bootloader
Bootloader
Bootloader
Bootloader (cont.)
Bootloader (Cont.)
Bootloader (Cont.)
Bootloader (Cont.)
Bootloader (Cont.)
Bootloader (Cont.)
Bài tập
• Bài tập nhóm: Tiếp tục lab1
• Bài tập cá nhân (nộp trên Teams)
• Trình bày vắn tắt các bước khởi động của máy tính
• Master boot record là gì? Chứa những thông tin gì quan trọng?
• Bootloader là gì? Sự khác nhau giữa stage1 và stage 2 bootloader?
• So sánh LILO và Grub