Jump to content

dual booting opensuse10 and win2k [solved]


Recommended Posts

ok, I installed OS10 together with win2k, my disk setup is below:

hd0 = - 1st partition = swap, 2nd partition = / (/boot also is here)

3rd partition is an NTFS drive for win2k data

hd1 = 1st partition = drive c: and the other is D:

 

I installed Opensuse without problem, with the default bootloader GRUB, it detected win2k and the entry on my grub menu.lst is somtething like below:

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

#entry for windows

#entry 1

title windows

chainloader (hd1,0) +1

 

#I also edit this file and add the line below since that line above does not boot the win2k

#entry 2

 

title windows

rootnoverify (hd1,0)

chainloader +1

 

#also the above did'nt work

 

#entry 3

rootnoverify (hd0,0)

chainloader +1

 

#entry 3 also did'nt work

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

 

 

so now, how should I put it correctly? so I can boot windows, hd0 is only 7.5 gig, so it does not break the LBA limit, which is supposedly not a problem with grub.

.

right now, I'v able to boot to wndows by changing the bios startup setting, change it to boot on hd1 instead of hd0, but this is not normal... when I want to boot on linux again, I have to reset the bios again...

.

Mandriva did well on this box, able to boot from grub the linux and windows, I just dont know why suse did'nt make it, or its just me...

 

edit:

I have a typo mistake, I change the rootverify to rootnoverify

Edited by aioshin
Link to comment
Share on other sites

Try:

 

title windows

root (hd1,0)

chainloader +1

 

savedefault

boot

 

If that does not work, the general question is: is hd1 a master or slave drive?

Link to comment
Share on other sites

title windows

root (hd1,0)

chainloader +1

 

root should usually be rootnoverify. I found problems when this was set incorrectly, and Windows wouldn't boot. Not sure what the difference is between the two :P

Link to comment
Share on other sites

Mine is as follows and has always worked for a couple of years.

 

 

title Windows2000-Pro

root (hd0,0)

chainloader +1

 

 

This is of course in Mandriva/Mandrake so I don't know about other Linuxes.

 

Cheers. John.

Link to comment
Share on other sites

Change the drive letters in grub ( that is: where hd0.0 put hd1.0 and vice versa ).

After that,

grub-install /dev/hdb (or whatever the device mapping of your slave drive is).

Now shutdown, swap drive connections, and boot up.

Win2000 wants to boot from a primary and active partition- and while grub should have a trick handy to fool the OS, I'm not aware of which...

Since Linux does not mind about being at some particular IDE bus, it should work.

Of course, you should also change your /etc/fstab before shutting down, else next time you will bootup you will get a kernel panic "unable to mount partition blahblah...".

Edited by scarecrow
Link to comment
Share on other sites

I think scarecrow has nailed it. Looks like Windows doesn't like being on the second hard disk, so switching them around so that Window becomes being installed on the first hard disk might actually sort it out, providing Windows boots successfully after the disks being switched to a different ordering.

 

I think I need to google, and figure out the difference between using "root" and "rootnoverify" for loading Windows :P

 

I checked here:

 

http://www.gnu.org/software/grub/manual/grub.html

 

13.3.31 root

— Command: root device [hdbias]

 

Set the current root device to the device device, then attempt to mount it to get the partition size (for passing the partition descriptor in ES:ESI, used by some chain-loaded boot loaders), the BSD drive-type (for booting BSD kernels using their native boot format), and correctly determine the PC partition where a BSD sub-partition is located. The optional hdbias parameter is a number to tell a BSD kernel how many BIOS drive numbers are on controllers before the current one. For example, if there is an IDE disk and a SCSI disk, and your FreeBSD root partition is on the SCSI disk, then use a `1' for hdbias.

 

See also rootnoverify.

 

13.3.32 rootnoverify

— Command: rootnoverify device [hdbias]

 

Similar to root (see root), but don't attempt to mount the partition. This is useful for when an OS is outside of the area of the disk that GRUB can read, but setting the correct root device is still desired. Note that the items mentioned in root above which derived from attempting the mount will not work correctly.

 

I then checked against DOS/Windows, and their config here lists using "rootnoverify" for this, since root attempts to mount the partition if this is used instead. Why, I'm not entirely sure you would use one over the other, or whether it is a good/bad thing.

 

But I suppose, if it works, hey never mind :P

 

OK, end of :offtopic:

Link to comment
Share on other sites

Actually, it may be safer (from what I suggested above ) to run

grub-install /dev/hdb

BEFORE you modify /boot/grub/menu.lst

Since I haven't tried it it may also be a lemon... anyway, try both.

Things change a bit if you have a separate /boot partition, but since you haven't one...

Edited by scarecrow
Link to comment
Share on other sites

hmmn, I wonder... but before suse, I already installed it here with Mandy 10.1, the same setup, hd0 - linux and hd1 - windows and it never gave me a problem, btw, I tried the option as per arctic:

title windows
root (hd1,0)
chainloader +1

but it fails, and I forgot to try that with (hd0,0), instead, I replace the boot loader with lilo, and the suggested entry for windows being on the second drive is:

other = /dev/hdb1
label = windows

but still it does'nt work.

.

oh, btw, when I install mandy on this box, though the set-up of the disk is the same, having hd0 - linux and hd1 - windows, but I have a different partition for /boot unlike now that I dont have, so maybe that's the key factor, I should have setup a /boot partition on OpenSuse also...

.

I maybe have to reinstall suse when Ihave the time

.

Eh, is there a chance if I'll boot linux from the NT Loader?, I found that I'll just do a command in linux

dd if=/dev/hda2 of=bootsect.lnx bs=512 count=1

assuming that /boot = hda2, but in my case right now, I dont have an /boot, it is under / which is hda3.

Then put that on C:/ and edit boot.ini

.

or Maybe I shoud have to reinstall it...with /boot of course :P

.

another thing, the reason why I set it up this way, (hd0-linux,hd1-windows) is that I dont want to touch the MBR of where the windows resides, so that when I need the windows alone, and have to remove linux, I dont need to do an "fdisk /mbr" since doing this might sometimes corrupt the partition table... at least I can just set the bios to boot to hd1 when hd0 fails.So having the grub resides at hd1 mbr is not an option that I like... ( which I think a good suggestion if you dont have the reason similar to mine)

Edited by aioshin
Link to comment
Share on other sites

Guys, finally, my problem has a solution, though I'm a little confused about it, but at least it solves the problem without reinstalling Suse just to make another partition for /boot. I got the idea from here though I did not read all the contents of that page, and I went directly to the suggested how to on grub/menu.lst

.

Below is the original entry on grub/menu.lst that yast2 generated for windows.

title Windows
chainloader (hd1,0)+1

and below is the entry I manually inserted with changes on the orig. entry

##Manual entry##
title Windows-step-one
map (hd1) (hd0)
root (hd1,0)
chainloader+1
makeactive

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows-step-two-final
chainloader (hd1,0)+1

.

now, lets see those grub menu

.

grub-001.jpg

if you can see, I made it as step-one and step-two-final, and in the code above, the entry of step-two-final is the default generated by YaST2, and step-one is the entry I manually entered.

.

For me to boot to windows, I have to select step one first, and after seleting it, it will load again another grub menu (the default - text only grub menu.. see image ( of course, if I select the first entry, it will boot suse)

.

grub-002.jpg

.

then when I select step-two, it will then load windows

.

grub-004.jpg

.

So, that solves the problem, i dont have to reinstall anything, and dont need to change the bios boot sequence just to boot to hard-disk 1 which is windows.

.

ok, if I go directly on step-two on the first grub menu, which is the default entry of YaST2, and bypassing step-one, what will happen is... see image below.

.

grub-003.jpg

.

with a blinking cursor, so I have to reboot the machine to go to grub menu again

.

So to boot to windows, steps above should be followed, that was why I labeled it with step-one and step-two.

.

mapping of drives can be found also on grub manual.. link

4.2.6 DOS/Windows

 

GRUB cannot boot DOS or Windows directly, so you must chain-load them (see Chain-loading). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.

 

If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:

 

grub> map (hd0) (hd1)

grub> map (hd1) (hd0)

 

This performs a virtual swap between your first and second hard drive.

 

Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.

 

Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.

 

If GRUB hides a DOS (or Windows) partition (see hide), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see unhide), DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition, do the following:

 

grub> unhide (hd0,0)

grub> hide (hd0,1)

grub> rootnoverify (hd0,0)

grub> chainloader +1

grub> makeactive

grub> boot

.

I just dont expect it that it will bring another grub menu, as the swap happened, so Image 2 above I think is the virtual grub menu, that assumes that windows is on hd0.

.

:P

 

thanks for those who replied!

.

Considered it solved

 

edit...04/02/2006

 

the above has a problem, as mentioned, I have step 1 and step 2 so I can boot to windows...

I found out that the entry below should fix that problem....found this out in suseforum.net...

title Windows 2000
rootnoverify (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

having the entry above, grub will directly boot Win2k, unlike the solution that I tried first, It will have another grub menu...

Edited by aioshin
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...