LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2004, 08:50 PM   #1
RIB
LQ Newbie
 
Registered: Dec 2003
Posts: 23

Rep: Reputation: 15
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?
 
Old 02-12-2004, 09:06 PM   #2
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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?
 
Old 02-13-2004, 07:57 AM   #3
RIB
LQ Newbie
 
Registered: Dec 2003
Posts: 23

Original Poster
Rep: Reputation: 15
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.
 
Old 02-13-2004, 09:28 AM   #4
axelf
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
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
 
Old 02-13-2004, 04:37 PM   #5
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.
 
Old 02-16-2004, 04:40 AM   #6
RIB
LQ Newbie
 
Registered: Dec 2003
Posts: 23

Original Poster
Rep: Reputation: 15
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).
 
Old 02-16-2004, 05:01 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,928

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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.

Last edited by michaelk; 02-16-2004 at 05:37 AM.
 
Old 02-16-2004, 05:03 AM   #8
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.

Last edited by spuzzzzzzz; 02-16-2004 at 05:25 AM.
 
Old 02-16-2004, 05:24 AM   #9
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.
 
Old 02-16-2004, 05:39 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,928

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
spuzzzzzzz
Thanks.. I'm still half asleep. I've corrected my orginal post.
 
Old 02-16-2004, 08:58 AM   #11
RIB
LQ Newbie
 
Registered: Dec 2003
Posts: 23

Original Poster
Rep: Reputation: 15
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!
 
Old 02-16-2004, 05:20 PM   #12
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing Linux from Dualboot snutz411 Linux - Newbie 4 01-12-2005 11:12 PM
grub+dualboot with xp/linux linuxtesting2 Linux - General 5 11-15-2004 12:35 PM
Windows ME and Linux dualboot piggysmile Linux - Newbie 1 04-28-2004 08:24 AM
dualboot linux only lynxgogo Linux - General 27 02-01-2004 09:57 AM
dualboot between linux distro's fitz9948 Linux - General 4 01-10-2004 01:52 PM


All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration