Lab Questions To find the files involved in the boot process, start both your Ce
ID: 3596341 • Letter: L
Question
Lab Questions To find the files involved in the boot process, start both your CentOS and Debian virtual machines. You can also ssh Sleipnir, but not all files on Sleipnir are visible to you as a student. The answers to the following questions can be found either in the text or in a manpage. Answer the questions below. 1. Name the operations that occur during the Unix boot process. 2. What is the kernel? Where is the kemel file stored in the filesystem on CentOS? On Debian? 3. What is a spontaneous process in Unix? Name two. 4. What is single-user mode? How do you boot into single- user mode on CentOS? On Debian? 5. Do a man on fstab and fsck for this question. What is a filesystem? How is a filesystem mounted during boot? 6. Read the link on runlevels. What are runlevels? How are 7. What is inittab? View letc/inittab on Sleipnir. What is the 8. What are startup scripts? How are they related to 9. What is the purpose of the init.d directory? What is fsck? runlevels handled on CentOS? On Debian? default runlevel? Is Sleipnir running on that runlevel? runlevels? Where are the startup scripts located for runlevel 3 on CentOS? On Debian? 10. Explain this directory entry in letc/rc2.d on Sleipnir: lrvxnxrvx 1 root root 15 Jun 20 14:29 S20exin4nit.d/exins What is the significance of the S in the filename? 11. Debian and CentOS symlink all files in the runlevel directories back to the service script in Isbin/init.d. Solaris does not do this (it stores the startup scripts in two different locations.) What is the disadvantage to the Solaris method? 12. Do a man on shutdown on any machine. What is the relationship between the halt, sync, reboot, and shutdown commands? 13. Name one way to properly shutdown a machine running Linux. Also give a valid shutdown command for Solaris.Explanation / Answer
1. There can be several other steps in between, here are some major steps
-> BIOS is executed
-> then BIOS executes the Master Boot Record (MBR)
-> MBR executes GRUB (Grand Unified Bootloader)
-> GRUB executes Kernel
-> Kernel Executes "init"
-> Init executes Runlevel programmes
2. The kernal is the intermediate software layer that actually acts as an interface between OS and Hardware. By hardware , we mean CPU , memory (primary and secondary) and all other devices. It can be seen as core of an computer.
The kernel can be found in /boot directory with the a machine specific name which can be found by executing "uname -r "
so the following command is the path to kernel file in centOS
/boot/config-$(uname -r)
and same goes for Debian systems as well.
3. The kernel creates several “spontaneous” processes in user space after it is executed. These processes are are not created by the normal UNIX fork mechanism and hence called spontaneous. Two examples are: sched and init
4. A single user mode can be seen as "maintainance mode" which provides user, a system shell with runlevel 1. All the filesystems are mounted but network is not automatically connected in this mode.
To enter into this mode in any linux that uses grub bootloader,
-> During GRUB screen on boot time, press edit key mentioned below the screen.
-> find this line "ro init=/sysroot/bin/sh" and change the "ro" to "rw" i.e. "rw init=/sysroot/bin/sh". This enables the write permissions to the system shell to be executed.
-> press f10 to boot into single user mode.
9. '.d' in init.d stands for directory. So as the name suggests, ini.d contains all the scripts used by init process to start stop and restart various user and system services.
13. "shutdown" can be used in both the type of systems for proper shutdown of the machines. However , sudo halt can be used to forcefully shut down the system, It is not the safe way.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.