LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't find linux in dualboot (https://www.linuxquestions.org/questions/linux-newbie-8/cant-find-linux-in-dualboot-145464/)

RIB 02-12-2004 08:50 PM

can't find linux in dualboot
 
I used to have a dualboot Win 98SE / Linux Red Hat 8. Both OS's are installed on seperate hard drives. Since I had to reinstall Win98, Linux isn't recognized anymore. Win98 is automatically booted.

I got BootMagic to list all Linux and Windows partitions on startup, but Linux booting fails.

How do I get my Linux back?

spuzzzzzzz 02-12-2004 09:06 PM

You have to reinstall the linux bootloader. The method of reinstallation depends on whether you were using GRUB or LILO. Do you remember which one you were using?

RIB 02-13-2004 07:57 AM

I'm not sure. I don't think it was either one of them.

At first I had just Win98. Then I installed Red Hat 8 on a separate drive, using a Linux boot diskette and two CD's. I followed a wizard throughout the installation that managed the partitioning of my second hard drive and made my system a dual boot.

At startup I would get a selection screen with a Red Hat bitmap, allowing me to choose between Win98 and Red Hat 8.

After re´nstalling Windows, the selection menu disappeared.

axelf 02-13-2004 09:28 AM

My "Mandrake"-way for this problem was to boot the linux-installation via a boot cd or disk. Back in Linux you will have in your X enviroment (KDE, Gnome..) somewhere a menu for changing the boot sequences. After running this tool the boot menu will be back. Maybe it will be enough just to type in "lilo" in a shell..
I think Red Hat will handle the problem in an similiar way.

Axel

spuzzzzzzz 02-13-2004 04:37 PM

I think RH uses GRUB, but I'm not sure. Try this method (if you don't have GRUB, it won't do anything):

1) use a boot disk to get into your linux system.
2) log in as root
3) type "fdisk -l" and check which partition your boot partition is (probably /dev/hdb1 or something)
4) type "grub". You will get a prompt like this:

grub> root (hd1,0)
grub> setup (hd0)
grub> exit

you might need to change the first command, depending on where your boot partition is. For /dev/hda1, you need (hd0,0), for /dev/hdb2 you need (hd1,1) etc.

Thats it. Reboot and GRUB should be reinstalled. It is possible but unlikely that you will need to alter your /boot/grub/grub.conf file. Don't worry about it for now.

RIB 02-16-2004 04:40 AM

Alright, thanks, it sounds like a good idea.

But where do I get a good boot disk from? The one I made when I was installing RH in the first place, only allows me to reinstall RH or to overwrite it with a rescue disk image (which I don't have).

michaelk 02-16-2004 05:01 AM

RH default bootloader is grub.

If you installed RH with CDs then boot the 1st to rescue mode. Your root partition will be mounted at /mnt/sysimage. To reinstall grub as before:
chroot /mnt/sysimage
grub-install

If you still have the CD's you can create another boot disk. You can download toms boot root disk from the web.

BTW it would be a good idea to create a boot floppy disk using the mkbootdisk command once RH is running again.

spuzzzzzzz 02-16-2004 05:03 AM

EDIT: NEVER MIND. DON'T DO THIS
You can always use a slackware bootdisk. Go to http://slackware.com/getslack/ and choose a mirror. CD to slackware-current/bootdisks and download bare.i. To create the image in windows, you will also need one of the RAWRITExx.EXE's. At the boot prompt, you will need to enter "mount root=/dev/hdXX" where hdXX is your root (/) filesystem. It will probably be /dev/hdb2.

spuzzzzzzz 02-16-2004 05:24 AM

Quote:

chmod /mnt/sysimage
I think that should be "chroot /mnt/sysimage"
Apart from that, follow michaelk's advice instead of mine - it's simpler.

michaelk 02-16-2004 05:39 AM

spuzzzzzzz
Thanks.. I'm still half asleep. I've corrected my orginal post.

RIB 02-16-2004 08:58 AM

It worked! Thanks a lot!

I booted from the first RH CD, ran the chroot command, after that I discovered with fdisk that the RH boot partition was in /dev/hdb2.
Then I used "grub" and just blindly followed the commands spuzzzzzzzzzzzz suggested.

Allthough I don't really understand what
Quote:

grub> root (hd1,1)
and
Quote:

grub> setup (hd0)
actually do.

Thanks again, guys!

spuzzzzzzz 02-16-2004 05:20 PM

root (hd1,1) tells grub that the root partition (/) is the second partition of the second disk.
setup (hd0) tells grub to install itself to the MBR of the first disk. When GRUB writes itself to the mbr of the first disk, it replaces the windows loader so that your computer won't boot automatically into windows.


All times are GMT -5. The time now is 01:17 AM.