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.
![]() |
|
![]() |
|
Next, we are going to take most of the memory out of the system, and see what effect this has on it.
![]() |
Go to VM—>Settings—>Memory
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 question:
|
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 /mnt/tmp chroot /mnt dpkg -i /tmp/linux-imageXXX.deb exit umount /mnt reboot
|
This section is pretty hard — try it a few times, but you may fail. There are a number of lessons from this; one is never, ever, download a perl script from the web and run it as root, even if someone very nice tells you to.
![]() | 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.