SourceMage GNU/Linux Installation Manual
So you messed something up, and that darn thing doesn't boot anymore?
You ponder if you should start from again from scratch, since you don't know how to fix that mess?
Don't give up that fast!
1) Start Condition
You have a (partial or complete) installation, but cannot boot because:
Lilo is misconfigured
Kernel misses support to mount root
You forgot to execute Lilo after rebuilding the kernel
Something similar
You have a Boot-CD or alternative, which you can boot from and which at last contains what you need to mount your root partition and the chroot command.
2) How to change root after having booted from CD
Usually after you have booted from CD you are at a console and feel somewhat lost (Otherwise i don't think you would read that far). First you need to mount the root partition This is sometimes as easy as (assuming your root partition is the first partition on the first disk): {{mount /devices/discs/disc0/part1 /mnt}} (devfs) or {{mount /dev/hda1 /mnt}} (classic dev style)
If you don't remember how you partitioned your disks, try {{fdisk -l}}
If you successfully mounted the correct partition enter that partition with chroot.
{{chroot /mnt /bin/bash}}
You now can already start messing around and checking things, but a lot of stuff will not do well, since you have not mounted a lot of stuff yet.
Unless your /etc/fstab is messed up, you can mount what you need inside that chroot you are in now: {{mount -n -t devfs devfs /devices}} {{mount /proc}} {{mount /boot}} (if you have it on a seperate Partition)
If you want to cast spells, you should also check with {{free}} if you have swap mounted. If not: {{swapon -a}} It also makes sense to: {{mount /var/lock}} {{mount /var/run}} {{mount /tmp}}
Feel free to mount more if you need
Now you can start messing around and fix up whatever is broken
3) Some Common Problems
LILO is not set up properly
Some people are not very familiar with devfs yet.
The first disk itself is {{/devices/discs/disc0/disc}} That is {{/dev/hda}} in classic /dev (or {{/dev/sda}} if it's a scsi disk)
If you want lilo to be installed into MBR, you neet to set {{boot = /dev/discs/disc0/disc}} in your lilo.conf
execute lilo to apply the settings
Kernel panics when trying to mount root
Check if you forgot to build some support for mounting your root partition (filesystem, scsi-controller,...) into your kernel. Modules won't do.
don't forget to execute lilo after rebuilding the kernel
Check your lilo.conf. Assumed your root is the 2nd partition on your first disk, you should have something like: {{image = /boot/vmlinuz-<version>}} {{root = /devices/discs/disc0/part2}}
execute lilo to apply the settings test
