Thursday, August 17, 2017

Boot the system (boot process-sysvinit-power on to the system prompt)

Sysvinit
How to boot the system and dedwfefe system?
What is meant by run levels?
What is sysvinit?
This is a package,containing a group of processes that are responsible
For controlling the basic functions of the system.
Primarily it includes the ‘init’ application which is very first application started by the kernel
after the boot loader starts the boot process.
The init program then controls the startup,running and shutdown of all other programs (it
becomes the ‘parent’ of everything running on the system).
Always in the system the sysvinit or init has the PID as 1.
Boot process:
System power on
BIOS load (NOTE:modern systems,this includes EFI (extended firmware interface(this is
designed to replace BIOS,it enhance and provides extra features to BIOS)).
BIOS scans and hands off to the primary (or chosen) disk’s boot sector’
Boot sector provides the MBR (Master boot record) within the first 512 bytes of the active (or
first,depending on your installation) drive (NOTE:can be floppy,USB thumb drive or internal
disk drive).
Boot loader is executed.(what is bootloader? LILO/GRUB/GRUB2 begins and tells the system
what you can boot).
Here are the configurations available to boot:
USER INPUT –depending on configuration,the user may be able to choose from a menu of
potential boot types or kernel versions or simply allow the default one.
Linux kernel is read and executed.
Device initialization,module loading and the intial RAM disk (initrd) is loaded.
Finally,the root filesystem is mounted.
The ‘init’ program loads (and becomes the first process ID - /sbin/init).--à then the init
program will scan the ---à
(/etc/inittab is read and the appropriate runlevel script(s) are run).
Modules indicated within the init scripts are loaded and that modules are also loaded in to
the memory.
The rootfilesystem will then be checked.
Remaining local filesystems are mounted.
Then network devices are started.
And remote filesystems are mounted (if configured).
Init process then rescans the /etc/inittab file and changes/sets the system to the indicated
default runlevel and complete execution of appropriate scripts.
Runlevel scripts are executed in numeric order.
TTY sessions are loaded (as listed in the /etc/inittab).(these are specific user connectivity).
System login prompt is displayed on console system is ready for login.
(inittab file will set the runlevels for your system and it will provide the default runlevel).
The common runlevel types,that is define on the everysystem.
SYSVINIT Runlevels:
0 – HALT (Shutdown).
1 - Single User.
2 – Multi-User (No Network or Remote Filesystem).
3 –is a typical system runlevel (Full Multi-user (Including Networking and Remote Filesystem).
4 – unused
5 – X11 (Full Multi-User with Graphical Desktop Environment).
6 – Reboot
Note:The bootloader cannot excute until the Bios is handled to the primary boot sector 2)the

init program cannot be loaded until the boot filesystem is mounted.

No comments:

Post a Comment