Author Topic: Booting Win 7 and a Linux distro without messing with the MBR  (Read 11230 times)

irunwithscissors

  • Newbie
  • *
  • Posts: 6
Booting Win 7 and a Linux distro without messing with the MBR
« on: September 18, 2010, 01:57:51 AM »
Over the last week and a half, I have installed and reinstalled Win 7 and Linux over 17 times, the first 16 ending in GRUB errors: 12, 13, 17, etc. My setup is as follows: first controller, first channel 120G drive; second controller, first channel 400G drive. My BIOS allows booting from a CD but not a USB stick. Ideally, I would like to have Win 7 installed on the 120G drive and Linux on the 400G and boot off a CD. I think this would allow me to keep the MBR clean for default booting to Windows. The short of it is my wife doesn't want to use anything but Windows and I'm trying to learn Linux. And the problem child GRUB is wreaking havoc on my life.

I have Win 7 installed at the moment and I believe I can accomplish the Linux install without it inserting GRUB (believe I saw a check box on the advanced button of the partitioning portion of the install to not have it install GRUB).

It seems that PLOP might be able to come to the rescue, but being a noob with Linux, the way the doc pages are written doesn't lend itself to simple plug and play. Is there some noob guide I can follow to accomplish what I'm after, if it is even feasible?

walterav

  • Jr. Member
  • **
  • Posts: 61
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #1 on: September 18, 2010, 12:16:48 PM »
Which Linux Distro are you trying to install, if Ubuntu 10.04.1:

The idea will be that Windows7 is always in charge of your system, giving it the first 120GB disk on the first harddisk channel is indeed a good idea. Windows7 does some nasty checksumming of the MBR of the first disk on which it is installed. At the moment you finish a normal Ubuntu install, it will probably write grub2 to the first harddisks MBR. Therefor changing the MBR and Windows7 will fail its MBR checksum and will not boot in worst case. This was not a problem in the old days with old Windows versions, nowadays you have to fix Windows MBR after installing grub2 and after that carefully fix grub2 again etc etc. But since you have two harddisks it can be accomplished easier.

Install Windows7 to the first harddisk. Install Ubuntu with manual partitioning to the second harddisk. I recommend using GParted for adding a new clean "MBR-table" to the second harddisk 400GB its also easier with partitioning. The most important option is at the last summary page of the Ubuntu installer. There is a "advanced option" button, which give you the ability to write grub2 to /dev/sdb. I presume Windows 7 120GB disk is /dev/sda. If you don't change the location of the grub2 bootloader you might end up doing another 17 installs for next week! If you don't install grub2 at all it won't boot linux and if I'm not mistaken plop will not do that.

After install, the machine will still boot Windows7 without the ability to choose Ubuntu/Windows7. Therefor change the Bios setting to default boot the Second harddisk with grub2 bootloader which can boot Ubuntu and Chainload Windows7.

Plop still needs a functional grub installed somewhere to boot Linux. If all is working as described above its easy to add Plop to grub2 boot menu, so you can easily boot Windows7, Ubuntu and maybe USB-devices from the same menu.
« Last Edit: September 18, 2010, 12:30:27 PM by walterav »

irunwithscissors

  • Newbie
  • *
  • Posts: 6
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #2 on: September 18, 2010, 19:03:32 PM »
I dont mind putting something in the boot record or partition on the 400G drive if necessary for linux to load... i just dont want anything in the MBR of the Windows drive... That way if I screw something up, the wife can still boot Windows...

BackTrack 4Final... based off of Ubuntu 8.10... uses legacy grub...

After my experience this last week.. I have some news to share... using bootrec.exe, bcdedit.exe and bootsec.exe is a waste of time...

and yes, during the install of BT4, you can click the advance button to control if and where grub is installed. The 120G drive (first controller, first channel) shows up as hda. The 400G (second controller, first channel) shows up as sda. I have to check the BIOS on this HP a6130n to see if i can change the boot order of the drives. I know that booting off USB is not possible directly without a bit of hocus pocus. possible. Dug around a bit in the BIOS looking for the hard drive boot order and discovered I can boot off a USB stick or attached drive. Hopefully, this should make the whole operation a bit easier to deal with...

I will give the installation of BT4 a shot, putting grub on the 400G partition if I can figure out the boot order in the BIOS. Next will be figuring out Plop...
« Last Edit: September 18, 2010, 19:33:02 PM by irunwithscissors »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #3 on: September 18, 2010, 19:36:14 PM »
install grub with the advanced option to sda1, then you can run plop from the windows boot menu and boot "hdb partition 1" to start linux

regards
elmar

irunwithscissors

  • Newbie
  • *
  • Posts: 6
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #4 on: September 18, 2010, 21:25:52 PM »
UPDATE: so far so good...  :D
I have Windows 7 installed on the 120G
I have BT4 installed on the 400G

I used used unetbootin to put a copy of PLoP on a USB stick and it seems to work.  Now to figure out how to customize the PLoP menu on the stick and I will be golden...

walterav

  • Jr. Member
  • **
  • Posts: 61
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #5 on: September 19, 2010, 09:06:02 AM »
Now to figure out how to customize the PLoP menu on the stick and I will be golden...

Why not use Grub by letting the BIOS boot the second Harddisk (only if you select /dev/sda and not /dev/sda1 for grub install) or like elmar states changing the Windows Bootmenu?

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #6 on: September 19, 2010, 11:10:58 AM »
i agree with walterav

... to put a copy of PLoP on a USB stick and it seems to work.

this makes no sense. when you use the plop boot manager installed on the usb drive, then you have to change the bios boot sequence or use a bios boot menu to boot from usb and to run the plop boot manager on the usb drive. but when you do the bios stuff, then the boot manager is not required to boot linux. for your needs, starting the plop boot manager from the windows boot menu is only start mode that makes sense.

regards
elmar

irunwithscissors

  • Newbie
  • *
  • Posts: 6
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #7 on: September 19, 2010, 15:21:05 PM »
i agree with walterav

... to put a copy of PLoP on a USB stick and it seems to work.

this makes no sense. when you use the plop boot manager installed on the usb drive, then you have to change the bios boot sequence or use a bios boot menu to boot from usb and to run the plop boot manager on the usb drive. but when you do the bios stuff, then the boot manager is not required to boot linux. for your needs, starting the plop boot manager from the windows boot menu is only start mode that makes sense.

regards
elmar
Ok, I will attempt to explain the situation better...

My wife wants to sit down at the computer, turn it on and start working... She doesn't know how to go into the BIOS and change boot orders or anything of the sort... nor would I want her to...

With the new PLoP setup. She can sit down at the computer, turn it on, wait for PLoP to timeout to the default (Windows) and start working.

The only change to the BIOS that I made was to bump the USB booting ahead of the hard drive group. Doing that one time and leaving it alone. No continual changes to BIOS necessary. The BIOS boot order is: CD, USB, HD (i have no floppy)

The only menu that appears upon booting is the PLoP menu. You can select Windows (or let it time default) or, in my case, select linux and have it boot GRUB on my linux drive/partition. Since GRUB is on the Linux partition and I don't have to touch the MBR on the first drive (Windows), there are no worries about having the problem children, GRUB or the Windows Boot Manager, screw up the whole booting thing for Windows. The MBR remains untouched from the original Windows installation.

If the USB stick is removed, no big deal. The system automagically boots Windows. No hassles, no divorce  ;)

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #8 on: September 19, 2010, 15:32:04 PM »
ok, most bios are assigning the usb drive as last hard disk when an usb hard disk/flash drive is connected and not in the boot sequence, or not in the boot sequence before the internal hard disk.

it seems your bios don't do this. in this case you are using the best solution

however, from your first post, we where thinking that you want to run linux fro your second internal hard disk. and you said that usb boot is not working. thats a completely different situation.

EDIT: ok, i have seen that you changed the usb stuff in your second post. i have seen it too late.

regards
elmar
« Last Edit: September 19, 2010, 15:46:32 PM by Elmar »

walterav

  • Jr. Member
  • **
  • Posts: 61
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #9 on: September 19, 2010, 19:22:25 PM »
Well all seems working the way you had planned, but as soon as you boot the linux partition does "grub" give you the option to boot Windows instead of backtrack in the same menu? If so, the only thing you need to do is let "grub" boot Windows by "default", so your wife doesn't have to press a key just wait a couple of seconds... And you only have to set the BIOS to boot the second harddisk for once. When you want to boot backtrack you press a key and select it from the grub menu.

Unless you really don't want your wife to accidently boot into your backtrack desktop...

irunwithscissors

  • Newbie
  • *
  • Posts: 6
Re: Booting Win 7 and a Linux distro without messing with the MBR
« Reply #10 on: October 05, 2010, 05:19:32 AM »
Unless you really don't want your wife to accidently boot into your backtrack desktop...

I tried this route once before... it wasn't pretty... kept hitting the power button... because she couldn't remember what to do... (its called selective hearing [contrary to her belief, it's not a male only trait]).

until i can figure out a way to edit the menu configuration on the USB stick, she is content to arrow down to the partition windows is on and hit enter. It is still the most hassle free and spousal backlash-free scenario that i've been able to come up with. to be honest, i haven't even given it much thought after the second time she was able to get into windows on her own. I suppose its one of those "like to do at some point..." projects.