Linux with Operating System Concepts


PROBLEM 9: SYSTEM DOES NOT INITIALIZE CORRECTLY



Download 5,65 Mb.
Pdf ko'rish
bet233/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   229   230   231   232   233   234   235   236   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

PROBLEM 9: SYSTEM DOES NOT INITIALIZE CORRECTLY
Description: Upon boot/reboot, the operating system does not come up in a usable mode.
Steps to determine the problem:
1. Check dmesg for errors during system boot.
2. If the system initializes to Linux, see what runlevel /etc/inittab is set to.
3. Does /sbin/init exist?
4. Is the root file system being mounted?
5. Is vmlinuz available?
6. Is GRUB configured correctly?
Short-term solution: If errors arose during boot (from dmesg), try to diagnose the cause 
of these errors (bad device, bad kernel image) and reboot. If the system came up in the 
wrong runlevel, run telinit to change the runlevel and alter the inittab file’s default state-
ment to modify the default runlevel. If there are errors arising during the init process, you 
might need to repartition one or more of your file systems. If the system does not come 
up at all, check the GRUB command line (shortly after booting, press ‘c’ to interrupt the 
process and drop to a command line prompt).
Long-term solution: Reinstall the OS.
PROBLEM 10: CANNOT ACCESS USER FILE SYSTEM
Description: Root file system available and other file system(s) unavailable.
Steps to determine the problem:
1. Use df and examine /etc/mtab to see if the partition is mounted.
2. If the file system is to be remotely mounted, make sure netfs and network are running 
and if not, start them and manually remount.
3. Run fsck on the file system to make sure it is not damaged.


Maintaining and Troubleshooting Linux

613
Short-term solution: Make sure netfs and network start automatically at the default run-
level and add the mount information to /etc/fstab (or alternatively, as a separate mount 
command in /etc/rc.local).
Long-term solution: Repartition to create a new version of the file system (if it is dam-
aged), and add hard-disk space. If you are remotely mounting the file system, contact the 
system administrator of the remote system and make sure the file system is available.
Although the above 10 troubleshooting scenarios cover serious problems, they are only 
a few possible situations that you may encounter. Hopefully, in reading this chapter, you 
know enough now to explore problems and find solutions. Remember that there are tens of 
thousands of Linux users and administrators who regularly contribute to the community. 
Do not be afraid to ask your questions on a Linux website.
14.8 CHAPTER REVIEW
Concepts and terms introduced in this chapter:
• Backup—storing files onto a media separate from your file system for data security 
and archival purposes.
• Backup strategy—a plan that dictates when to perform full and incremental backups, 
how to rotate and reuse storage media, and where to store your backups once saved.
• Cycle stealing—a situation where the CPU is forced to wait for some I/O to take place.
• Deadlock—a situation where two or more processes are holding onto resources that 
the other processes need whereby no process is able to continue without access to one 
of the held resources but none of the processes are willing to free up the resources 
they are holding.
• Disaster-recovery plan—the strategy employed by an organization to recover from 
a disaster that prevents the organization from doing business. In the context of this 
chapter, we focus on disaster-recovery planning for the organization’s IT infrastruc-
ture (hardware, software, and data).
• Full backup—backing up an entire file system at one time.
• Incremental backup—backing up only those files in the file system that are new or 
have been modified since the last full or incremental backup.
• Liveness—the quality of a process in which is it making progress toward eventual 
completion and termination.
• Log file—a collection of messages that describe events that may be of use to the 
system administrator. Log files are generated automatically by logging software. In 
Linux, this includes klogd, syslogd, and auditd.
• Log rotation—the process of starting a new log file so that no single log file grows too 
large. Log rotation will rename the current log file (and possibly older log files) before 


614

Linux with Operating System Concepts
creating the new file. Log rotation may be planned to occur daily or monthly but the 
default is typically weekly.
• Mirror—using two sets of disk drives so that any file is stored on both sets. This pro-
vides 100% redundancy so that if damage occurs to one of the sets of disk drives, any 
file is still available from the other. In addition to offering redundancy, the mirror 
also permits multiple disk accesses in parallel.
• Mutually exclusive access—a resource that must not be accessed by two or more pro-
cesses in an overlapped manner or else it will result in data corruption. A process, 
once granted access to the resource, holds it until it no longer needs the resource. 
Data corruption can arise because in multitasking, a process could be interrupted 
while accessing data of the resource.
• Parity—the use of extra bits to record redundancy information. This is used in many 
of the forms of RAID technology.
• RAID—redundant array of independent (or inexpensive) disks is a form of technol-
ogy often used today so that file system storage can be made more secure. Through 
redundancy, bad sectors will not necessarily cause a loss of data as redundant data 
allow the lost data to be restored. There are several different forms of RAID technol-
ogy known as levels.
• Risk assessment—a strategy by an organization to determine its own assets and the 
vulnerabilities and threats to those assets so that the organization can protect itself 
better. One step in a risk assessment is to create a disaster-recovery plan.
• Scheduling—the ability to control when processes will run in the future. Linux has 
several different programs for scheduling, including one-time scheduling using at 
and batch and recurring scheduling using crontab and anacron.
• Starvation—a situation where a process is not able to progress toward completion 
because resources that it needs are continually being held by other processes. If a 
process is starving, its liveness is uncertain.
• Thrashing—a situation in which the operating system is spending too much time 
paging between main memory and virtual memory and so little-to-no processing is 
accomplished.
Linux commands and files covered in this chapter:
• anacron—a service that runs scheduled tasks upon system initialization.
• at—a program to schedule tasks one time at the time and date specified.
• atd—the daemon used by at and batch.
• auditd—the daemon that logs all software events.


Maintaining and Troubleshooting Linux

615
• aureport—a program that queries audit log files for summaries of types of events.
• ausearch—a program that queries audit log files for details of types of events.
• batch—a program to schedule tasks one time to take place when system load drops 
below 80%.
• cpio—a backup utility that can store individual files, directories, or partitions. It has 
a crude incremental backup facility.
• crond—the crontab daemon.
• crontab—a program to schedule recurring tasks. Each user is able to submit a single 
crontab job that can include many different schedules and tasks.
• dump—a backup utility that only operates on file systems but can perform full and 
incremental backups.
• free—a program to report on the amount of used and available memory.
• klogd—the kernel-logging daemon.
• mpstat—a program that reports on processor utilization, primarily intended for mul-
tiprocessor systems.
• pidstat—a program that reports on processor utilization broken down by process.
• sar—a program that reports on statistics compiled into the sa log files. Logged events 
are snapshots of the system at specified intervals (usually every 10 minutes).
• strace—a program to trace through the system calls made by an executing Linux 
program, useful for debugging the kernel.
• syslogd—a logging daemon for nonkernel system events.
• tar—the tape archive program for creating archives and backups.
• uptime—reports on the time since the last boot.
• vmstat—reports on the amount of memory and virtual memory utilization during 
the current uptime.
• who—outputs who is currently logged into the system.
• /etc/logrotate.conf—configuration file to control logrotate for rotating log files.
• /etc/syslog.conf—configuration file to control the syslogd daemon. It lists directives 
that express what types of events from which software should be logged to given 
log files.
• /var/log/audit/—directory storing the audit log files.
• /var/log/boot.log—log file storing information related to the last boot.


616

Linux with Operating System Concepts
• /var/log/cron—log file storing all scheduled events executed by anacron and crontab.
• /var/log/lastlog—log file storing users’ last login information.
• /var/log/maillog—log file storing messages related to the mail program.
• /var/log/messages—log file storing system events as logged by syslog and klogd.
• /var/log/secure—log file storing authentication events as generated by any authenti-
cation program, including when users log in and when they use su and sudo.
• /var/log/Xorg—log file storing X Windows information. Different log files pertain to 
different console windows.
• /var/log/yum.log—log file storing yum events for software install, upgrade, and 
removal.
REVIEW QUESTIONS
1. What is the advantage of using incremental backups rather than full backups?
2. What is the disadvantage of using incremental backups?
3. For a stand-alone Linux workstation, how often should you back up /home? /var?
4. For a file server storing dozens of users’ home directories, how often should you back 
up /home?
5. How does RAID 1 differ from RAID 0?
6. How does RAID 3 differ from RAID 5?
7. How does RAID 6 differ from RAID 5?
8. If you were to purchase RAID for your home computer simply to have faster disk 
access but you were worried about the cost, which RAID level would you select 
and why?
9. If you were to purchase RAID for your home computer to have some degree of redun-
dancy available but you were worried about the cost, which RAID level would you 
select and why?
10. Why is RAID 4 not used?
11. Compute the parity byte for the four bytes 10111000, 11100101, 00111101, and 
01111000.
12. Compute the parity byte for the four bytes 00001111, 11110000, 11111111, and 
10101010.
13. What are the advantages of using tar over dump for backups?


Maintaining and Troubleshooting Linux

617
14. What are the advantages of using dump over tar for backups?
15. You have three tapes to store backups on. You plan to put a full backup on one tape 
and then incremental backups on the other two tapes doing the incremental backups 
every other day. You estimate that you can place 4 days’ worth of incremental back-
ups on each tape. How long will it be before you run out of tapes and must overwrite 
the full backup on the first tape?
For questions 16 through 19, assume you have a process called myscript in your home 
directory. Provide the proper at command to execute myscript as specified.
16. Tonight at 11:59 p.m.
17. Tomorrow morning at 3:15 a.m.
18. On July 10, 2014 at 6 p.m.
19. At 4 p.m. on September 30, 2014.
For questions 20 through 24, interpret the given recurrence information for crontab by 
stating the time(s)/dates/days when the task will execute. The specific tasks are omitted 
from the problem.
20. 
* * 1 * 5
21. 
0 1,13 
* * *
22. 30 
19 


*
23. 
*/5 
23 * * *
24. 59 
11 
15 

*
25. What is the difference between 
crontab –e
and 
crontab

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   229   230   231   232   233   234   235   236   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish