Recovering from Installation Problems
I forgot to select/deselect one or more of the package groups:
The bad news is that if you try to install the KDE and/or GNOME group
on a system that is configured with the recommended partition sizes from
the lab, the install will run out of space and it will abort. At that point
recovery is a bit more difficult. It is better to cancel the install as
soon as you realise that you are trying to install too much. This will
result in the setup program exiting. Restart setup. Begin with the ADDSWAP option.
This time you do not need to use mkswap - there will be a warning. The
next screen asks if you want to run mkswap - select <NO> and continue.
You will need to select all of the partitions again in the same order
so that they will be part of your filesystem. If no software was installed
there is no need to format them this time so the process is a bit quicker.
If you omit this step the partitions will not be entered into the fstab
and will not be part of the filesystem. With no filesystem the install
will fail with messages about no space.
If the installation starts and then there is a message about no space available
on the target:
This could have two possible causes.
In one sense both of these causes are always true for this problem. But
if you have chosen reasonable partition sizes of 2GB for /usr
and 200MB for the root with mounted partitions for /var
and /usr/local then the most likely
cause was too much software for the available space. To check the size
of the partitions use the command, "fdisk
/dev/hda -l" . This will list the contents of the current partition
table. For the geometry of the disks in the lab machines a 200MB partition
is about 28 cylinders and a 2GB partition will be around 280 cylinders
100MB will be about 14 cylinders and 1GB will be about 140 cylinders.
NOTE: the sizes in cylinders are estimates and could be out
by as much as 10%. But they are close enough for a sanity check. /dev/hda2
should start at around cylinder 29 and finish somewhere around cylinder
2000 (the smaller disks are 1940 cylinders and the bigger ones are around
2500 cylinders -- in either case the end cylinder of the extended partition
should be the end of the disk) If fdisk complained that there was
no room to create a partition you should have seen that problem right then.
Too much software was selected. There is insufficient room to install all
The partitions were too small.
OK, the partition sizes are what they should be. Now the problem is
too much software.
Start setup. Do the ADDSWAP as above. But this time when you select
the target partitions you will need to format them. This will wipe of the
software from the failed install and you will be able to start selecting
the software to try again.
If you try to boot the system and get a prompt that says LI and
stops or prints 101010 all over
There is a problem with lilo. This is the hard one to fix, unfortunately.
In the real world it is not too bad. You would be likely to have access
to another system that was working.
To fix this you will need to boot from the CD-ROM. When you get to the
root prompt type "mount /dev/hda1 /mnt".
The install CD effectively creates a limited Linux system on the machine.
The mount command puts your root file system on the temporary mount point.
Now change directory to the /mnt/etc
directory. Type "vi lilo.conf"
if you are lucky this will show you the contents of the lilo configuration
file. The critical bits are:
This is optional
In the real world, with access to a working system, copy the lilo.conf
file to a floppy and copy it to the broken system. Modify it as required
and save it. Now comes the more or less tricky bit. The lilo program needs
to be run to refresh the MBR code with the correct address of the
kernel that is to be loaded. But lilo is designed to be run normally with
the root filesystem at /. The system in this recovery process has the root
mounted at /mnt. The required command to run lilo is "lilo
-r /mnt". THis will correctly install a working lilo even
though the root is temporarily mounted. You should see a message that says
" added linux *" if the lilo program
has run successfully. Reboot without the CD-ROM and all should be OK.
This is optional
The label of the default kernel
This is where lilo is installed
This is the file that lilo modifies
and writes to the MBR
This is also installed and contains
the menu, etc
This is the kernel to boot
This label matches the default=
means boot this kernel by default
Initially mount the root filesystem
read-only so that it can be checked
This is the root partition
I forgot the root password:
The argument has been made that this section is telling you how to "break
into" systems. Well maybe, but the real issue is that if you have
physical access to a machine and can put a CD-ROM in the drive and
force a reboot then there is no security to talk about anyway.
The steps to clear a forgotten root password are:
If there are further questions I will
add to this document.
Boot from the install CD-ROM and get to a root prompt
Mount the root filesystem (/dev/hda1) on
Issue the command "cd /mnt/etc"
Now use the command "vi shadow"
At this stage there are two options.
If you have a userid that has a valid password you could copy the encrypted
password field from your userid and replace root's password with yours.
This is slightly more secure since root is not left with no password.
Alternatively delete all of the characters between the first and second
colon (:)on the line that begins
with root. This means that when you reboot the system root will log
in with no password. It might be a good idea to disconnect the network
until you can login and set a new root password. Or boot to single user
mode by typing linux single at
the lilo prompt instead of simply hitting the enter key. Then you will
be in single user mode and can change the root password. Then type "init
3" to go to networked multiuser
mode or "init 5" to
go to graphical mode.