Why does Linux try to take over my whole computer?

This is a discussion on Why does Linux try to take over my whole computer? within the Tech Board forums, part of the Community Boards category; I have Linux installed on one hard drive and Windows XP installed on another. They were installed separately and have ...

  1. #1
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545

    Why does Linux try to take over my whole computer?

    I have Linux installed on one hard drive and Windows XP installed on another.
    They were installed separately and have no knowledge of the other's existence.
    When I plug in both SATA drives at the same time, it always tries to boot Linux, no matter which SATA drive is in the primary slot and which is in the secondary.
    I'm not trying to create a dual-boot system, I just have the Windows drive there temporarily so I can run HDTune and test the speed of my Linux drive...

    How can I boot into Windows while the Linux drive is connected?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Configure your boot-loader to give you the choice of which OS to boot?
    http://en.wikipedia.org/wiki/GNU_GRUB
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Something to do with the bootable flag? What happens if you set the bootable flag off on the Linux partition?

    Otherwise I guess you could disable the Linux drive in BIOS? (Windows will still see it once it boots up, but of course it won't be able to access the Linux partition)

    I agree the easiest option is probably to configure your GRUB to add an option to boot Windows (just add a few lines to /boot/grub/menu.lst)

    My entry (automatically generated by Ubuntu installer) -
    Code:
    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title           Windows NT/2000/XP (loader)
    root            (hd0,0)
    savedefault
    makeactive
    chainloader     +1
    You can probably just change the "(hd0,0)" part to refer to your Windows drive and it will work.
    Last edited by cyberfish; 01-02-2009 at 02:35 AM.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > What happens if you set the bootable flag off on the Linux partition?
    Nothing, that's just where the boot record is loaded from. (ie where you find grub). You could always chuck grub on a small partition on the disk and give it the boot flag. That way grub won't care if you're running Linux + Xp, Xp or just Linux (as long as you tell it ).

  5. #5
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    I can try temporarily adding XP to the Linux boot loader, but I just don't understand why it's always using the boot loader on the Linux drive instead of the boot loader on the XP drive? Shouldn't it boot from the Primary drive?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    This is really a BIOS issue. Linux doesn't come into play until the BIOS has loaded the bootloader. Look at your BIOS configuration for the boot drive. Maybe you can find some clues there.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    My BIOS knows nothing about SATA. I had to install a SATA card.
    So the BIOS tells me nothing useful.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    And you can boot from there? Interesting.
    Anyway, the SATA card should have its own BIOS.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    I believe the card does have a BIOS, but I've never found any way to get into it (if there even is anything to get into). It says something like "Press F3 to run BIOS", and pressing F3 doesn't seem to do anything.
    Maybe there's something in it that says "Don't boot XP unless you have no other choice".
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  10. #10
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    I've never felt motivated to use the Windows MBR on a dual boot system. I just add the Windows boot partition to GRUB. Why is that not a good solution for you?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  11. #11
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Well like I said, I'm not trying to create a dual-boot system.
    I'm just trying to boot using the XP hard drive so I can run HDTune against the Linux hard drive, then I'm removing the XP drive and changing it back to a single Linux drive system.

    I could also remove the Linux drive and connect it to my good system to test it, but it's a Dell case and it's a pain in the ass to get the hard drive out from the weird place they put it.

    When I get home I'll just try adding a GRUB entry for XP and remove it when I'm finished.
    It would just be nice to know why it boots Linux no matter which drive is connected to the primary port...
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Why do you need an XP program to test the hard disk? Why not use a Linux program? I'm sure there are equivalent programs.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #13
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    All my other benchmarks were done with HDTune (which doesn't work in wine), and I just want to use the same program so I know I'm getting the right results. A different program could do something different for calculating the I/O speed...
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  14. #14
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by cpjust View Post
    All my other benchmarks were done with HDTune (which doesn't work in wine), and I just want to use the same program so I know I'm getting the right results. A different program could do something different for calculating the I/O speed...
    Fair enough. But at some insignificant time you should try and change if Linux is your primary OS?

    I've found that those SATA/IDE cards are a real pain, more than they're worth :-)

    If you only want it for benchmarking... then a way without using grub is to install the XP bootloader to the front of the disk (either as MBR or on its own partition) which you can then use to load XP from the other disk. Although it'd probably be better to put the XP bootloader on the same disk as XP, so put grub at the front instead. And when you want to boot windows just give that partition the boot flag and give back the Linux partition the boot flag when you want Linux back.

    Although I still don't see what the problem is having XP in the menu even though you can't boot it most of the time (when there's no disk) -- just make sure grub doesn't try verify the partition when it loads (some option, forgot the name ).

  15. #15
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    noverify
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wireless Network Linux & C Testbed
    By james457 in forum Networking/Device Communication
    Replies: 3
    Last Post: 06-11-2009, 11:03 AM
  2. linux, doubles, and unions
    By paraglidersd in forum Linux Programming
    Replies: 14
    Last Post: 11-19-2008, 10:41 AM
  3. Replies: 8
    Last Post: 03-10-2008, 12:08 PM
  4. Tabbed Windows with MDI?
    By willc0de4food in forum Windows Programming
    Replies: 25
    Last Post: 05-19-2005, 10:58 PM
  5. Linux Help needed
    By momo20016 in forum C Programming
    Replies: 2
    Last Post: 12-12-2002, 06:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21