LinuxQuestions.org
Review your favorite Linux distribution.
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 11-08-2003, 08:45 PM   #1
euaruksakul
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Rep: Reputation: 0
Boot loader problem


Hello,

I used to have 2OS in my computer, Redhat LINUX and WindowsXP. Last week I reinstall WinXP then my boot loader was gone. I tried to install boot loader back from the Redhat CD but I got message

'No kernel packages were installed on your system. Your boot loader config will not be changed'.

Then I tried using rescue mode. type

chroot /mnt/sysimage
grub -install /dev/hda

looked like the result is ok. Now I have grub boot loader. However, when I rebooted my coputer, I got the message

root hd0,1
filesystem type unknown, partition type 0xF
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/hdc=ide-scsi
Error 17: cannot mount selected partition

the message appear in broken letters. Then there are options to choose between DOS and LINUX. I can boot DOS (Windows) but not LINUX. Same error message (filesystem type unknow, partition type 0xF, cannot mount selected partition) appear again.

my linux partition is on /dev/hda3, windows on /dev/hda1 (I can see from fdisk -l). The * is on /dev/hda1. Is that correct?

Thank you very much.
Chanan Euaruksakul
 
Old 11-08-2003, 09:22 PM   #2
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
You haven't defined all of the partitions on your hard drive. I personally call that a partition map.

Last edited by Eqwatz; 11-10-2003 at 03:06 PM.
 
Old 11-08-2003, 09:29 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
The fact that you can get in using rescue mode is good and means that linux is not hosed.
After you boot into rescue mode and chroot to /mnt/sysimage....
Type: rdev so you can verify that the root partition is indeed on /dev/hda3
If you know where the root partition is you can proceed to repair the GRUB as follows...
Type:grub to get into the grub utility.
Type: root (hd0,2) which is grub speak for the first hard drive and the third partition of that drive. If you got it right, you will see a message like this..... Filesystem type is Ext2fs, partition type is 0x83.
Next type: setup (hd0)
Then type: quit to exit the grub utility.
Then reboot to try it.
 
Old 11-08-2003, 10:03 PM   #4
euaruksakul
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I just tried your advice. I got '/dev/hda3 /' from rdev. And after grub, root (hd0,2) give exactly what you said. setup (hd0) told no error message. However, I still cannot solve the problem. Do you have any suggestion? If I have to reinstall linux, do I have to remove the boot loader before?

Thank you very much
Chanan
 
Old 11-08-2003, 10:16 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Ok maybe you do have a problem with the file system. Try the e2fsck routine with your system unmounted. If you plan to reinstall, I would try an upgrade first to see if that fixes it.
You don't have to mess with the old boot loader if you do reinstall.

Last edited by homey; 11-08-2003 at 10:17 PM.
 
Old 11-09-2003, 10:53 PM   #6
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Ibid.

Last edited by Eqwatz; 11-10-2003 at 03:06 PM.
 
Old 11-10-2003, 12:10 AM   #7
euaruksakul
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I've check my linux partition type with

grub

>root (hd0,2)

and it showed that the partition type is 0x83. Shoud be the correct type?

Thanks a lot
Chanan
 
Old 11-10-2003, 02:20 PM   #8
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30


If you were reading this before, I was confused, I double checked.

(hd0,0) is the first partition. Did you keep a partition map of your drive?

If so, what is it?
(hd0,0)= what?
(hd0,1)= what?
(hd0,2)= what?
and so on. I never have been able to keep everything straight, Sorry.

grub stage 1 resides in the MBR; stage 2 resides in the MBR; stage 1_5 is /boot/grub/grub.conf; Hey, wait a minute. If your machine will boot linux, or you can go on the internet with another machine why don't you info grub LIKE I JUST DID? Or http://www.google.com/linux info grub.

Another thing, XP wants to be the first operating system on the hard drive. If you moved stuff around with partition magic or anything, put it back. If you are doing a triple boot, things get pretty hinky.

I should not have made any resposes to your post until you gave a partition map. I have been confused and assumed things. Sorry.


Last edited by Eqwatz; 11-10-2003 at 03:07 PM.
 
Old 01-12-2007, 09:03 PM   #9
pxumsgdxpcvjm
Member
 
Registered: Aug 2005
Posts: 235

Rep: Reputation: 30
You need to edit grub.conf

I just reinstalled Windows XP to find that it had overwritten the MBR and my Grub bootloader with it. Which I think is the same problem you had. The info on this thread helped me, but it is incomplete.

Boot from the FC disk, go into rescue mode. Now fdisk -l to see what partition you need to boot from (in my case it was /dev/sda3, the third partition on my one and only hard drive. Then you need to edit /mnt/sysroot/boot/grub/grub.conf. In this file you will need to set any erroneous references to (hd0,0) to the correct (hd0,2), which I know from fdisk listing I just mentioned (note the 2 represents the third partition indexed from 0). And that is it. I rebooted and got into Fedora no problem.

If this doesn't work for you could try copying your important files to you windows partition with explore2fs and then try reinstalling or upgrading you linux installation.
 
Old 01-13-2007, 10:31 AM   #10
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
XP ate Grub installation

Actually, if the partition layout is identical to the original; the only thing necessary to do is run grub. This will replace the MBR with the grub boot loader.

**You have to be careful about running Grub from a rescue disk. Print out the portion of the guide which relates to specifically the parameters that you use to inform the program as to the location of the root of the Linux installation; the location of the /boot directory and the location of the program on the hard disk. If it is too late at night; get some rest, as you can end up making the same mistake over and over again--driving you right up the wall.

If the partitions have changed in any way, then the grub "menu.lst" (in Debian and Debian related distros,) or grub.conf (in the others) has to be edited to reflect the layout. The thing is that the grub installation has to be in the MBR of the first Disk (that is if you want to boot into Grub every time.)

I had many problems recreating a set-up on a machine with six discs after changing out the motherboard. It would appear that SIS chips can still cause "little problems" from time to time--even now. Either that or it had been so long that I had forgotten a whole bunch about Grub. I was forced to put a /boot partition as one of the primary partitions in the beginning of the first hard disk on the system; else it just wouldn't boot. The original layout--which worked on a VIA (and Intel) chipset--simply refused to work on a SiS chipset (unless it was because I was holding my lips wrong.)

I have had as many as 7 different installations of different OS-es booting on this machine--but it takes some tinkering, and a lot of reading to get it all to work. When doing multiple boots with different Microsoft products, one has to "hide" all of the other MS-related partitions while doing the installation and boots. This is taken care of by backing up the MBR before re-installation/installation of any MS product (and restoring it afterwards hiding all of the partitions using fdisk/cfdisk (or one of the others) and adding the commands to the entries in the grub/grub.conf or grub/menu.lst.) These things are covered in the different Guides (http://www.google.com/linux is your friend.)
 
Old 01-13-2007, 12:31 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I believe there has been an extended partition introduced since Red Hat was installed.

Your /boot/grub/grub.conf should read like this


Code:
title Windows
root (hd0,0)
chainloader +1
boot

Title Red Hat in hda3
root (hd0,2)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd.img-2.4.20-8.img
boot
It is the digit in red that you need to correct.
 
  


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
Problem with Boot up loader blackman890 Mandriva 1 04-09-2005 08:12 PM
problem with boot loader makaveli0129 Mandriva 1 11-02-2004 12:20 AM
boot loader problem boombastic Linux - Newbie 4 08-21-2004 04:00 PM
Problem with boot loader alexr186 Linux - Software 4 06-17-2004 09:43 AM
boot loader problem rzee Linux - Newbie 12 02-14-2003 12:49 PM


All times are GMT -5. The time now is 07:10 AM.

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