LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Another GRUB Problem... (http://www.linuxquestions.org/questions/linux-software-2/another-grub-problem-454866/)

tendonut 06-14-2006 09:12 PM

Another GRUB Problem...
 
Yes, it's another GRUB Problem. The only difference between mine is I am doing something rather screwy to prevent writing to the MBR of the drive with the Windows installer on it.

This is my partition setup:

hda1 (120GB) = Windows (NTFS)
hda5 (1GB) = swap
hda6 (15GB) = /
hda7 (17GB) = /home

hdb1 (160GB) = NTFS (Not touching this, it's for Windows ONLY)

Right now, I have XP and SuSE 10.1 installed on one hard drive, and the second hard drive is used strictly for mass storage like ISOs and Music (LAN party stuff). What I did, was install GRUB on the MBR Of the SECOND hard drive to avoid overwriting the one of the first drive, because apparently, Windows throws a shitfit when you change that. Then, after installing SuSE on the first drive, I configured the BIOS to boot to the second hard drive first, which accessed the boot loader there, then booted SuSE on the main drive no problem. The problem shows up when I try to boot WINDOWS using GRUB. I get this error...

chainloader (1,0)+1

Then, I changed the entry to something I saw on a forum that seemed to tailor my needs

title windows
root (hd0,0)
makeactive
chainloader +1

Still, no luck. This time, It gave me an error that said that (hd0,0) was an unknown file system.

I know these are very common when dual booting. So what I did, was change the (1,0) to (0,0). Same error. Any ideas of what I should do in this situation?

jonr 06-14-2006 10:30 PM

Would this be helpful?

http://forums.suselinuxsupport.de/in...showtopic=7820

I'm far from being skilled in GRUB and boot issues in general, but I have spent the last two days practically non-stop wrestling with GRUB problems and getting my Xubuntu Dapper system running again, so I definitely hope you will solve your problem with less effort (and report back what you had to do to fix it).

Good luck!

fedora4002 06-14-2006 11:09 PM

My guess is that you have set your system to boot from second hard drive. For GRUB, the hard drive that boot is alway starts with hd0. So you should refer hda1 as
(hd1, 0)

(hd0,0) in fact refer to your storage sytem which is unbootable so that it gives an error.

WhatsHisName 06-14-2006 11:39 PM

Windows will only boot from the first BIOS drive.

But you should be able to fool it with the grub map function: http://www.gnu.org/software/grub/man...OS_002fWindows

With the BIOS boot order set to boot the “second” drive first, try something like this:

/boot/grub/menu.lst:
Code:

title win
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1
makeactive
boot


jonr 06-15-2006 12:03 AM

GRUB will boot Linux from any drive. I have two of my three hard drives each bearing a different Linux distro, with the same /boot/grub/menu.lst on each. I can choose, from either drive, to boot it again, or to boot the other one. I don't know if that's a good way to set things up, but it seemed reasonable to me, and it works; so I'm happy with it for the moment.

(Sorry if this verges on being off-topic.)

tendonut 06-15-2006 06:43 AM

*Grabs monitor and start pwning it* Thanks everyone. I got it. I had no idea that GRUB considers the first BIOS drive (Not physical drive) to be hd0. If I knew that, I would have probably figured this out on my own. I rolled out of bed, saw all the responses, and was able to get back into windows and boot up AnaloxX Proxy before heading to work at the schools. Everything is blocked there, but the kids are done for the year...wth is that?

pixellany 06-15-2006 08:14 AM

Quote:

Originally Posted by fedora4002
My guess is that you have set your system to boot from second hard drive. For GRUB, the hard drive that boot is alway starts with hd0. So you should refer hda1 as
(hd1, 0)

(hd0,0) in fact refer to your storage sytem which is unbootable so that it gives an error.

Huh??

In grubspeak, (hd0,0) is drive 1, partition 1 Same as hda1

hd1,0 is the same as hdb1

tendonut 06-15-2006 09:14 AM

I think what he meant is the "first drive" is considered the drive that the machine boots to. So even though you'd think that (1,0) is hdb1, because I am booting to the second hard drive, Grub considers hdb1 to be (0,0). It doesn't seem very often that someone would try to BOOT to the second hard drive while the OS's is on the first. Regardless, marking the drive as (1,0) and remapping the drive labels, made Windows AND SuSE boot perfectly. And I didn't even have to mess with the first hard drive's MBR

justin_bloom 06-15-2006 10:29 AM

grub should work fine in mbr of windows disk
 
Just as a note, I have GRUB installed in the MBR of my Windows XP drive and I haven't had any problems. It boots both my Windows XP partition and my /boot partition for Redhat very well.

tendonut 06-15-2006 04:10 PM

Thats good to know. I just heard horror stories about WinXP and virus scanners and the like. I preferred to avoid it. Thats why the bootloader was on the secondary MBR

pixellany 06-15-2006 04:32 PM

Quote:

Originally Posted by tendonut
I think what he meant is the "first drive" is considered the drive that the machine boots to. So even though you'd think that (1,0) is hdb1, because I am booting to the second hard drive, Grub considers hdb1 to be (0,0).

OOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!! (Sound of the light turning on....;) )

So--even though EVERYTHING ELSE in Linux drive numbering, partition numbering, etc. is logical, GRUB is in its own little world.......undisturbed by logic and reason.......

paul_e_t 06-16-2006 03:04 PM

Quote:

Originally Posted by pixellany
OOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!! (Sound of the light turning on....;) )

So--even though EVERYTHING ELSE in Linux drive numbering, partition numbering, etc. is logical, GRUB is in its own little world.......undisturbed by logic and reason.......


OK, so in order to boot both Linux and M$ XP I'll have to take a course in both plus computer booting and then in GRUB. Hell, after several years I'm just going back to M$ and pay my money for a sys that works out-of-the-box. I'm just sick and tired of all the great hoopla and then not being able get things done because of spending much time trying to run linux. On the Worldcommunitygrid I have two systems running, one Linux (Centos4.3) and one XP. I get credit for XP but Linux runs in its own little world without adding it's points or completed tasks to the team score. I'm going out and buy an XP disk before the Vista charge socks me because XP will be my last OS. Run my business on Linux....NO WAY (some med people said the same thing).

jonr 06-16-2006 04:18 PM

I'm sorry you feel so discouraged (and evidently angry, too). I've experienced the same thing many times in the three years since I replaced MS Windows with Linux--knowing nothing whatever about Linux. I've been so abusive to my keyboard I've had keys fly across the room and I've put a big dent in it. I've even slapped the box a couple of times not caring if the hard drives were ruined or not, I felt so mad and frustrated.

My big complaint these three years is that despite trying to make Linux user-friendly, it is far from being there yet. I am extremely annoyed by the attitude of users who in effect say, "If you don't want to become a computer geek, use Windows." Well, the reason I don't use Windows is twofold:

(1) It will never be safe.

(2) And this is the really important reason: I feel Microsoft is an immoral, predatory company pushing an inferior product off onto 95% (supposedly) of the world's computers. I'm delighted to see the slow but steady erosion of their customer base, principally in government but also in business.

I don't blame you one bit for going to Win XP at this point. It just makes me sad.

Twenty years ago today, June 16, 1986, I decided to quit drinking. I have kept that promise.

My promise never to use Windows again voluntarily is just as stern.

Just my point of view, and just about myself. I don't condemn anybody for using Windows and am totally sympathetic to their good reasons for it.

Edited to correct faulty arithmetic! (Twenty years ago was 1986, not 1996. I think.)

archtoad6 06-19-2006 11:19 AM

Quote:

Originally Posted by pixellany
OOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!! (Sound of the light turning on....;) )

So--even though EVERYTHING ELSE in Linux drive numbering, partition numbering, etc. is logical, GRUB is in its own little world.......undisturbed by logic and reason.......

I used to think the same thing, it really pissed me off that not only does GRUB use 0-based numbering, but it also doesn't follow the beautiful cabling to system name correspondence that we are used to. I used to suspect that it was a case of RMS's huge & bruised ego taking a petty revenge.

Then I read this:
http://www.linuxquestions.org/questi...57#post2293757

It appears that GRUB can't know about the cabling & is dependent on what the BIOS tells it.

In this light, perhaps even the oddball nomenclature makes sense because it emphasizes the difference.


All times are GMT -5. The time now is 08:18 AM.