Is every system dual-bootable?

Howdy,

I have a Dell motherboard with 2-SATA disks attached. There’s apparently no BIOS option to select boot order among disks–the sequence is determined by plug-in order. The first plugged-in disk, /dev/sda, has Linux installed and I’m trying to use GRUB for dual-booting. The second, /dev/sdb, has Windows installed.

The Windows disk, /dev/sdb, has 3-partitions: the first is only 57MB and seems to be for utilities. The second one is bigger and holds the installation. The third is for system backup and data.

No matter what I do, it doesn’t find the device. Here’s my code in menu.lst:

###Added for dual boot to Windows###
title Windows XP    
    rootnoverify (hd1,1)
    makeactive
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

Note, I’ve tried (hd1,0), (hd1,1) and even (hd1,2). None work. Isn’t this strange?? I have even added (hd1) to device.map:

(fd0)	/dev/fd0
(hd0)	/dev/sda
(hd1)   /dev/sdb

Could the motherboard be preventing dual-booting? I’ve done several dual-boot systems in the past and all eventually worked fine, so I’m really hoping that someone can tell me what could possibly be afoul here? :\

Thanks!

What is the outcome of the command Fdisk -l ? (L lowercase)
You have to run it as root
dobby9

Ok, here it is…

linux-24m1:~ # fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000dea9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         523     4200966   83  Linux
/dev/sda2             524       12794    98566807+   f  W95 Ext'd (LBA)
/dev/sda3           12795       25849   104864287+  83  Linux
/dev/sda4           25850       38904   104864287+  83  Linux
/dev/sda5             524        1568     8393931   83  Linux
/dev/sda6            1569        2613     8393931   83  Linux
/dev/sda7            2614        2875     2104483+  82  Linux swap / Solaris
/dev/sda8            2876        3267     3148708+  83  Linux
/dev/sda9            3268        3790     4200966   83  Linux
/dev/sda10           3791        5357    12586896   83  Linux
/dev/sda11           5358        5749     3148708+  83  Linux
/dev/sda12           5750        8099    18876343+  83  Linux
/dev/sda13           8100        8883     6297448+  83  Linux
/dev/sda14           8884       12794    31415076   83  Linux

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x79751eb5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1           6       48163+  de  Dell Utility
/dev/sdb2   *           7       22192   178209045    7  HPFS/NTFS
/dev/sdb3           22193       29787    61006837+   f  W95 Ext'd (LBA)
/dev/sdb4           29788       30393     4867695   db  CP/M / CTOS / ...
/dev/sdb5           22193       29787    61006806    7  HPFS/NTFS

Yeah, I just wonder if the motherboard has some special feature which disallows it.

You’re NTFS is sdb2 ,in my opinion in the menu.lst it is one higher or (hd1,3)
I do not think so
dobby9

The problem is not with the motherboard, unless the drive is attached is such a way that the bios does not see it (e.g., an external drive, or a drive on a PCI-card with its own bios). In your setup what matters is that grub is able to find the second drive and to read its partition table.

There must be a bios boot configuration setup in order to specify booting from an optical drive or from floppy (if you have one). It is highly unusual for a bios new enough to support SATA to not have a hard disk sequence option. Sometimes the hard disk boot sequence is very non-intuitive - I’ve even seen it under a separate input page in bios setup. I advise you double-check this.

I presume that you’ve booted this Windows drive before by having connected it to the first SATA port?

When you try to boot Windows from grub, what do you see? Try hitting the Escape key at the grub menu to go into a text menu, then hit the ‘c’ key to drop to the grub shell, then do:

map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,1)
chainloader (hd1,1)+1
boot

Get any error message? If you get none, try this again from the grub shell:

find /boot/grub/stage2

What does grub return for that?

By the way, in your menu.lst stanza you don’t need/want “makeactive”.

It’s really strange. When I do this:

###Added for dual boot to Windows###
title Windows XP    
    rootnoverify (hd1,0)
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

it goes to the GRUB> prompt. But when I do this:

###Added for dual boot to Windows###
title Windows XP    
    rootnoverify (hd1,1)
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

it says

Error 22: No such partition

All partition numbers higher than 1 also produce this result.

Ok thanks, I just noticed your post…

Yes, there is.

No, there’s really none.

Yes, it reads

Error 21: Selected disk does not exist

It returns (hd0,0)

So what happens if you unplugg sda (linux) and just leave sdb (win)

Does it boot windows? It should

It looks like grub is on sda (linux)
so assuming the (win) disk boots when plugged in alone it should boot from grub with the following

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

You didn’t answer this question: Were you booting Windows previously from that drive in this machine, presumably by having that drive attached to SATA port number 1?

Please do the following steps exactly:

First, make copies of /boot/grub/menu.lst and /boot/grub/device.map with the file manager or from the command line (must be as root), e.g.,

cp /boot/grub/menu.lst /boot/grub/menu.lst.backup
cp /boot/grub/device.map /boot/grub/device.map.backup

Second, go into YaST Boot Loader, the Boot Loader Installation tab; check Boot from Master Boot Record only. Then under the Other button (lower right) click on Propose New Configuration. Then under Other click on Edit Configuration Files; you will be given a text editor window with a filename pull-down. For device.map it should show:

sda (hd0) 
sdb (hd1)

Instead of sda and sdb, it may use the device-ID; that’s fine. For grub.conf, it should show:

setup --stage2=/boot/grub/stage2 (hd0) (hd0,0)

For menu.lst it will probably show:

rootnoverify (hd0,0)
chainloader (hd1,1)+1

The map commands will probably not be there; if there are, remove them. And if rootnoverify is not (hd0,0), change it to that. Now click Finish and let grub be reinstalled to the MBR again. Reboot.

Now at the grub menu, click on Escape to go to text menu, and click on the Windows entry. That will probably fail (but we still want to test that); reboot, Escape to the text menu, click ‘c’ to the shell, and do this exactly:

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

Important: The rootnoverify points to a different partition, and the chainloader is fully qualified.

If that fails, do the following very carefully (a mistake could be very bad): Reboot into openSUSE, open a terminal window, switch to root, and do:

cd /boot
dd if=/dev/sdb2 of=sdb2pbr bs=512 count=1
xxd sdb2pbr

Post back here the output of the last command and what happened doing all of the above.

Finally, does this machine have a bootable floppy drive?

I’ll explain why we’re doing all of the above after you post back the results. Please be precise.