BIOS maps hard drives oppositely

Discussion in 'other software & services' started by sonic6k, Sep 29, 2007.

Thread Status:
Not open for further replies.
  1. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Hello!

    Today morning I installed Windows XP into my (Primary IDE Slave) 40Gb hard drive. The installation went fine and I configured Windows XP to my liking just like every time I do. Then I decided to reinstall my messy Debian Linux installation in my (Third IDE Master) 250Gb hard drive. In the Debian expert mode installer I chose to install GRUB into the MBR and that's where everything got bad: If I try to boot my 40Gb hard drive from the BIOS boot selection menu, it will boot my 250Gb hard drive instead. And vice-versa if I try to boot my 250Gb hard drive the BIOS will boot the 40Gb hard drive instead. My Linux installation seems to work fine (that is, if I try to load the XP installation), but when trying to boot my XP (if I try to load my Linux installation..) installation I get a "Operating system load error". I also tried to configure GRUB to load the XP drive but none of the configurations I tried did work.

    Does anyone know what to do in situations like these?
    I need to fix the BIOS to read the correct drive in the boot selection menu, I'm sure all other bad things are just side effects of it.

    Thanks in advance!
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,697
    Hello,

    You can boot into Linux, you say?
    Please copy here the output of your terminal when you do the following:
    sudo fdisk -l

    Also, the order of hard disks in your bios, could you please write this down?

    Mrk
     
  3. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Hi!

    Yes I can boot to Linux and here's the output of fdisk -l:
    Code:
    Disk /dev/sda: 40.9 GB, 40982151168 bytes
    255 heads, 63 sectors/track, 4982 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               2        4982    40009882+   f  W95 Ext'd (LBA)
    /dev/sda5               2        4982    40009851    b  W95 FAT32
    
    Disk /dev/sdb: 251.0 GB, 251000193024 bytes
    255 heads, 63 sectors/track, 30515 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1       30138   242083453+  83  Linux
    /dev/sdb2           30139       30515     3028252+   5  Extended
    /dev/sdb5           30139       30515     3028221   82  Linux swap / Solaris
    In BIOS the order is as follows:
    Primary IDE Master = DVD+-RW Drive
    Primary IDE Slave = 40Gb Maxtor HDD
    Third IDE Master = 250Gb Western Digital HDD

    And in my BIOS' boot options I set the 40Gb Maxtor HDD as number 1 and the 250Gb Western Digital HDD to number 2 so I can boot to my Linux automatically (that's what I'm after and then make GRUB to be able to boot WinXP if I need it)

    Thanks in advance!
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,697
    Hello,

    EDIT: I thought about something! Try this before anything else!

    What's your GRUB list. Please post it.
    It's located under /boot/grub/menu.lst

    I'll see if we can remedy the problem with a simple trick before attempting to reinstall, although your partitioning on the first drive does seem a bit weird.



    Original:

    I don't see a Windows XP partition there!
    No wonder you cannot boot it.

    On your first hard disk, you only have an extended partition inside which you have a FAT32 logical partition, no primary partition. Windows XP must reside on a primary partition.

    So, your Windows XP is misconfigured or resides on a yet third hard disk that GRUB does not see and therefore cannot boot it.

    My best guess, XP was not installed as it should.

    Now, option 2, in case the above is not true, then you might have a problem with drives boot priority and jumping, although this sounds UNLIKELY, since you have not changed your setup.

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

    So here's my rambling on the hardware part:

    FEEL FREE TO IGNORE ....

    Most mobos can support only 2 IDE controllers with 2 devices per IDE channel. Are you sure about the "third" one?

    Second, your devices are SATA, not IDE (hence the notation sd and not hd in fdisk), therefore I'm wondering about the IDE ...

    For example, I have a pair of SATA drives on a comp, so when the BIOS boots, I get none listed under IDE .... I only have primary and secondary SATA.

    How about you remove the drives and change the jumping? Make the hard disks masters and the DVD slave. Sounds more reasonable to me.

    Rambling out.

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

    My best guess:
    Repartition drive 1 (sda), delete its partition table, create new partitions and install XP again. Then, manually add a GRUB entry - don't worry, I'll help you.

    Cheers,
    Mrk
     
  5. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    My menu.lst:
    Well about the XP partition, it was first Primary, but then I thought making it Logical might help and now it is Logical (converted in Partition Magic).
    My PC was able to have Windows Vista (in the 40Gb HDD) and Linux (in the 250Gb HDD) and I was able to boot Vista from GRUB. Also, in my BIOS I have set "Configure SATA as Standard IDE". The other options are AHCI and RAID so I didn't know what to choose so I made it Standard IDE.

    Hmmm... I think I might make the 40Gb HDD Master and the DVD drive Slave... be right back. Thanks so far.
     
  6. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,697
    Hello,

    You are booting the wrong partition in GRUB!

    You are booting hd0,0 - which corresponds to your sda1 - but this is just the extended partition (not really usable)

    Change this to hd0,4 - see if this helps.

    Like this:

    title Windows XP SP2 Professional
    root (hd0,4)
    makeactive
    chainloader +1

    Or even:

    title Windows XP SP2 Professional
    rootnoverify (hd0,4)
    makeactive
    chainloader +1


    If not, you'll have to convert the partition.

    You see, the normal layout should be:
    sda1 - primary, ntfs
    sda2 - extended
    sda5 - actual logical

    You do not have the primary, ntfs, you only have extended and logical.

    So something got screwed up there.

    See if the above trick works.

    Still, I don't like it. Windows should not sit on a logical partition and fat32 is not a good choice for partition type - you're better off with ntfs.

    BTW, FYI, the jump from 1 to 5 is because a hard disk can only have 4 primary partitions. The rest must fit into extended (which is primary itself, but inaccessible as a partition per se).

    Cheers,
    Mrk
     
  7. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Hey Mrkvonic, I changed the jumper on the DVD drive to Slave and the 40Gb HDD to Master and now my BIOS loads the correct drive from the boot selection menu!

    GRUB however can't mount the XP partition but I guess it is because I made it Logical and not Primary. I am going to make it back to Primary now and then we'll see.. Thank you so much!
     
  8. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Also, I wanted the XP to be on FAT32 so then I can read/write to/from Linux easily. I have tried ntfs-3g and others (when I had Vista installed) but they gave me errors which resulted the hard drive to be corrupted and I needed to format it before Vista was able to use it. Why I'm now installing XP instead of Vista is because Vista doesn't support my sound card..
     
  9. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,697
    Hello,
    Then create a fat32 partition that both can share, but not the one where xp is installed. For example, c 20GB ntfs, d 10GB ntfs, e 10GB fat32.
    Mrk
     
  10. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Hmmm... I think this is being too complicated.. I'll just reinstall Windows XP.. let's see..
     
  11. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,697
    Hello,
    Exactly! During the XP install, create these partitions.
    Nothing can be simpler than that!
    Mrk
     
  12. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Hi Mrkvonic!

    I first erased both my XP and Linux hard drive, then installed XP and then Linux and now everything is perfect! The correct hard drive gets loaded from the boot selection menu if I select one from there and my Linux installation works. There's only one problem though: if I boot my XP hard drive from the BIOS it gets booted, but if I boot it from GRUB (the entry for XP was there automatically) it hangs on Starting Up... any help?

    Thanks in advance!
    PS: Before I installed XP though, I formatted the drive to FAT32 using PartitionMagic and it works greatly! I prefer not to have NTFS because then the connection between Linux and XP is much easier to estabilish (file sharing).
     
  13. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,697
    Hello,
    Again, post the grub menu.
    Cheers,
    Mrk
     
  14. sonic6k

    sonic6k Registered Member

    Joined:
    May 17, 2007
    Posts:
    34
    Here you go:
     
Loading...
Thread Status:
Not open for further replies.