Have Windows and Linux running smoothly on the same hard disk

I used to have Windows and Linux running smoothly on the same hard disk. Now, after reinstalling Windows, I can no longer boot my machine into Linux. How can I regain control?

That's usually because Windows erases the MBR (Master Boot Record) of the disk, which is exactly where LILO puts its data.   You can boot Linux if you insert the custom boot floppy that newer Red Hat installations advise you to do and reset the computer.  If you don't have that, you can still use the installation floppy: insert it into the drive and reset the computer. At the installation prompt type:

vmlinuz root=/dev/hda2

or maybe:

vmlinuz root=/dev/hda5

The '/dev/hda2' thing is the partition that holds the root ('/') filesystem of the Linux OS. You may have to experiment with different numbers, if you don't know that (remember to take notes during the next installation, especially about disks and partitions). /dev/hda1 is usually the Windows partition (C). It changes a little when you have two physical hard disks inside the computer (/dev/hdb1 or /dev/hdc1, depending on where the CD-ROM is connected) Just try everything in turn and press Ctrl-Alt-Del as soon as you see the 'lovely' 'KERNEL PANIC' message.
Once booting from floppy is solved (you got the login prompt), then you can proceed to the second step: log in as root and re-install LILO on the MBR (do that if LILO ran properly before the trouble started, otherwise you'll have to modify the /etc/lilo.conf file) by typing:

/sbin/lilo

Now everything should be as before. Remove the floppy and restart the computer.
You can create an installation floppy from CD in Windows, by using the RAWRITE.EXE programme, giving it the name of one of the files in the /images directory as input. Everything you need is on the Red Hat CD.
If you didn't do the custom boot floppy, and didn't keep the installation floppy, and also do not have a copy of the Linux CD, then you may consider the fact that there are other interesting things in life, apart from computers.....

Have a Linux Issue?
Do you have a Linux Question?

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.