Download presentation
Presentation is loading. Please wait.
Published byShauna Cole Modified over 9 years ago
1
Linux booting How does it work?
2
First the bootloader The first step is for the bootloader to run BIOS indicates what devices to examine Bootstrap program looks on each of the devices indicated for a boot loader –Lilo –Grub Configuration files for booting in /boot
3
Bootloader Kernel image is in /boot Reconfiguring lilo requires running the lilo command in order to rewrite the boot info. (similarly for grub) Mounts file system
4
Mounting file system /etc/fstab Contains configuration to tell loader how to mount the file systems –What device –What directory to mount to –Type of file system /dev/hdb8 /var ext3 /dev/hdb1 / ext3 defaults 1 1 /dev/hdb8 /var ext3 defaults 1 2 …
5
init (the first process) Executed after mounting file systems Configures itself by /etc/inittab Run level -> which scripts to run at startup # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:3:initdefault:
6
First rc script – rc.sysinit Executes some of the scripts in /etc/sysconfig including network –Defines relevant environment variables Lots of other scripts Messages seen during boot process
7
Next rc scripts /etc/rc.d/rc 3 –To run at level 3 Does things like checking for the existence of the run files for that level Invokes the right ones “rc 3” -> run scripts in /etc/rc.d/rc3.d
8
rc3.d scripts K09dm@ S15gpm@ S26ypxfrd@ S56xinetd@ S85numlock@ S92lisa@ K90mysql@ S16ypserv@ S31upsmon@ S60cups@ S85proftpd@ S95kheader@ S08ipvsadm@ S17alsa@ S40atd@ S60nfs@ S89internet@ S99devfsd@ S10network@ S18sound@ S40saslauthd@ S60rwhod@ S90crond@ S99linuxconf@ S11portmap@ S20random@ S55named@ S66yppasswdd@ S90postgresql@ S99local@ S12syslog@ S20xfs@ S55ntpd@ S75keytable@ S90squid@ S99mysql@ S13partmon@ S25netfs@ S55sshd@ S80postfix@ S90webmin@ S14nfslock@ S26apmd@ S56rawdevices@ S85httpd@ S91smb@ lrwxr-xr-x 1 root root 17 Oct 23 2002 S10network ->../init.d/network* All scripts are actually in /etc/rc.d/init.d and linked to these. K is used when killing S is used as a startup script Numerical value says order in which to run Example: S10network says to run /etc/rc.d/init.d/network when starting up the system immediately after launching ipvsadm
9
Example script network … case “$1” in start) … restart) … stop) … /etc/rc.d/init.d/network [root@testmachine] init.d%./network restart Runs the scripts with restart option
10
dmesg Linux version 2.4.19-16mdk (quintela@bi.mandrakesoft.com) (gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)) #1 Fri Sep 20 18:15:05 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 0000000000080000 (usable) BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 0000000005fec000 (usable) BIOS-e820: 0000000005fec000 - 0000000005fef000 (ACPI data) BIOS-e820: 0000000005fef000 - 0000000005fff000 (reserved) BIOS-e820: 0000000005fff000 - 0000000006000000 (ACPI NVS) BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved) BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved) BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) 95MB LOWMEM available. Advanced speculative caching feature not present On node 0 totalpages: 24556 zone(0): 4096 pages. zone(1): 20460 pages. zone(2): 0 pages. Kernel command line: BOOT_IMAGE=linux ro root=341 quiet devfs=mount Found and enabled local APIC! Initializing CPU#0 Detected 929.225 MHz processor. Console: colour dummy device 80x25 …
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.