Systems have a tendency to crash. Sometimes for accidental reasons, sometime for malicious reasons, sometimes hardware and sometimes because of breathtaking displays of incompetence.
Linux systems are generally relatively secure and controlled. They are most susceptible, therefore, to displays of incompetence from the systems administrator. Being able to recover a system which you have just broken is, therefore, a very useful skill.
In this practical, we are going to perform actions which have a reasonable likelihood of breaking your system irrevocably. If this happens, you will have to re-install. Re-installation happens to us all at times, and you should not feel embarrassed if this happens. However, you SHOULD feel very bad if you have not backed up all of your user files first!
Do this now, if you have not done so.
One of the most useful files on linux is /var/log/messages
. It is
where most of the information about the system goes.
![]() |
Open /var/log/messages in an editor, and familiarise yourself with the
format.
Now, hard reboot your system (Power->Troubleshoot->Turn off and exit on the VMWare Console — ignore any warning messages). This simulates a system failing totally. |
![]() |
Locate /var/log/messages the point at which the machine was turned
off.
What information is there about the cause of the system failure? |
Next, we are going to take most of the memory out of the system, and see what effect this has on it.
![]() |
Go to Player->Troubleshoot->Change Memory Allocation.
Reduce the memory to the minimum (which should be 4Mb). Now hard reboot. Record the error message that you get. Now increase the memory by 4Mb (to 8Mb), again record the error message. Increase the memory by 4Mb, until the system fully boots, recording the error messages you see. Answer the following questions
|
The last problem was relatively minor. Now, we need to work on something more serious.
Download problem_creator and run it as root. Now reboot as normally.
![]() |
|
Kernel damage is hard to repair because your system is so broken, that you can't get it to work to repair in the first place. Again, we are going to re-install the broken sections of your system. It's harder this time.
Follow these instructions as closely as you can.
![]() |
mount /dev/sda1 /mnt cp ~/Desktop/linux-imagexxx.deb /tmp chroot /opt dpkg -i /tmp/linux-imageXXX.deb exit umount /opt reboot
|
![]() | Try and explain what you have just done, with reference to what the various commands mean. Try and explain why each of them are necessary. |
1. There are likely to be several versions available. If you do not know which kernel version you have, you should be able to work it from the information that you have.