Grub is not recognizing Windows
Hi List, After installing Scientific Linux on a machine, Grub is not recognizing already existing Windows, thus it is impossible to get to Windows after that. But that is not occuring when installing SuSE, everything is ok in Grub. What can be the reason, and what should be done about that? Note: I don't have direct access to that machine, but can ask a friend all questions and details you might be interested in. Thank you very much Cheers, Sergey -- Sergey Mkrtchyan, Scinetific Researcher, Department of Molecular Physics, Faculty of Physics, Yerevan State University
On Wednesday 04 October 2006 13:17, Sergey Mkrtchyan wrote:
After installing Scientific Linux on a machine, Grub is not recognizing already existing Windows, thus it is impossible to get to Windows after that. But that is not occuring when installing SuSE, everything is ok in Grub.
What can be the reason, and what should be done about that? Sergey, All that needs to be done about that is to add the following three lines to the file /boot/grub/menu.lst as root:
###Don't change this comment - YaST2 identifier: Original name: windoze### title windoze chainloader (hd0,0)+1 That is, assuming windoze is on the first partition first drive.... The installer code (yast in the case of Suse) sets up the menu.lst file for grub based on probing. If the installer (for Scientific Linux??) in your case does not configure menu.lst for you, then you will need to do that yourself. Hope this helps you. :) -- Kind regards, M Harris <><
M Harris wrote:
Sergey, All that needs to be done about that is to add the following three lines to the file /boot/grub/menu.lst as root:
###Don't change this comment - YaST2 identifier: Original name: windoze### title windoze chainloader (hd0,0)+1
That is, assuming windoze is on the first partition first drive....
Well, thank you very much. But how can I check that it is the first partition? Actualy he has C: and D: for windows partitions and windows is installed on C:, so I guess that it is his first partition. Why I am saying so, because on my machine (SuSE 10.0) I do also have "chainloader (hd0,0)+1" string in my /boot/grub/menu.lst, but my "cfdisk" shows that the drive on which my Windows is (C: again) is hda1. I will ask him to check that out, and will say what the result is.
The installer code (yast in the case of Suse) sets up the menu.lst file for grub based on probing. If the installer (for Scientific Linux??) in your case does not configure menu.lst for you, then you will need to do that yourself.
Hope this helps you. :)
Yes, it does! Thank you very much again. Best regards, Sergey
On Wednesday 04 October 2006 15:21, Sergey Mkrtchyan wrote:
on my machine (SuSE 10.0) I do also have "chainloader (hd0,0)+1" string in my /boot/grub/menu.lst, but my "cfdisk" shows that the drive on which my Windows is (C: again) is hda1.
Yes, that is normal. The chainloader command numbers the disks from 0, and the linux driver convention is to number the partitions from 1. So, your first hard disk is /dev/hda and your first partition of your first hard disk is /dev/hda1. But, the first partition of the first drive for chainloader (probably where windoze lives) is hd0,0. -- Kind regards, M Harris <><
M Harris wrote:
Yes, that is normal. The chainloader command numbers the disks from 0, and the linux driver convention is to number the partitions from 1. So, your first hard disk is /dev/hda and your first partition of your first hard disk is /dev/hda1. But, the first partition of the first drive for chainloader (probably where windoze lives) is hd0,0.
Let me put it little theoretical. So if, for example, cfdisk shows that my Windows sits on hda5, which is my C: drive, I should add (hda4,0)+1 in my menu.lst? Thanks, Cheers, Sergey -- Sergey Mkrtchyan, Scinetific Researcher, Department of Molecular Physics, Faculty of Physics, Yerevan State University
On 10/4/06, Sergey Mkrtchyan wrote:
M Harris wrote:
Yes, that is normal. The chainloader command numbers the disks from 0, and the linux driver convention is to number the partitions from 1. So, your first hard disk is /dev/hda and your first partition of your first hard disk is /dev/hda1. But, the first partition of the first drive for chainloader (probably where windoze lives) is hd0,0.
Let me put it little theoretical. So if, for example, cfdisk shows that my Windows sits on hda5, which is my C: drive, I should add (hda4,0)+1 in my menu.lst?
(hd0,4)+1 Grub (not the chainloader) number the hard drives from 0, i.e. hd0 for hda, hd1 for hdb, etc. and the partition counting starts from 0 as well, thus hda1 is hd0,0 in GRUB terms. As hdb4 will be hd1,3. Cheers -- -- Svetoslav Milenov (Sunny) Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit operating system originally coded for a 4-bit microprocessor by a 2-bit company that can't stand 1 bit of competition.
Sunny wrote:
(hd0,4)+1
Grub (not the chainloader) number the hard drives from 0, i.e. hd0 for hda, hd1 for hdb, etc. and the partition counting starts from 0 as well, thus hda1 is hd0,0 in GRUB terms. As hdb4 will be hd1,3.
Cheers
Thanks, Sunny. Now I see why for hda there is always hd0 in Grub. Thanks once more, Sergey -- Sergey Mkrtchyan, Scinetific Researcher, Department of Molecular Physics, Faculty of Physics, Yerevan State University
Sunny wrote:
(hd0,4)+1
Grub (not the chainloader) number the hard drives from 0, i.e. hd0 for hda, hd1 for hdb, etc. and the partition counting starts from 0 as well, thus hda1 is hd0,0 in GRUB terms. As hdb4 will be hd1,3.
Cheers
Thanks, Sunny. Now I see why for hda there is always hd0 in Grub. AFAIK (hd0) does not always have to be /dev/hda1, because grub does not distinguish between SCSI and ATA devices. You have to look in /boot/grub/device.map to see how grub interprets your storage devices. I seem to recall someone reporting in this list that Linux labels an SATA device as a SCSI, so if you are booting off one of those, it is possible
On 04/10/06 16:21, Sergey Mkrtchyan wrote: that (hd0) would be /dev/sda.
On Wednesday 04 October 2006 16:06, Sergey Mkrtchyan wrote:
Let me put it little theoretical. So if, for example, cfdisk shows that my Windows sits on hda5, which is my C: drive, I should add (hda4,0)+1 in my menu.lst? No, not quite, but you're getting closer....
But first, let's talk about a more real theoretical scenario, ok? Let's say that windoze is on the second partition... as about half of my systems fall into this category. My first partition contains what will eventually be mounted as /boot. My second partition is windoze, my third will be mounted as SWAP, and my fourth partition is EXTENDED... and all the rest of my partitions (for /home, /tmp, /var, /opt, /usr, and /local) are logical partitions. Looks like this: /dev/hda1 /boot /dev/hda2 windoze W95 Fat32 /dev/hda3 SWAP /dev/hda4 (extended) /dev/hda5 / /dev/hda6 /home etc Now, how do we tell grub to find windoze? title windoze chainloader (hd0,1)+1 The disk is hd0 (corresponds to /dev/hda) and the partition is 1 (corresponds to /dev/hda2)... ok? Now then, the reason your theoretical scenario isn't too good to talk about is that windoze will never be on /dev/hda5 because it needs to be in a primary partition. Linux on the other hand can be anywhere these days (using grub) so we usually put windoze on the first primary partition on the first disk and place Linux behind it. That way windoze (like a little kid in line) thinks its the most important one because it gets to be first. ;-) Just for completion sake... the /boot/grub/menu.lst command used to look like this: (for the above example) title windoze root (hd0,1) chainloader +1 -- Kind regards, M Harris <><
M Harris wrote:
On Wednesday 04 October 2006 16:06, Sergey Mkrtchyan wrote:
Let me put it little theoretical. So if, for example, cfdisk shows that my Windows sits on hda5, which is my C: drive, I should add (hda4,0)+1 in my menu.lst? No, not quite, but you're getting closer....
But first, let's talk about a more real theoretical scenario, ok?
Sure, I like thoery. I see in your case it turned to be more of a practive ;)
Let's say that windoze is on the second partition... as about half of my systems fall into this category. My first partition contains what will eventually be mounted as /boot. My second partition is windoze, my third will be mounted as SWAP, and my fourth partition is EXTENDED... and all the rest of my partitions (for /home, /tmp, /var, /opt, /usr, and /local) are logical partitions. Looks like this: /dev/hda1 /boot /dev/hda2 windoze W95 Fat32 /dev/hda3 SWAP /dev/hda4 (extended) /dev/hda5 / /dev/hda6 /home etc
Now, how do we tell grub to find windoze?
title windoze chainloader (hd0,1)+1
The disk is hd0 (corresponds to /dev/hda) and the partition is 1 (corresponds to /dev/hda2)... ok?
Now then, the reason your theoretical scenario isn't too good to talk about is that windoze will never be on /dev/hda5 because it needs to be in a primary partition. Linux on the other hand can be anywhere these days (using grub) so we usually put windoze on the first primary partition on the first disk and place Linux behind it. That way windoze (like a little kid in line) thinks its the most important one because it gets to be first. ;-)
Just for completion sake... the /boot/grub/menu.lst command used to look like this: (for the above example)
title windoze root (hd0,1) chainloader +1
This time I did get it completely, thank you very very much for such a detaied explanation...I am sure, as soon as my friend gets to work, that will work for him. Thank you very much again Regards, Sergey -- Sergey Mkrtchyan, Scinetific Researcher, Department of Molecular Physics, Faculty of Physics, Yerevan State University
On Wednesday 04 October 2006 17:06, Sergey Mkrtchyan wrote:
M Harris wrote:
Yes, that is normal. The chainloader command numbers the disks from 0, and the linux driver convention is to number the partitions from 1. So, your first hard disk is /dev/hda and your first partition of your first hard disk is /dev/hda1. But, the first partition of the first drive for chainloader (probably where windoze lives) is hd0,0.
Let me put it little theoretical. So if, for example, cfdisk shows that my Windows sits on hda5, which is my C: drive, I should add (hda4,0)+1 in my menu.lst?
No, it would be (hd0,4)
participants (5)
-
Bruce Marshall
-
Darryl Gregorash
-
M Harris
-
Sergey Mkrtchyan
-
Sunny