LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   GRUB Dual boot Slackware 11.0/Windows 98 not working (http://www.linuxquestions.org/questions/linux-software-2/grub-dual-boot-slackware-11-0-windows-98-not-working-671667/)

MacUser 09-22-2008 05:42 PM

GRUB Dual boot Slackware 11.0/Windows 98 not working
 
I am running Slackware 11.0 on a Toshiba Libretto 70CT on a 20GB drive. Slackware works fine, and has been working for a few months. Lately, I have been needing a Windows program to run on this computer. GRUB version 0.97. I took an image of the original 1.6GB hard drive (with Windows 98) and restored it to a partition of the same size on the new drive (the partition is /dev/hda2). I've kept the Windows partition inside the 8.4GB cap that the BIOS sets (I can work around this by putting /home on a separate partition outside the cap, which can be accessed once the kernel loads). I believe I have my /etc/menu.lst configured properly, because GRUB doesn't give me any errors at boot time (and because most of it was configured by grubconfig). Here's the Windows part of /etc/menu.lst, since the rest is working fine.
Code:

# Windows bootable partition config begins
  title Windows 98
  map (hd0,0) (hd0,1)
  map (hd0,1) (hd0,0)
  rootnoverify (hd0,1)
  makeactive
  chainloader +1
# Windows bootable partition config ends

All that happens when I select the Windows boot item is this:
Code:

  Booting 'Windows 98'

map (hd0,0) (hd0,1)
map (hd0,1) (hd0,0)
rootnoverify (hd0,1)
makeactive
chainloader +1

Then it just hangs there, with a little blinking cursor underneath. If I try to type anything at this point it just beeps at me. I think the problem is with the chainloader +1 command, that it is not pointing to the right sector or something, but I'm not sure what to put there instead.

keefaz 09-22-2008 06:45 PM

Quote:

rootnoverify (hd0,1)
Are you sure it is not: rootnoverify (hd0,0)
My logic tells me that as you maped hda1 to hda2 ( map (hd0,0) (hd0,1) ) and then maped hda2 to hda1 ( map (hd0,1) (hd0,0) ); then you have to select the false hda1 (hd0,0) as root partition for windows, no ?

MacUser 09-22-2008 07:02 PM

Quote:

Originally Posted by keefaz (Post 3288700)
Are you sure it is not: rootnoverify (hd0,0)
My logic tells me that as you maped hda1 to hda2 ( map (hd0,0) (hd0,1) ) and then maped hda2 to hda1 ( map (hd0,1) (hd0,0) ); then you have to select the false hda1 (hd0,0) as root partition for windows, no ?

No, according to GRUB the syntax of map is

Code:

map TO_DRIVE FROM_DRIVE
so I mapped hda2 to hda1 and then hda1 to hda2. I'm not even sure why I need that section of code, it doesn't make much sense and the results are the same without it (it doesn't work).
I've tried it the other way also and it doesn't work (it says GRUB Loading stage2............... then reboots the computer instead).

keefaz 09-22-2008 07:14 PM

Yes I was not saying about the map lines, but the rootnoverify line
I mean did you try the same config but with this line: rootnoverify (hd0,0)

Also maybe wrong syntax for map lines, should be:
Code:

map (hd0) (hd1)
map (hd1) (hd0)

According to info grub

MacUser 09-22-2008 07:41 PM

Quote:

Originally Posted by keefaz (Post 3288725)
Yes I was not saying about the map lines, but the rootnoverify line
I mean did you try the same config but with this line: rootnoverify (hd0,0)

Also maybe wrong syntax for map lines, should be:
Code:

map (hd0) (hd1)
map (hd1) (hd0)

According to info grub

I was talking about the rootnoverify line too. Yes I tried it with the other syntax

Also, the map lines you gave don't work (I get an I/O error: replace disk and try again). They don't make sense anyway because I want to map the partitions, not the entire drive. Drive (hd1) does not exist on my machine, but partition (hd0,1) does.

keefaz 09-22-2008 08:11 PM

Ah I guess that's where the confusion come from,
the grub map command seems to work only from drive to drive, not from partition to partition

MacUser 09-22-2008 08:19 PM

Quote:

Originally Posted by keefaz (Post 3288778)
the grub map command seems to work only from drive to drive, not from partition to partition

That's odd because grubconfig set it up mapping between partitions, and in the grub help file (/boot/grub/grub.txt) it also showed the same way. But you would think that the book would work without mapping anything, since all those two map lines do is essentially nothing. But the result is the same regardless.

Larry Webb 09-23-2008 03:46 AM

Windows is picky and wants to be in the first bootable partition. If it is not you need to hide what is and let windows think it is. Here is a tutorial that explains chainloading in detail.

http://www.justlinux.com/forum/showt...hreadid=147959

Now this is overkill but does explain how and why he had to hide the partitions and map the drives. Windows also needs to be in a primary partition.

MacUser 09-28-2008 08:24 AM

Quote:

Originally Posted by Larry Webb (Post 3289039)
Windows is picky and wants to be in the first bootable partition. If it is not you need to hide what is and let windows think it is.

OK well I tried LILO because hiding the partition permanently messed up GRUB and that didn't work and now I think my MBR is corrupted and a whole bunch of partitions are screwed up so I think I'll just restore from the complete HD image I took before and try again. If you think of anything else that might work, please let me know.

Larry Webb 09-28-2008 08:54 AM

Install windows first and then the rest. If you are installing two distros install linux second and let the default setup your partitions and grub automatically.

MacUser 10-24-2008 05:25 PM

Thanks for the advice.


All times are GMT -5. The time now is 02:00 PM.