Link to home
Start Free TrialLog in
Avatar of dvdwalt
dvdwalt

asked on

Dual Boot

I had a dual boot between win98 and red hat 8.0... I reinstalled my windows 98 from scratch and obviousely it created a new boot record and now my dual boot is gone. How can I get it back?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of svenkarlsen
svenkarlsen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skamp
skamp

were they both on the same HD?
you might have to boot from the bootdisk (cd/floppy)

if linux is on another HD
at the boot prompt type something like this:
linux root=/dev/hdX  where X is your linux drive

is linux is on the same HD
linux root=/dev/hdaX   where X is the partition number
(if you run fdisk it will tell you how many partitions you have. just run through the numbers untill you get it right)

then as root run  lilo

reboot and you have a dual boot again!
oops..
if they are on different HD's it will be
linux root=/dev/hdXZ    where X is the hard drive (primary master =a primary slave =B) and Z is the partition number (usually 1)

Avatar of dvdwalt

ASKER

It's on one hard drive... I've read somewhere that you can type "fdisk /mbr" or something?
fdisk /mbr is what you use to remove lilo from the master boot record and replace it with Microsoft's, most people do this when they are removing linux...

the other suggestions above are on track and where you should go.
Avatar of dvdwalt

ASKER

Thanks
Lilo depends on a map file which resides in /boot/lilo i believe. In this map file it has information on partitions and their offsets and some other information. You should be able to reinstall lilo if you manage to keep the map file. I have never done this before but that is how I would go about it. You could also try to install a bootloader like grub. Get yourself one of the run from cd only linux distros or use your redhat installation disk to get access to the linux partition. (either d/l something like Knoppix , http://www.knoppix.com or installation disks in rescue mode). Once you have access you should be able to either reinstall LILO or install GRUB.  That's my 2 cents.


Rehat 8.0 installs GRUB by default so unless you changed it , you need to reinstall GRUB to the MBR not lilo.  you will need to login to the linux side and type "grub-install /dev/hda".  To do this either use fdisk in windows to set the linux /boot partition active or boot from the RedHat media and type "linux rescue" or "rescue" to start a rescue session.  When that has come up type the following commands, exclude my comments thuogh:

mkdir /mnt2
mount /dev/hda1 /mnt2  (This should be your root partition number where I have hda1)
mount /dev/hda3 /mnt/boot  (This should be your boot partition number where I have hda3)
chroot /mnt2   (This sets your environment to use your real system.)

/sbin/grub-install /dev/hda  (This should install grub to the MBR)




After doing that reboot the machine and the grub boot screen should greet you.