1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Two Hard Disks and GRUB location /dev/hdb6

Discussion in 'Linux and Unix' started by zillah, Jan 13, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    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/hdb6 First sector of boot partition.

    Why do I have hdb6,,,,it should be hdb4,,,,Am I right ?
     
  2. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    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.
     
  3. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    Yes that is fine,,,,just I forgot to mention that all the partitions are primary.


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


    Did you mean do not put ?
     
  4. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    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!
     
  5. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    You meant hdb5 instaed of hda5,,,,hdb6 instead of hds6

    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 ?

    Code:
    [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 :

     
  6. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    You meant hdb5 instaed of hda5,,,,hdb6 instead of hds6

    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 ?


    Code:
    [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
    



    Code:
    [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 :

     
  7. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    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)
    Code:
    geometry (hd0)
    geometry (hd1)
    (b) To boot up Windows manually (using root or rootnoverify is same here)
    Code:
    root (hd0,0)
    chainloader +1
    [color=blue]boot[/color]
    (c) To boot up Fedora quickly
    Code:
    root (hd1,5)
    configfile /boot/grub/menu.lst
    (d) To ask Grub to inform you which partition has /boot/grub/menu.lst
    Code:
    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)
    Code:
    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
    Code:
     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?
     
  8. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    What should I add (configure) to let grub to boot FC4 and Windows without typing anything (normal boot) ?
     
  9. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    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.
     
  10. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    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).
     
  11. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    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,,,,,
     
  12. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    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
    Code:
    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.
     
  13. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    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) ?
    Code:
    ---[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
    

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

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    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
    Code:
    (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 ?
     
  15. zillah

    zillah Thread Starter

    Joined:
    Jun 6, 2005
    Messages:
    328
    How can I write the above lines with " grub>" prompt or I need to add them to /grub/menu.lst ?
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/433726

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice