Bug 119174

Summary: Work around Windows boot loader bug when it's not on first disk
Product: [openSUSE] SUSE LINUX 10.0 Reporter: nex totux <charelschiltz>
Component: OtherAssignee: Joachim Plack <jplack>
Status: RESOLVED FEATURE QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P5 - None CC: adrianeli, ari.kaihola, dhernan3, duwe, jplack, tcj
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description nex totux 2005-09-28 07:51:37 UTC
A bug with Grub, while trying to boot Windows.

System: 
AMD Athlon 64 3500
Mainboard: Asus 8NE (Nforce4)

first Ide drive (suse; hd0)
second Ide Drive (ntfs; hd1)
Sata Drive (windowssystem; ntfs; hd2)

Grub and Suse is installed on hd0. Suse is mounting the 2 windows ntfs harddiscs
without a problem. But when trying to boot Windows from Grub Menu, it fails. (no
error message, just some garbage) To boot windows, i have to change the booting
order in the bios of the mainboard.

There is a solution that might be integrated inside Suse. To boot Windows on the
Sata Windows Drive with grub, I changed the Grub options like this:

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

and it works.
Comment 1 Michael Gross 2005-09-28 10:27:11 UTC
Reducing severity to `normal'.
Comment 2 Michael Gross 2005-09-28 10:29:43 UTC
Please provide your complete menu.lst-file and the output of `fdisk -l'.
Comment 3 nex totux 2005-09-28 16:42:26 UTC
actaul menulst file: (which works now)

# Modified by YaST2. Last modification on Mi Sep 28 18:39:21 CEST 2005

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,0)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX 10.0
    root (hd0,0)
    kernel /boot/vmlinuz root=/dev/hda1 vga=0x31a selinux=0    resume=/dev/hda5
 splash=silent showopts
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd2,0)
    map (hd0) (hd2)
    map (hd2) (hd0)
    makeactive
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX 10.0
    root (hd0,0)
    kernel /boot/vmlinuz root=/dev/hda1 vga=normal showopts ide=nodma apm=off
acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off 3
    initrd /boot/initrd


fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        9399    75497436   83  Linux
/dev/hda2            9400        9729     2650725    5  Extended
/dev/hda5            9400        9729     2650693+  82  Linux swap / Solaris

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        4462    35840983+   7  HPFS/NTFS
/dev/hdb2            4463        9728    42299145    f  W95 Ext'd (LBA)
/dev/hdb5            4463        9728    42299113+   7  HPFS/NTFS

Disk /dev/sda: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9039    72605736    7  HPFS/NTFS

Comment 4 Torsten Duwe 2005-09-29 11:02:57 UTC
And what does /boot/grub/device.map look like? 
Did you ensure its content is correct? 
Comment 5 nex totux 2005-09-29 12:09:32 UTC
I dont have the device map right now here at work, but it is ok. I never changed
anything to it. It is a problem that arrives when windows is installed on the
2nd or third harddrive and not on the first harddrive. I just discoverd that it
is also described in GRUB manual.

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

Because it is a know problem and because there is a known working solution, I
wonder if it is possible to add this solution to the SUSE install programm. (if
windows is on 2nd harddisc, automatically change grub menulst to... map etc)
Comment 6 Torsten Duwe 2005-09-29 12:28:41 UTC
Thanks for digging this out. I don't use Windows at all, and I guess our 
customers usually have it on the first disk. 
Comment 7 nex totux 2005-09-29 12:48:27 UTC
Thank you for your fast reply. Normaly Windows is on first disc. The reason why
it is different for me and also for some other people:

I have Windows on the SATA Drive (which is a pain in the ass to install with
windows). At the same time, i have an old ide disc and i want to try Linux on
that harddisc. Because there were some problems in the past with Grub in the mbr
of the windows disc, I want to leave the windows hard drive completly unchanged. 

So, what I did: I changed the booting order in the bios. The IDE disc is now the
disc 1; Grub and Suse are installed on the first disc, the ide disc, and the
SATA Windows Disc stays unchanged as a second hardisc. Quite practical for
people who want to try out linux, but are afraid of changes on the windows
drive.(and still want to boot Windows with grub from time to time, which doesn't
work currently out of the box)
Comment 8 Torsten Duwe 2005-09-29 13:26:13 UTC
Yet another case... 
 
There is a way to spare the MBR, but it is now quite well hidden. 
 
Jiri, do you remember to make this the default again (grub _not_ in MBR) ? 
AJ has acked this already for 10.1. 
Comment 9 Jiri Srain 2005-10-03 11:05:55 UTC
GRUB not in MBR (by default) has been submitted for 10.1 Alpha 1. But this bug 
is IMHO about something else: 
 
Windows were installed thinking /dev/sda is 0x80 (and it probably was). But 
this is something I don't know how to determine. I have to device whether 
- sda was 0x80 while installing Windows 
or 
- sda was 0x82 as detected during linux installation 
 
The adjustment changes according to BIOS settings. So, I'm afraid that if I 
make the remapping by default, someone else will complain. Torsten, what do 
you think about the problem? 
Comment 10 Jiri Srain 2005-10-04 10:54:31 UTC
*** Bug 119807 has been marked as a duplicate of this bug. ***
Comment 11 Torsten Duwe 2005-10-05 12:04:49 UTC
I know, that this is about something else, it was just a related reminder. 
 
My opinion: as I stated before, I don't use Windoze, and thus have only 
limited knowledge about its quirks. Proceed as you like. 
Comment 12 Jiri Srain 2005-10-21 13:45:35 UTC
*** Bug 128919 has been marked as a duplicate of this bug. ***
Comment 13 Jiri Srain 2005-12-15 12:09:46 UTC
Reasigning to new maintainer
Comment 14 Cyril Hrubis 2006-10-31 16:01:44 UTC
*** Bug 216111 has been marked as a duplicate of this bug. ***
Comment 17 Alexander Osthof 2007-05-10 13:40:52 UTC
*** Bug 119623 has been marked as a duplicate of this bug. ***
Comment 21 Joachim Plack 2008-03-20 04:25:07 UTC
reevaluate for SLE11
Comment 22 Christoph Thiel 2008-04-17 13:17:39 UTC
feature exists: 301994