# Two Hard Disks and GRUB location /dev/hdb6



## zillah (Jun 6, 2005)

I have got two HDs, each one 40 GB. Connected to one cable to IDE0 (one hard disk master and the other is slave).

*A- First HD (master or hda) is divided into :*
1/A- 15 GB NTFS for XP.
2/A- 5 GB FAT32 for Storage.
3/A- 20 GB NTFS for win2003.

I had already installed both windows (XP and 2003).

*B- Second HD (slave or hdb) is divided into :*
1/B- 20 GB Solaris (hdb1,,,to be installed later).
2/B- 5 GB NTFS for Storage (hdb2).
3/B- 500 MB Linux swap (hdb3).
4/B- 14.5 GB ext3 Linux (hdb4).

When I started to install Linux FC4, I reached the option for :

*Install Boot loader record on:*
/dev/had Master Boot Record (MBR)

/dev/hdb*6* First sector of boot partition.

Why do I have hdb*6*,,,,it should be hdb*4*,,,,Am I right ?


----------



## saikee (Jun 11, 2004)

If you make any logical partition it always starts from the 5th position.

The first hdb1 to hdb4 are reserved for primary or extended partitions. One primary has to be given up to exchange for an extended partition. There can be only one extended partition permitted in any hard disk.

As Soloris uses a internal slices which may appear to be logical partitions inside an extended partition there is a potential risk of partition table corruption, so proceed with caution and don't put anything important into that disk.


----------



## zillah (Jun 6, 2005)

> If you make any logical partition it always starts from the 5th position.


Yes that is fine,,,,just I forgot to mention that all the partitions are primary.



> As Soloris uses a internal slices which may appear to be logical partitions inside an extended partition


This partition has not formatted yet,,,just I assigned a place (area) for future Soalris installation.



> so proceed with caution and *do put *anything important into that disk.


Did you mean do not put ?


----------



## saikee (Jun 11, 2004)

Yes don't put anything important there yet. (I was hastly writing the reply when my colleague dragged me out for a lunch walk.)

There can be only one extended partition and Linux does have a problem in searching partitions with Solaris and BSD co-existing with an extended partition because their partition types are supported. A typical error would be "partition not ending at the boundary". My problem is always with Solaris and BSD together but I have been informed by some forum members Solaris has worked fine with one Linux or two toegther.

If your FC4 claims its root partition in hda6 then it is possible that you may have allowed it to installed in multiple partitions. The Red Hat family is very keen on separate /boot partition and the only way it can make it happen is to convert your hdb4 into an extended partition so that hda5 is /boot and hds6 is "/". The extended partition hdb4 is just in name only showing the beginging and finishing points of the logical partitions.

I have never met a primary partition numbered 5 or higher. So check what you have done. Load a Live CD and type "fdisk -l" to find out. Don't take my word for it. 

Show us the content of "fdisk -l" to back up your claim that your hda6 is a primary partition!


----------



## zillah (Jun 6, 2005)

> The Red Hat family is very keen on separate /boot partition and the only way it can make it happen is to convert your hdb4 into an extended partition so that hd*a5* is /boot and hd*s6* is "/".


You meant hd*b5* instaed of hd*a5*,,,,hd*b6* instead of hd*s6*

Definitly you are right,,,I was not aware of that unless I have seen *fdisk -l*,,,,But why does the number start form 5 ,,,,where is number 4 ?


```
[email protected][knoppix]# [B]fdisk -l[/B]

Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1959    15735636    7  HPFS/NTFS
/dev/hda2            1960        2612     5245222+   c  W95 FAT32 (LBA)
/dev/hda3            2613        4865    18097222+   7  HPFS/NTFS

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        2611    20972826   bb  Boot Wizard hidden
/dev/hdb2            2612        3264     5245222+   c  W95 FAT32 (LBA)
/dev/hdb3            3265        4865    12860032+   5  Extended
/dev/hdb5            3265        3328      514048+  82  Linux swap / Solaris
/dev/hdb6            3329        4865    12345921   83  Linux
```
I have got another problem,,,,When I finished installation both windows and Linux,,,I have been greeted with grub,,,,first I booted winodws OS,,,then I restared machine,,,the greeting of grub disappered,,,,I have received this message :



> [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.]
> 
> grub>


----------



## zillah (Jun 6, 2005)

> The Red Hat family is very keen on separate /boot partition and the only way it can make it happen is to convert your hdb4 into an extended partition so that hd*a5* is /boot and hd*s6* is "/".


You meant hd*b5* instaed of hd*a5*,,,,hd*b6* instead of hd*s6*

Definitly you are right,,,I was not aware of that unless I have seen *fdisk -l*,,,,But why does the number start form 5 ,,,,where is number 4 ?



> Load a Live CD and type "fdisk -l" to find out.




```
[email protected][knoppix]# [B][COLOR="Red"]fdisk -l[/COLOR][/B]

Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1959    15735636    7  HPFS/NTFS
/dev/hda2            1960        2612     5245222+   c  W95 FAT32 (LBA)
/dev/hda3            2613        4865    18097222+   7  HPFS/NTFS

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        2611    20972826   bb  Boot Wizard hidden
/dev/hdb2            2612        3264     5245222+   c  W95 FAT32 (LBA)
/dev/hdb3            3265        4865    12860032+   5  Extended
/dev/hdb5            3265        3328      514048+  82  Linux swap / Solaris
/dev/hdb6            3329        4865    12345921   83  Linux
```


```
[email protected][knoppix]# [B][COLOR="Red"]cat /mnt/hdb6/boot/grub/menu.lst[/COLOR][/B]
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,5)
#          kernel /boot/vmlinuz-version ro root=/dev/hdb6
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd1,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd1,5)
        kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.11-1.1369_FC4.img
title WinXP and 2003
        rootnoverify (hd0,0)
        chainloader +1
```
I have got another problem,,,,When I finished installation both windows and Linux,,,I have been greeted with grub,,,,first I booted winodws OS,,,then I restared machine,,,the greeting of grub disappered,,,,I have received this message :



> [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.]
> 
> grub>


----------



## saikee (Jun 11, 2004)

OK the information is good

Having a Grub prompt is the best deal. That means in the Grub menu by pressing "c" you can get it any time you want.

The Fedora's /boot/grub/menu.lst looks alright to me.

In Grub prompt you can boot Fedora or Windows manually using the instructions provided by the /boot/grub/menu.lst, starting with the "root" statement and finish by a "boot" statement.

Here is some examples of using a Grub prompt

(a) To see thepartitioning scheme of the first hard disk (hd0) and then the second hard disk (hd1)

```
geometry (hd0)
geometry (hd1)
```
(b) To boot up Windows manually (using root or rootnoverify is same here)

```
root (hd0,0)
chainloader +1
[color=blue]boot[/color]
```
(c) To boot up Fedora quickly

```
root (hd1,5)
configfile /boot/grub/menu.lst
```
(d) To ask Grub to inform you which partition has /boot/grub/menu.lst

```
find /boot/grub/menu.lst
```
(e) To ask Grub to display the content of /boot/grub/menu.lst, after knowing it is in (hd1,5) 

```
cat (hd1,5)/boot/grub/menu.lst
```
(d) Having got Grub display Grub's menu.lst you can follow the displayed instructions, line by line, to boot up Fedora manually

```
root (hd1,5)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
[color=blue]boot[/color]
```
Can you feel the power of Grub?


----------



## zillah (Jun 6, 2005)

What should I add (configure) to let grub to boot FC4 and Windows  without typing anything (normal boot) ?


----------



## saikee (Jun 11, 2004)

Is your question in Post #8 relevant now after I replied with Post #7?

The Fedora Grub menu.lst should boot both systems. If it doesn't do it manually, especially check the information from "geometry (hd0)" to ensure it matches that in hda disk, otherwise you could have the booting order confused. (hd0) is the first bootable disk the BIOS tells Grub.

---------------------------------

Here the explanation of why logical partition always starts at hda5

Linux's naming a hard disk is better than MS systems in that the first 4 numbers are reserved for the primary partitions, regardless if some of them are not used, because the maximum number of primaries in any hard disk is 4. 

The moment a logical partition is crerated its could-have-been primary partition will immediated become an "extended partition". Therefore if you start a new hard disk with a logical partition it will be hda5. hda1 is turned into an extended partition which is in name only because it has no storage of its own. It is just for denoting the beginning and finishing locations of the hard disk for a "set" of logical partitions that can run into hda63 maximum. If you have space and create a primary partition it will be hda2. Position wise following hda63!

There can only be one extended partition. All logical partitions must be in consecutive order and continuous following each other. If you delete one in the the middle all the logical partition following will automatically shift up by one and the deleted space is dead and unavilable.

You can find all these out in using the fdisk program in Fedora.


----------



## zillah (Jun 6, 2005)

> especially check the information from "geometry (hd0)" to ensure it matches that in hda disk, otherwise you could have *the booting order confused*. (hd0) is the first bootable disk


I think so that the booting order confused.

This is the out put :

grub > geometry (hd0)
drive 0x80: C/H/S = 1023/255/63, The number of sectors = *78165360*, LBA
Partition num :0 , Filesystem type unknown, partition type 0xbb
Partition num :1 , Filesystem type is *fat*, partition type 0xc
Partition num :4 , Filesystem type *unknown*, partition type 0x82
Partition num :5 , Filesystem type is ext2fs, partition type 0x83

grub > geometry (hd1)
drive 0x81: C/H/S = 1023/255/63, The number of sectors = *78156288*, LBA
Partition num :0 , Filesystem type unknown, partition type 0x7
Partition num :1 , Filesystem type is *fat*, partition type 0xc
Partition num :2 , Filesystem type unknown, partition type 0x7

How can I avoid this confused ? Is this confusion normal (Am I doing any mistake).


----------



## zillah (Jun 6, 2005)

> Is your question in Post #8 relevant now after I replied with Post #7?


Whenever I boot the PC, I have to boot it manually (typing command) to boot to the desired OS,,,,I meant if we can avoid this by configuring menu.lst,,,,,


----------



## saikee (Jun 11, 2004)

It is clear to me now that your Windows disk is the second bootable disk.

You can try to boot up Windows by just altering the partition reference as 

```
root (hd[color=red]1[/color],0)
chainloader +1
boot
```
Let's us have confirmation that Windows boots OK first.

There are ways to cure the problem.

The menu.lst is the script file to "automate" the booting.  The idea is to know your system first and then configure to boot it automatically with /boot/grub/menu.lst. However if thing goes pear shape then to be able to boot it manually and know where has it gone wrong can save the hair from pulling out.

To come up the final cure I need to see your /boot/grub/device.map too. Can you list it here?

If your Fedora boots OK and Windows boots too once the partition reference has been adjusted then you can alter the menu.lst and regard it as the permanent solution.

It is quite common in adding a hard disk the Bios can swap the booting order without the user aware of the change.


----------



## zillah (Jun 6, 2005)

> It is clear to me now that your Windows disk is the second bootable disk.


I will try what you have suggested and let you know,,,let me ask you few questions:

Which is more accurate *fdisk -l* or *geometry (hd0)*,,,,because with "fdisk -l" command I can see that hdb is my second hard disk (slave) (4 partitions, two primarys and 2 logicals),,,while the output form geometry (hd0) is vice versa (it should be 3 primary partitions,,,,but mistakenly it gave me 4 partitions) *?*

```
---[B]Device Boot      Start         End      Blocks   Id  System[/B]
/dev/hdb1   *           1        2611    20972826   bb  Boot Wizard hidden
/dev/hdb2            2612        3264     5245222+   c  W95 FAT32 (LBA)
/dev/hdb3            3265        4865    12860032+   5  Extended
/dev/hdb5            3265        3328      514048+  82  Linux swap / Solaris
/dev/hdb6            3329        4865    12345921   83  Linux
```



> grub > geometry (hd0)
> drive 0x80: C/H/S = 1023/255/63, The number of sectors = 78165360, LBA
> Partition num :0 , Filesystem type unknown, partition type 0xbb
> Partition num :1 , Filesystem type is fat, partition type 0xc
> ...





> It is quite common in adding a hard disk the Bios can swap the booting order without the user aware of the change


I checked the BIOS it is fine. The order for booting devices are : Drive0, then Drive1, then Drive2, then Drive3.


----------



## saikee (Jun 11, 2004)

Both are correct.

Since both are 40Gb and you may be unable to tell which is which yourself, although anybody looking at the fdisk -l information would be left in do doubt that the two are not the same as the total number of bytes are different, indicating they are from different manyfacturers.

(hd0) is the first disk to be booted by the Bios. Grub got it from the Bios and wouldn't give a toss about where it comes from.

"fdisk -l" on the other hand reports the hard disk "sccording" to the IDE connection positions.

hda=master of first IDE channel
hdb=slave of first IDE channel

Your Bios has been instructed (shall we say inadertently during hardware addition) to boot hdb first.

"fdisk -l" information doesnot tell us which is the first disk to booted, although in a logical set up we would expect hda to be booted first. This is by no mean fixed as you can have a sata which you have a God-given right to instruct the BIOS to boot it first and Grub will end up a Sata as (hd0) on its hand. Is this logical to you?

As a final proof, since your Fedora boots then the file /boot/grub/device.map "must" have these statement inside

```
(hd0) /dev/hdb
(hd1) /dev/hda
```
Remember I have requested to see this file in my last post?

The computer is the dumbest thing (as it can't think for itself) in the world but it cannot lie, can it ?


----------



## zillah (Jun 6, 2005)

> Here is some examples of using a Grub prompt
> (b) To boot up Windows manually (using root or rootnoverify is same here)
> 
> You can try to boot up Windows by just altering the partition reference as
> ...


How can I write the above lines with " grub>" prompt or I need to add them to /grub/menu.lst ?


----------



## zillah (Jun 6, 2005)

> To come up the final cure I need to see your /boot/grub/device.map too. Can you list it here?




```
grub> [B]find[/B] /boot/grub/device.map
   (hd0,5)

grub> [B]cat[/B] (hd0,5)/boot/grub/device.map
# this device map was generated by anaconda
(fd0)             /dev/fd0
(hd0)            /dev/hda
(hd1)            /dev/hdb
```


----------



## saikee (Jun 11, 2004)

In a Grub prompt you instruct Grub by one line of command at a time.

root (hd1,0) <-------Tell Grub the root partition you want to boot. Grub then responds back telling you the partition type it discovers. So if type 0x7 NTFS is reported then the bugger has found it.

chainloader +1 <------------Tell Grub to boot its boot loader at the "+1" position. If Grub has no message then it means it has no problem and has hooked up as instructed

boot <-----------------Green light for Grub to proceed 

Your /boot/grub/menu.lst has these 3 lines but it doesn't boot because the root reference was (hd0,0).

If you can boot it manually in a Grub prompt with reference (hd1,0) that means it works. All you need to do is to replace the "0" in "hd0" with "1" to become "hd1" in your /boot/grub/menu.lst.

You don't need to edit /boot/grub/menu.lst if you prefer to boot your Windows manually every time but changing one number from "0" to "1" is all it takes to make the Grub menu works.

---------------------------------------------------------------

As your device.map is different to my prediction can you confirm if Fedora boots not not?

Since you have been able to supply the various files I have assumed Fedora boots according to the condition (hd0)=hdb

Can you also confirm if Windows boots with root (hd1,0)?

It now appears that if you stick to your original setting and tell the BIOS to boot hda first then it will solve all your problems, as it will give the (hd0) status to hda and everything will match.

You can then tell us how did you manage to arrive at the situation with (hd0)=hdb.


----------



## zillah (Jun 6, 2005)

> root (hd1,0) <-------Tell Grub the root partition you want to boot. Grub then responds back telling you the partition type it discovers. So if type *0x7* NTFS is reported then the bugger has found it.


grub> root (hd1,0)
Filesystem type* unknown*, partition type *0x7*



> If Grub has no message then it means it has no problem and has hooked up as instructed


Ok.



> boot


The cursor stuck ,,,nothing happen!!!



> As usual, you never confirm the actual setting to us with the content of "/boot/grub/device.map".


I think you have posted the reply before you have seen my reply.


----------



## saikee (Jun 11, 2004)

OK

I forgot you need to re-map the drives because your Windows could have been installed while it was in the (hd0) position.

Windows should boot as follow

```
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
boot
```
Grub can't read a NTFS partition! There are many foreign systems that Grub can't read but it can still boot them.

As the thing stands Grub should be able to boot systems before Grub was born and future systems that haven't been invented yet, as long as the new systems confirm to the PC standard. Grub stands for "Grand United Boot loader"


----------



## zillah (Jun 6, 2005)

Now it has done.

What shoudl I do next ?


----------



## saikee (Jun 11, 2004)

Report current situation

Was Windows booted from root (hd1,0)?

Did Fedora boot?

My PC has firewall and various securities blocking "chatting" so I can't respond to your online message.


----------



## zillah (Jun 6, 2005)

From "grub >" I typed in these command :

root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
boot

*line by line* ("In a Grub prompt you instruct Grub by one line of command at a time.
") ,,,,,then I was introduced by the normal windows bootloader (DOS black screen),,,,Do I need to restart PC to be to see Grub again ? I am waiting for your reply,,,I have done any thing yet.


----------



## saikee (Jun 11, 2004)

Grub should boot up your Windows and disappears itself.

Grub will only be seen the next time you reboot the PC. It is nothing but a boot loader to boot any system of your choice. It has no role to play after your chosen system has booted up. If Grub stays behind and asks for money I would shoot its head off.


----------



## zillah (Jun 6, 2005)

> Grub should boot up your Windows and disappears itself. Grub will only be seen the next time you reboot the PC.


Yes this what happend to me as well.

1- Now if I want to boot Linux,,,what should I do,,,,

2- Do I need to repeat the same procedure every time I want to boot windows ?

3- Does that mean I can not see the nice color for grub again ?


----------



## saikee (Jun 11, 2004)

Second last line of my reply in Post #17


> It now appears that if you stick to your original setting and tell the BIOS to boot hda first then it will solve all your problems, as it will give the (hd0) status to hda and everything will match.


Can you understand the meaning of it?

If you don't want to reconfigure everything then putting the booting disk order with hda at the beginning of the booting queue can potentally solve all your problems. Would not not like to try this first?

Do the minimum first but it is not a big deal to reconfgure the Fedora to suit your current setup. So Windows now boots successfully.


----------



## zillah (Jun 6, 2005)

> Can you understand the meaning of it?


But how can I tell the BIOS ?What should I do ,,,,I can not change the order form COMS itself....is there any other suggestion ?


----------



## saikee (Jun 11, 2004)

Normally pressing the "del" key when you boot up a computerwill trigger the BIOS screen. Some computes use "F1", "F2", "F10" and so on.

OK if you don't know this fundament technique to investigate the hardware set up we can still boot the two systems. Lets take stock as follow and correct me if anything inaccurate 

(1) Windows is now bootable at root (hd1,0) manually so no needed to change.

(2) You have Fedora Grub menu at boot time but Fedora is still not bootable, right? However you have been able to supply Fedora's internal files like device.map, menu.lst. Can you confirm the method of obtaining them as Fedora cannot be booted? You will have to do it with Fedora installation CD, a Live CD or something like that. The answers can me to formulate a solution. 

(3) Do you know how to edit /boot/grub/menu.lst and /boot/grub/device.map if instructions are given? By that I mean can you use editor "vi" in terminal mode if you don't have access to a Graphic desktop? Doing it in terminal mode is best because the files are system-related and require root privileges not always available at a Graphic desktop.


----------



## zillah (Jun 6, 2005)

> Some computes use "F1", "F2", "F10" and so on.
> OK if you don't know this fundament technique to investigate the hardware


My answer will be post #13


> I checked the BIOS it is fine. The order for booting devices are : Drive0, then Drive1, then Drive2, then Drive3.


The reason I have asked the quoted below, because many times you have pointed that might be booting order in BIOS get confused 


> But how can I tell the BIOS ? What should I do ,,,,I can not change the order form COMS itself....is there any other suggestion ?


I was aksing you, is there any other thing, other that what I did (F1 my case to enter CMOS),,,,,,,,,in BIOS that I have got I can not change the boot order of the devices,,,,and I did check before I posted my thread here, that Master in the right place and slave in right place,,,,(The test that I did :removing slave HD and keep master and check BIOS).



> "vi" in terminal mode if you don't have access to a Graphic desktop? Doing it in terminal mode is best because the files are system-related and require root privileges not always available at a Graphic desktop.


Yes


----------



## saikee (Jun 11, 2004)

Every PC must allow you to arrange the booting queue, say floppy is the 1st, ollowed by CD drive and then the hard disks.

Within the hard disks one can nominate any one to be the 1st bootable disk. That is why Linux can be boot from USB devices including external hard disks.

Only old mobo disallowing the slave from booting ahead of a master disk. Let's us this is your case and open up the box to swap the cable connections of hda and hdb is not preferred.

You must freeze the cable connections and Bios setup from now on.

Steps to make Fedora bootable again.

(1) Amend device.map as follow

```
(fd0)            /dev/fd0
(hd0)            /dev/hd[color=red]b[/color]
(hd1)            /dev/hd[color=red]a[/color]
```
(2) Amend /boot/grub/menu.lst as follow

```
title Fedora Core (2.6.11-1.1369_FC4)
root (hd[color=red]0[/color],5)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img

title WinXP and 2003
rootnoverify (hd[color=red]1[/color],0)
[color=red]map (hd1) (hd0)
map (hd0) (hd1)[/color]
chainloader +1
```
Think that should do it.


----------



## zillah (Jun 6, 2005)

> Amend device.map as follow,,,,,Amend /boot/grub/menu.lst as follow


From *grub>* how can I modify (configure) device.map and /boot/grub/menu.lst to change the content of these two files to what you recommended.

I tried *vi* /boot/grub/device.map and *vi*/boot/grub/menu.lst,,,,,,,,,,,,it did not work.


----------



## saikee (Jun 11, 2004)

It works if do it with an operating system instead of a boot loader.

vi is a Linux editor. You can only access it after booting up the Linux.

Grub is a boot loader. It has no kernel, no software and cannot be used to amend the two files. 

Grub prompt is a special feature of Grub to allow you to perform the essential tasks in booting a system manually. No other boot loader gives such a facility. You may have misunderstood it can do everything like an operating system can do.

Grub "IS NOT" an operating system, not when it is only 1/10 the size of a floppy.


----------



## zillah (Jun 6, 2005)

How can i boot into Linux,,,,because we have not sloved this issue yet


----------



## saikee (Jun 11, 2004)

Well you have not told us the results until now.

Here is collection of *booting tips* I have recently put togther. Since you have a Live CD and a Grub floppy you should be able to boot every system up using the tips. My advice is just a repeatition of them.


----------



## zillah (Jun 6, 2005)

I have to admit you are a guru of GRUB .



> Well you have not told us the results until now.


Which result,,,just remind me please



> It works if do it with an operating system instead of a boot loader.


Because I can not boot linux through grub (as a result I am receiving a prompt of native grub (i.e grub*>*) ),,,,*does that mean * I have to boot my PC from Live CD (I do not have floppy with my laptop) knoppix to modify /boot/grub/dvice.map or /boot/grub/menu.lst *?*



> *Only old mobo* disallowing the slave from booting ahead of a master disk. Let's us this is your case and open up the box to swap the cable connections of hda and hdb is not preferred.


I discussed with more than one forum*s*,,,the conculsion that there are limitation in the BIOS that I am using (though it is not old), therefore I can *not* swap the boot sequence for the hard disk*s* from primary master to primary slave *or* to secondary slave or secondary master


----------



## saikee (Jun 11, 2004)

> I have to admit you are a guru of GRUB .


I am not. I only read the Grub Manual and my copy does not have one extra word than the one you can read from the Internet. I am only a few steps ahead of you.



> Which result,,,just remind me please


I have asked you to report your status on Post #21

If you could read, copy and paste /boot/grub/menu.lst from Knoppix you can also edit the same file! /boot/grub.device.map is jusy another test file with 3 to 4 lines inside.

Surely you are not telling me that although you can read a file but can't edit i, are you?

You confirm that you have a Grub prompt. The Grub floppy only boots you into a Grub prompt so you don't need a floppy drive!!!! Just use the Grub pompt to boot all your systems and edit /boot/grub/menu.lst with the manual instructions that you know have worked.

If you can't swap the booting order that is no handicap as Grub can re-arrange it for you. I have already given you the "map" statements before.

So if you want to boot your Linux use Tips Task A1+A6


----------



## zillah (Jun 6, 2005)

> I have asked you to report your status on Post #21


From post # 18

```
From "grub >" I typed in these command :

root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
boot

line by line ("In a Grub prompt you instruct Grub by one line of command at a time.
") ,,,,,then I was introduced by the normal windows bootloader (DOS black screen),,,,Do I need to restart PC to be to see Grub again ? I am waiting for your reply,,,I have done any thing yet.
```



> Just use the *Grub pompt *to boot all your systems and *edit /boot/grub/menu.lst *with the manual instructions that you know have worked.





> If you could read, copy and paste */boot/grub/menu.lst *from *Knoppix*


I got confused here in the first quote you are advising to use Grub prompt (i.e grub>,,,Am I right ?) to edit /boot/grub/menu.lst , in the second quote your are advising to use knoppix to edit /boot/grub/menu.lst !!!!!!!

Does that mean I can modify (edit) /boot/grub/menu.lst  while I am in a native grub (grub>) ?----


----------



## saikee (Jun 11, 2004)

The commands you boot a system successfully in a Grub prompt manually are the ingredients you need to put inside /boot/grub/menu.lst for booting it automatically.

You need to use a Grub prompt to boot up a Linux. Thereafter you can edit the /boot/grub/menu.lst while inside a booted up Linux.

Alternatively without a booted up Linux you can edit the same file via a booted up Live CD.

In a Grub prompt there is no editor available.


----------



## zillah (Jun 6, 2005)

> So if you want to boot your Linux use Tips Task A1+A6


I am trying to use grub> prompt to boot my linux (I have not tried knoppix yet)

1- grub> find /boot/grub/menu.lst
(hd0,5)

2- cat (hd0,5)/boot/grub/menu.lst 
I omitted the output.

3- configfile (hd0,5)/boot/grub/menu.lst

I have been greated with GRUB bootloader black and white (not colored) when I chose FC,,,I received this message *:*

Booting 'Fedora Core (2.6.11-1.1369_FC4)

root (hd1,5)

Error 22: No such partition

Press any key to continue----If I press any key i will go back to the same black and white menu.


----------



## saikee (Jun 11, 2004)

Doesn't it tell you the root partition isn't in (hd1,5)?

You have already found it in (hd0,5), right?

The cat (hd0,5)/boot/grub/menu.lst actually lists the commands inside. So just type it line by line to boot Fedora manually but change for the correct the root location.

There could only two things that can go wrong

(1) The partition reference in the root statement
(2) The "root=" paramenter in the kernel statement.

Fixed both and Fedora will have to fire up.


----------



## zillah (Jun 6, 2005)

> (1) Amend device.map as follow
> 
> Code:
> (fd0) /dev/fd0
> ...


I modified both files (device.map and menu.lst) by using knoppix CD, still I am getting the same problem (grub>),,,I am not getting the GUI for grub.


----------



## saikee (Jun 11, 2004)

One problem at a time please.

In a Grub prompt do these lines (from your menu.lst but you can type it line by line at Grub prompt) boot Fedora or not? If not what is the error message?


```
root (hd0,5)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
```
Now tells us which part of the /boot/grub/menu.lst doesn't work?

(1) The GUI display?
(2) Fedora doesn't boot? or
(3) Window does boot?

and list your latest menu.lst here.


----------



## zillah (Jun 6, 2005)

> Now tells us which part of the /boot/grub/menu.lst doesn't work?


These are the outputs:

grub> root (hd0,5)-------Press Enter
Filesystem type is ext2fs, partition type 0x83

grub> kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL------Press Enter
[Linux-bzImage, setup=0x1e00, size=0x18e473]

grub> initrd /boot/initrd-2.6.11-1.1369_FC4.img--------Press Enter
[[email protected], 0x10e797 bytes]



> 1) The GUI display?


No



> (2) Fedora doesn't boot? or


FC did not boot nor windows



> and list your latest menu.lst here.


grub>cat /boot/grub/menu.lst
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,5)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img

title WinXP and 2003
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1

grub>cat /boot/grub/device.map
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hdb
(hd1) /dev/hda


----------



## saikee (Jun 11, 2004)

Your Fedora is Ok and I think your Windows will boot too.

When you use a menu.lst instruction to boot a system manually you always omit the "title" line and finish everthing with a "boot" statement

Therefore for booting Fedora maually

```
root (hd0,5)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
[color=red]boot[/color]
```
for booting Windows manually 

```
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
[color=red]boot[/color]
```
I shall boot up my Fedora and tell you the splash filing name with which you can get a Graphic screen at the Grub menu.


----------



## saikee (Jun 11, 2004)

Here is my FC4 menu.lst (installed in hda21)

```
default=0
timeout=5
splashimage=(hd0,21)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
	root (hd0,21)
	kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/12345678910 rhgb quiet
	initrd /boot/initrd-2.6.11-1.1369_FC4.img
```
Therefore to get a GUI screen in your case is just adding at the beginning of menu.lst

```
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
```
The "default=0" statement is for FC4 to boot system 0 (1st system of menu.lst) if it get tied of waiting for you to make up your mind. The period FC4 prepared to wait is indicated in the "timeout=5" statement. Put a couple of 0s after 5 if you want more time.


----------



## zillah (Jun 6, 2005)

> Therefore to get a GUI screen in your case is just adding at the beginning of menu.lst


It did not work


----------



## saikee (Jun 11, 2004)

Did FC4 boot?

Did Windows boot?

Do you have an idea if your /boot/grub directory has the splash.xpm.gz or not?


----------



## zillah (Jun 6, 2005)

> Did FC4 boot?


Yes I can boot both FC4 and Windows (XP, 2003),,,through grub command line.



> Did Windows boot?


Yes I can boot both FC4 and Windows (XP, 2003),,,through grub command line.



> Do you have an idea if your /boot/grub directory has the *splash.xpm.gz or not*?


I am writing this reply form FC4

[[email protected] ~]#*cat /boot/grub/menu.lst*

```
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,5)
#          kernel /boot/vmlinuz-version ro root=/dev/hdb6
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
[B]splashimage=(hd1,5)/boot/grub/splash.xpm.gz[/B]
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd0,5)
        kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.11-1.1369_FC4.img
title WinXP and 2003
        rootnoverify (hd1,0)
        map (hd1) (hd0)
        map (hd0) (hd1)
        chainloader +1
```
[[email protected] ~]# *cat /boot/grub/device.map*
# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hdb
(hd1) /dev/hda


----------



## saikee (Jun 11, 2004)

No you got it wrong.

You should list the directory of */boot/grub* to see if a file called *splash.xpm.gz* is inside or not. I got it in my copy of FC4 and it may called a different name or even stored in different directory like /boot in your case.

Having locate the file with "splash" in front you can put this file in place of the command line position marked red

```
splashimage=(hd1,5)[color=red]/boot/grub/splash.xpm.gz[/color]
```
It isn't much a GUI but just a background image. However you can change it with other splash image of your own choice.

So really your booting problem has been resolved. The command lines you boot both systems are the valid instructions to be used in /boot/grub/menu.lst except you need a title line to be displayed telling you what system you are booting.


----------



## zillah (Jun 6, 2005)

> You should list the directory of /boot/grub


You meant : "ls -al /boot/grub" didn't you ?


----------



## saikee (Jun 11, 2004)

I usually just type


```
ls /boot
ls /boot/grub
```
or go to the desktop to keep clicking the file manager until I get to "/", then /boot and finally /boot/grub.


----------



## zillah (Jun 6, 2005)

> You should list the directory of /boot/grub to see if a file called splash.xpm.gz is inside or not.


Yes it is inside.



> Having locate the file with "splash" in front you can put this file in place of the command line position marked red


Part of the "menu.lst" file that I have got is :
*splashimage=(hd1,5)/boot/grub/splash.xpm.gz*
Do I need to modify it, in order to see the GRUB GUI ?


----------



## saikee (Jun 11, 2004)

Your post #45 said it did not work.

I got the feeling it has always been working then but isn't "GUI" enough for you.

You can put a "#" in front of the splashimage to disable it temporarily to see the effect without it.


----------



## zillah (Jun 6, 2005)

> Your post #45 said it did not work.


Yes still it does not work.



> You can put a "#" in front of the splashimage to disable it temporarily to see the effect without it.


I will try and let you know.


----------



## zillah (Jun 6, 2005)

> You can put a "#" in front of the splashimage to disable it temporarily to see the effect without it.


Nothing new happened,,,same grub native command appeared (no grub GUI)


----------



## saikee (Jun 11, 2004)

But the color changes. 

Grub does not supply GUI screen. It is the user who adds the splash screen to suit his/her taste.

Fedora uses only a simple splash screen so that pressing "c" can still get you into a Grub prompt.

If you want a bit of more graphic go with Suse or Kanotix as they use "gfxmenu" statement which looks good but you lose the Grub prompt too.

If you know how to boot the Linux then the rest is just customisation.

There is not one chance in hell that you can get any more out of Fedora if you don't like its splash screen image.


----------



## zillah (Jun 6, 2005)

saikee,,,I am looking to get this,,, see the attchment please.

Can I ?


----------



## saikee (Jun 11, 2004)

No problem.

The BSD systems are more difficult to manage because it has subdivision inside its own parttition looked upon by LInux as logical partitions. As a hard disk cannot have more than one extended partition and therefore two lots of logical partitions can progressively lead to partition table corruption The common complaint is the partitions found not overlapping each other at the boundary.

The 100+ in my link has a detailed description how to hand them.

I have not installed a BeOS system but if it is bootable in a PC Grub should be able to handle it.

You will need to know which systems need to be installed in primary partitions. Your list appears to need 4 primaries which is the maximum number from a hard disk. If you have logical partitions they must come from one of the primaries by converting it into an extended partition.

You are permitted to have 60 and 15 partitions in a IDE and Sata disk inclusive all primary, extended and logical partitions.


----------



## zillah (Jun 6, 2005)

I tried this, I booted the PC inot Linux OS (through command line), and I tried the command below,,,the result is different form post #10 (i.e. here it does not show me that grub swapped the device, while post #10 it dose) ,,,why ?



> grub > geometry (hd0)
> drive 0x81: C/H/S = 1023/255/63, The number of sectors = 78156288, LBA
> Partition num :0 , Filesystem type unknown, partition type 0x7
> Partition num :1 , Filesystem type is fat, partition type 0xc
> ...


----------



## saikee (Jun 11, 2004)

Nobody here when did you swap the boot disk order.

Your post #10 has (hd0) and (hd1) exactly opposite to Posy #58 and this nsubstantiates the disk order has been reversed since Post #10.

Grub's gemetry command only lists the partitions according to the hardware information. It doesn't lie. If you have checked the BIOS information at Post #10 and Post #58 you would have found they match those showed by Grub.


----------



## zillah (Jun 6, 2005)

> when did you swap the boot disk order.


Did you mean that the HDs has been swapped physically since post #10 ? I have not done that ,,,it is the same order form my very first post



> If you have checked the BIOS information at Post #10 and Post #58 you would have found they match those showed by Grub.


Believe me I ckecked before i posted #58,,,I could not find some thing suspicious.


----------



## saikee (Jun 11, 2004)

I have gone over this ground a few times. Every time a disk is unplugged and later plugged back the disk order may be changed.

My 4 disks were changing order all the time whenever I remove one away.

Just be aware of it and especially you now know how to check it with the Grub command. Believe me Linux can only work with the disk order handed down from the BIOS.


----------



## zillah (Jun 6, 2005)

> I have gone over this ground a few times. Every time a disk is *unplugged* and later *plugged* back the disk order may be changed.


Yes I agree with you,,,,but in my case I* have not * plugged and unplugged the HDs.


----------



## saikee (Jun 11, 2004)

I don't think anybody knows what you have done.

Post #1 you suggested Linux in the slave disk
Post #5 shows Linux in hdb6
Post #6 confirms again Linux is (hd1,5)
Post #10 shows Linux in (hd0,5)<-----------------first time disks were swapped
Post #13 confirrms again Linux in (hd0,5)
Post #16 shows the original order of (hd1)=hdb in device.map
Post #38 still shows Linux in (hd0,5)
Post #40 You start correction making (hd0)=hdb and so (hd0,5) matches the Linux location<---------------Now everything matches
Post #42 Confirmation of #40 above
Post #47 You again confirm Linux can be found in (hd0,5) 
Post #58 You suddenly showed Linux returning to (hd1,5)<----------------2nd change, everything mismatched again.

One thing for sure if you are looking for an excuse that Grub had changed it then you are in for a big surprise as everything Grub does in the "map" statement is temporary. You can manually type the map statement and you will not see the (hd0) and (hd1) reverse order.

The first change at Post #6 was previously introduced by yourself before any advice wastaken up.


----------



## zillah (Jun 6, 2005)

Could you please confirm this:
If I changed the values in the menu.lst,,,,does that affect  the outpout of *grub>geometry* ?
Because I was trying different values in the menu.lst,,,,,,but bear in mind that I have never changed the position for the HDs physically.


----------



## saikee (Jun 11, 2004)

Since you have a Grub prompt why don't you let Grub speak for itself.

Do the geometry stataement, then the map statements and then repeat the map statement again. to see if the disk order has been changed

Run the system, power down and check it again.


----------



## zillah (Jun 6, 2005)

> Do the geometry stataement


grub > geometry (*hd0*)
drive 0x80: C/H/S = 1023/255/63, The number of sectors = 78165360, LBA
Partition num :0 , Filesystem type unknown, partition type 0xbb
Partition num :1 , Filesystem type is fat, partition type 0xc
Partition num :4 , Filesystem type unknown, partition type 0x82
Partition num :5 , Filesystem type is ext2fs, partition type 0x83

grub > geometry (*hd1*)
drive 0x81: C/H/S = 1023/255/63, The number of sectors = 78156288, LBA
Partition num :0 , Filesystem type unknown, partition type 0x7
Partition num :1 , Filesystem type is fat, partition type 0xc
Partition num :2 , Filesystem type unknown, partition type 0x7



> then the map statements




```
grub> find /boot/grub/device.map
  (hd0,5)

grub> cat  ([B]hd0,5[/B])/boot/grub/device.map
# this device map was generated by anaconda
(fd0)       /dev/fd0
(hd0)       /dev/hda-------zero and A
(hd1)       /dev/hdb-------one and B
```



> then repeat the map statement again


I did repeat the command again

```
grub> cat  ([B]hd0,5[/B])/boot/grub/device.map
# this device map was generated by anaconda
(fd0)       /dev/fd0
(hd0)       /dev/hda-------zero and A
(hd1)       /dev/hdb-------one and B
```



> to see if the disk order has been changed


I am looking to your commant.



> Run the system


After doing all the above, I run the Linux System through command line from menu.lst then I restarted the PC , and I did these below again



> Do the geometry stataement


grub > geometry (*hd0*)
drive 0x80: C/H/S = 1023/255/63, The number of sectors = 78165360, LBA
Partition num :0 , Filesystem type unknown, partition type 0xbb
Partition num :1 , Filesystem type is fat, partition type 0xc
Partition num :4 , Filesystem type unknown, partition type 0x82
Partition num :5 , Filesystem type is ext2fs, partition type 0x83

grub > geometry (*hd1*)
drive 0x81: C/H/S = 1023/255/63, The number of sectors = 78156288, LBA
Partition num :0 , Filesystem type unknown, partition type 0x7
Partition num :1 , Filesystem type is fat, partition type 0xc
Partition num :2 , Filesystem type unknown, partition type 0x7



> then the map statements




```
grub> find /boot/grub/device.map
  (hd0,5)

grub> cat  ([B]hd0,5[/B])/boot/grub/device.map
# this device map was generated by anaconda
(fd0)       /dev/fd0
(hd0)       /dev/hda-------zero and A
(hd1)       /dev/hdb-------one and B
```



> then repeat the map statement again


I did repeat the command again

```
grub> cat  ([B]hd0,5[/B])/boot/grub/device.map
# this device map was generated by anaconda
(fd0)       /dev/fd0
(hd0)       /dev/hda-------zero and A
(hd1)       /dev/hdb-------one and B
```


----------



## zillah (Jun 6, 2005)

Some thing extra I did, which you have not asked me to do it. I restarted the PC again (second time not the first time) and I did these below again :
grub > geometry (*hd0*)
drive 0x80: C/H/S = 1023/255/63, The number of sectors = 78165360, LBA
Partition num :0 , Filesystem type unknown, partition type 0xbb
Partition num :1 , Filesystem type is fat, partition type 0xc
Partition num :4 , Filesystem type unknown, partition type 0x82
Partition num :5 , Filesystem type is ext2fs, partition type 0x83

grub > geometry (*hd1*)
drive 0x81: C/H/S = 1023/255/63, The number of sectors = 78156288, LBA
Partition num :0 , Filesystem type unknown, partition type 0x7
Partition num :1 , Filesystem type is fat, partition type 0xc
Partition num :2 , Filesystem type unknown, partition type 0x7

I proceed booting FC, and I am *sending this reply form Linux box*, and typed in (fdisk -l and geometry) and the results below :

```
[[email protected] grub]# [B]fdisk -l[/B]

Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/hda1   *		   1		1959	15735636	7  HPFS/NTFS
/dev/hda2			1960		2612	 5245222+   c  W95 FAT32 (LBA)
/dev/hda3			2613		4865	18097222+   7  HPFS/NTFS

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/hdb1   *		   1		2611	20972826   bb  Boot Wizard hidden
/dev/hdb2			2612		3264	 5245222+   c  W95 FAT32 (LBA)
/dev/hdb3			3265		4865	12860032+   5  Extended
/dev/hdb5			3265		3328	  514048+  82  Linux swap / Solaris
/dev/hdb6			3329		4865	12345921   83  Linux
```
I tried geomety command while I am accessing linux OS (not like before)

```
grub> geometry (hd0)
drive 0x80: C/H/S = 4865/255/63, The number of sectors = 78156288, /dev/hda
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type is fat, partition type 0xc
   Partition num: 2,  Filesystem type unknown, partition type 0x7

grub> geometry (hd1)
drive 0x81: C/H/S = 4865/255/63, The number of sectors = 78165360, /dev/hdb
   Partition num: 0,  Filesystem type unknown, partition type 0xbb
   Partition num: 1,  Filesystem type is fat, partition type 0xc
   Partition num: 4,  Filesystem type unknown, partition type 0x82
   Partition num: 5,  Filesystem type is ext2fs, partition type 0x83
```



> You can see the results from both the geometry grub commands (from withing native grub and linux OS) and the fdisk command are not identical . . .


I leave the comment to you


----------



## saikee (Jun 11, 2004)

Two comments

(1) Your device.map does not match the disk order. Device.map is the first record Grub assembled when it was installed. 

Post #16 first showed hd0=/dev/hda

Post #40 you confirmed hd0 has been amended to correspond to /dev/hdb as previously suggested by Post #29

Post #66 now shows hd0 has been reverted back to /dev/hda.

Device.map is only created once and never changes untill you correct it yourself. Therefore you have either failed to implement the alteration in Post #40 after claiming having done it or have since change device.map yourself.

(2) Grub never alters your disk order.


----------



## saikee (Jun 11, 2004)

It is now all clear

Since you have device.map mis-matching your disk order this effectively forces Grub to change the disk order internally once the Linux has been booted.

Before you booted the hd0 was /dev/hdb

After you booted Grub had to follow the faulty device.map and assigned hd0 to /dev/hda. 

Can you now confirm 

Did you implement the changes in device.map in Post #40 or have you since changed it?


----------



## zillah (Jun 6, 2005)

> Did you implement the changes in device.map in Post #40 or have you since changed it?


Yes I did change to the device.map.


----------



## saikee (Jun 11, 2004)

Thus your confusion should disappear if you make the device.map compatible with the boot disk order and make sure the partition references are matched too in the Grub menu.lst. 

The problem would not have risen if the boot disk order was not changed in the first place.


----------



## zillah (Jun 6, 2005)

*From Linux OS I have done these :*

1- I changed the value in /boot/grub/device.map to :

```
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hd[B]b[/B]
(hd1)     /dev/hd[B]a[/B]
```
2- Ckeck fdisk -l

```
Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1959    15735636    7  HPFS/NTFS
/dev/hda2            1960        2612     5245222+   c  W95 FAT32 (LBA)
/dev/hda3            2613        4865    18097222+   7  HPFS/NTFS

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        2611    20972826   bb  Boot Wizard hidden
/dev/hdb2            2612        3264     5245222+   c  W95 FAT32 (LBA)
/dev/hdb3            3265        4865    12860032+   5  Extended
/dev/hdb5            3265        3328      514048+  82  Linux swap / Solaris
/dev/hdb6            3329        4865    12345921   83  Linux
[[email protected] ~]#
```
3- Ckeck geometry 

```
grub> geometry (hd0)
drive 0x80: C/H/S = 4865/255/63, The number of sectors = 78156288, /dev/hda
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type is fat, partition type 0xc
   Partition num: 2,  Filesystem type unknown, partition type 0x7

grub> geometry (hd1)
drive 0x81: C/H/S = 4865/255/63, The number of sectors = 78165360, /dev/hdb
   Partition num: 0,  Filesystem type unknown, partition type 0xbb
   Partition num: 1,  Filesystem type is fat, partition type 0xc
   Partition num: 4,  Filesystem type unknown, partition type 0x82
   Partition num: 5,  Filesystem type is ext2fs, partition type 0x83
```
4- I checked the menu.lst

```
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,5)
#          kernel /boot/vmlinuz-version ro root=/dev/hdb6
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=([B]hd0,5[/B])/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
	root ([B]hd0,5[/B])
	kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.11-1.1369_FC4.img
title WinXP and 2003
        rootnoverify ([B]hd1[/B],0)
        map (hd1)  (hd0)
        map (hd0)  (hd1)
        [B]makeactive[/B]
        chainloader +1
```
Then I booted the system , and I did not get the menu options for grub , I ended up with native grub again (grub>)

I checked the geometry again (this time from grub command not from linux OS) the result was:

```
grub> geometry (hd[COLOR="Red"][B]1[/B][/COLOR])
drive 0x80: C/H/S = 4865/255/63, The number of sectors = 78156288, /dev/hda
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type is fat, partition type 0xc
   Partition num: 2,  Filesystem type unknown, partition type 0x7

grub> geometry (hd[COLOR="red"][B]0[/B][/COLOR])
drive 0x81: C/H/S = 4865/255/63, The number of sectors = 78165360, /dev/hdb
   Partition num: 0,  Filesystem type unknown, partition type 0xbb
   Partition num: 1,  Filesystem type is fat, partition type 0xc
   Partition num: 4,  Filesystem type unknown, partition type 0x82
   Partition num: 5,  Filesystem type is ext2fs, partition type 0x83
```


----------



## saikee (Jun 11, 2004)

So your boot disk order of hd0=/dev/hdb has not been altered between Post #67 and Post #72.

Everything seems to be in order except you lose the menu part of the Grub, right?

Can you boot Fc and XP up manually, using the information of /boot/grub/menu.lst (plus a "boot" statement in each case)?

You may have to restore Grub again.


----------



## zillah (Jun 6, 2005)

> Everything seems to be in order except you lose the *menu part of the Grub*, right?


Yes.



> Can you boot Fc and XP up manually, using the information of /boot/grub/menu.lst (plus a "boot" statement in each case)?


Yes.



> You may have to restore Grub again.


How ?


----------



## saikee (Jun 11, 2004)

Before booting the Linux up

```
root (hd0,5)
setup (hd0)
```
or after thye Linux has been booted and in command shell

```
grub-install /dev/hdb
```


----------



## zillah (Jun 6, 2005)

Does that mean I am going to intsall the grub on the second hard disk ?


----------



## saikee (Jun 11, 2004)

You are already booting from the 2nd disk.


----------



## zillah (Jun 6, 2005)

I am going to try your suggestion and let you know.

By the way about the problem read this please :

*{{*
zillah,
I decided to try and *duplicate your setup *in my lab. So I did a clean install of Windows Server 2003 on /dev/hda and FC4 on /dev/hdb and told GRUB to install itself in the MBR of /dev/hda.

Here's my problem. GRUB doesn't seem to even be in the MBR. When I use a rescue boot into FC4 and try to reinstall GRUB with the command grub-install /dev/hda it reports back with an error message that there is no BIOS drive /dev/hdb. This may or may not be similiar to your situation. I wil have to investigate mine *}}.*


----------



## saikee (Jun 11, 2004)

You can then advise him/her to do a

```
fdisk -l
```
to see all the disks and partitions in the PC.

It is possible the guy has hooked a CD drive with the first disk and use the second IDE cable for the second disk. In such a case he/she has a hdc and the hdb would have been given to the CD drive.


----------



## zillah (Jun 6, 2005)

> root (hd0,5)
> setup (hd0)


*Done,,,thanks saikee*


----------



## zillah (Jun 6, 2005)

After this lengthy threda we have started on 13-January,,,I want to ask you few questions:

1- From *geometry out *,,,,does the it indicate to some sort of physicall order problem ? (i.e are they in right place,,,,, hda and hdb),,,,Or there is something wrong I am not aware of it ?,,,,,for me by looking at the physicall location for HDs they are alright ?

2- Can I now install Solaris ? What precaution I have to take in consideration before installation ?

3- I will read the thread again and again to clarify any ambiguity.


----------



## saikee (Jun 11, 2004)

Yes it has been a long thread and you should start a new one once your current booting problem is over. Using the thread to gain more insight is OK as long as you know how to provide the information. It is a pig's job to pick information from your previous posts to convince you.

Regarding your questions here are my thought

(1) Linux is reiable because it names the physical connection positions of the 4 IDE cable connection positions as hda, hdb, hdc and hdd. The master of the primary IDE is always hda even if you hook a CD drive to it. The slave of the primary IDE is hdb. hdc and hdd belong to the master and slave of secondary IDE cable. Therefore these information will never change as they are the physical connection points of the hardware. Modern Bios do not call these positions as masters and slaves and have to call them by the device model names, like Maxtor 6L300R0, Hitachi Deskstar T7K250 etc in order to be able to select any one as the first bootable device. Then there are Sata disks, usually provided in pairs and any of them can be nominated as the first bootable disk too.

Therefore a user can arrange the boot disk order virtually in any way he/she likes, although it is customary to select either hda or sda as the first bootable disk to minimize confusion. Thus the boot disk order of (hd0), (hd1), (hd2) etc are not necessarily has to correspond to the oder of hda, hdb, hdc, hdd, sda, sdb, sdc... 

Grub has ambition outside Linux and it uses the boot disk order directly from to Bios and hence it refers the disks by number because Dos/Windows can call hda as "C" drive wile BSD may like the same disk refered to as wd1.

The geometry command is therefore the boot disk order arranged by the user. It so happens that you have not bothered much with the BIOS setup and did not realise it was wholly under your control (as you can always overide whatever BIOS has come up with)

(2) You can install Solaris any time you wish. The precaution I would advise is to install it on a disk where there is no extended partition. Solaris needs to be installed and booted from a primary partition. It only take up one primary partition and divides it internally for Swap and other directories. If Solaris is denied the use of the MBR it will install its boot loader inside its root partition and automatically chainloadable by Grub just like a Windows. If you have to put Solaris in a disk with logical partitions then it pay to hide the extended partition when booting Solaris. My signature on 100+ systems shows a complete Grub menu on dealing with Solaris and a few other BSD systems.

(3) I have tried another set of disks to experiement Solaris installation "without" hiding the Linux in the extended partition and have suffered the partition table corruption for the 4th time. Therefore make sure you do not have important data in the disk where you want Solaris to be installed. I advocate hiding the entended partition because the entire logical partition set is hidden and revealed by one Grub command. If you run Grub then it will be necessary to have Grub installed in one of the primary partition so that its menu.lst does not become unavilable when host partition is hidden.


----------



## zillah (Jun 6, 2005)

> Therefore a user can arrange the boot disk order *virtually* in any way he/she likes


What did you mean by order virtually ?Does it soething oppose to physical order for instance ?



> Thus the boot disk order of (hd0), (hd1), (hd2) etc are not necessarily has to correspond to the oder of hda, hdb, hdc, hdd, sda, sdb, sdc


Does that mean that hd0 can be correspond to *hda* on one machine *or* it can be correspond to hdc on another box ? How can I verify its correspondence ? does it through geometry command ? or fdisk -l or something else ?



> The geometry command is therefore the boot disk order arranged by the user


I did not get this ? physical boot disk or something else?



> It so happens that you have not *bothered* much with the BIOS setup and did not realise it was wholly under your control


Believe me I did bother myself for *two days * asking people in differents forum about the BOIS for my motherboard,,,but till now , I could not find any option I can change the order for the booted devices,,,I wish I can send the motherboard to you via email to look at it,,,.
I am going to discuss this issue with IBM (PC that I have got at work form IBM ) and let you know


----------



## saikee (Jun 11, 2004)

The boot disk order is selectable from the BIOS screen by the user. 

You can select hdc as the first bootable disk on the same machine. I have 2 IDE and 2 Sata and can arrange the booting order any way I want between hda, hdc, sda and sdb.

Only fairly older BIOS permits the two master disk positions to be selected (not slaves) but to be able to select which disk to boot first is as old as the first generation of DOS. I certainly started using it when the biggest disks were not bigger than 20Mb but twice as high. When I had my first 8086 PC it has four 5.25" bays populated by 2 No. of 5.25" floppy drives and 2 No. of 10 Mb hard drives. I personally added the 10Mb Seagate hard disk at a price I could buy one with 500Gb today. 

If you can tell the BIOS to alter the booting queue you are effectively control the outcome of the geometry command in Grub.

I can believe your BIOS may be restricted. This one of the reasosns I never buy branded PCs because you pay more to get less.


----------



## zillah (Jun 6, 2005)

I just did another test right now,,,I used Hirens CD V7.2 (Has got heaps of DOS utility) i think you have heard about it,,,and I use partition utility,,,they have got all of them

1- I used *Partition Magic v8*,,,,it showed me that the hard disk with four partitions is Drive 1 and the hard disk with 3 partitions is Drive 2.

2- I *System commander v9.01*,,,,it showed me that the hard disk with four partitions is Drive 0 and the hard disk with 3 partitions is Drive 1.

3- I used *Ranish partition*,,,,it showed me that the hard disk with four partitions is Drive 0 and the hard disk with 3 partitions is Drive 1.

4- I used *Paragon partition manager*,,,,it showed me that the hard disk with four partitions is Drive 0 and the hard disk with 3 partitions is Drive 1

What does that mean ? does the drive 0 mean Master ? or it does mean Slave ? I get confused form this PC,,,,,Drive 0 it should refer to Master,,,Am I right ?


----------



## saikee (Jun 11, 2004)

To me they all confirm the 4-partition disk is the first one in the booting queue. Some software counts from 0 while others count from 1. That is all.

You should regard the first disk is the one at the head of the booting queue. 

A Bios usually has an option to go into rest of the booting queue to search for a bootable primary partition if one isn't found in the first boot disk. This option may not always be switched off though.


----------

