| View previous topic :: View next topic |
| Author |
Message |
DarkSpir Tux's lil' helper

Joined: 04 Feb 2005 Posts: 112
|
Posted: Thu Apr 26, 2012 4:52 am Post subject: (SOLVED) WinXP bootmanager calling GRUB doesn't work |
|
|
Okay, here's the story:
I finished my new HTPC box, single drive, one partition for everything, amd64 Gentoo, grub installed to /dev/sda. Works fine. Then I thought "If I install windows on a second drive, I could also play games on the hardware..." So I throw in another drive and tried to install windows on it... I tried because windows want to install its bootloader to the first drive.
Solution: I opened the case (again) and switched the drives. The windows drive is now the first one and Gentoo is installed on the second one. After that I fixed the grub.conf to root=/dev/sdb1 and the mount in /etc/fstab with the minimal install cd scolding myself for forgetting to do that beforehand. My partition scheme is simple: sda: sda1 Windows partition, sdb: sdb1 Gentoo Root partition. No swap, no /boot/, no nothing.
Windows installs now, boots and runs. But in order to boot Gentoo, I have to change the startup priority of the two drives in the BIOS. And I thought "There HAS to be a better way doing this." So I googled, gained some knowledge (obviously not enough, otherwise I wouldn't write this right now) and copied the installed GRUB bootloader to a file:
| Code: | | dd if=/dev/sdb of=/mnt/windows/bootsect.lin bs=512 count=1 |
And I added the GRUB file to the windows boot.ini:
| Code: | | c:\bootsect.lin="Gentoo Linux" |
Now everytime I try to load GRUB from the windows bootloader it simply returns:
| Code: | | GRUB GRUB GRUB GRUB Read Error |
I'm now officially out of ideas. I have no idea what I did wrong and how to make this work. Can somebody help me with this, please?
Last edited by DarkSpir on Thu Apr 26, 2012 6:48 pm; edited 1 time in total |
|
| Back to top |
|
 |
The Doctor l33t


Joined: 27 Jul 2010 Posts: 945
|
Posted: Thu Apr 26, 2012 4:58 am Post subject: |
|
|
Why not simply install grub on the drive the bois wants to boot from (or change the drive) and chain load the windows bootloader from grub like so (assuming grub legacy): | Code: | title Windows Vista
rootnoverify (hd1,0)
makeactive
chainloader +1 |
For refferance, my gentoo is on sda and grub recognizes it as root(hd0,0). sdb is (hd1,0) with windows vista installed. _________________ First things first, but not necessarily in that order. |
|
| Back to top |
|
 |
gentoo_zz n00b


Joined: 23 Apr 2012 Posts: 1
|
Posted: Thu Apr 26, 2012 3:17 pm Post subject: |
|
|
| U can use grub to boot windows xp.Installing grub on the whole hard disk(MBR),and use grub to boot xp.install xp first and then install linux. |
|
| Back to top |
|
 |
DarkSpir Tux's lil' helper

Joined: 04 Feb 2005 Posts: 112
|
Posted: Thu Apr 26, 2012 6:39 pm Post subject: |
|
|
Okay, I just deleted what I've written so far since I recognize my mistake. Windows is installed on the first disk, Gentoo on the second disk. To load GRUB from the second disk I swapped the drives in the bios boot priority settings. So GRUB recognizes Gentoo installed on (hd0,0) and the Windows NTFS partition on (hd1,0). So far so good.
| Code: | rootnoverify (hd1)
chainloader +1
boot |
This calls the Windows bootloader... and it simply returns "Fehler beim Laden des Betriebssystems" which roughly translates to "Error loading operation system".
My guess is when I installed Windows I had to do it on the first (and only) partition of the first drive. I swapped the drive with Gentoo and the empty, new drive by switching the plugs on the mainboard. Windows was happy and installed itself on the first drive. Now, to load GRUB from the MBR of the second drive I changed the boot priority in the bios configuration to "Boot from second drive first, then from the first drive". It loads GRUB. Like I said above, GRUB thinks the Gentoo drive is (hd0) now (but physically /dev/sdb after booting) and the Windows drive is (hd1) (physically /dev/sda after booting). I can call the Windows bootloader on (hd1) but I think it looks for the boot.ini on (hd0) and fails with that since it can't read the XFS partition there (and wouldn't find boot.ini there even if it could read XFS). And as Microsoft does things: GRUB would say "Error: I tried <this> and <that> happened so I gave up" but the Windows bootloader just says "General Error. Have fun guessing what happened here".
This is a mess... :/ |
|
| Back to top |
|
 |
DarkSpir Tux's lil' helper

Joined: 04 Feb 2005 Posts: 112
|
|
| Back to top |
|
 |
cwr Veteran

Joined: 17 Dec 2005 Posts: 1462
|
Posted: Mon Apr 30, 2012 7:30 am Post subject: |
|
|
Another approach is to boot Grub via Windows. This works with
Windows 2000 and XP, but I haven't tried it with later versions.
First install Grub, and then edit the BOOT.INI file in Windows
root directory to something like the following:
[boot loader]
timeout=10
default=c:\linux.bin
[operating systems]
c:\linux.bin="Linux Bootloader"
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect
where linux.bin is an image of the first 512 bytes of Grub's boot partition.
The system then gives you two successive menus, the first Windows, the
second Grub. With suitable timeouts, five or ten seconds, this doesn't
delay bootup much, and has the advantage of not touching the drive's MBR.
On laptops (mine at least) that sometimes causes problems.
Will |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|