Hi all,
I am newbie to opensuse linux and grub. I multiboot linux and windows from my system. First I had two windows installations on two of my three hard disks(XP, windows 7 beta) later I installed opensuse after which I can’t boot to windows. I get an “error 13:Invalid or unsupported executable file type” if I try to boot from grub.
I tried searching forums and using the bootloader from opensuse to add chainloader entries for windows for various possiblities but it didn’t work.
From the similar problems that I found while searching the forums, I thought the following information could be helpful for a solution:
linux-w4az:/home/neo # fdisk -l
Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe9b36afa
Device Boot Start End Blocks Id System
/dev/sda1 1 181 1453851 82 Linux swap / Solaris
/dev/sda2 182 1121 7550550 83 Linux
/dev/sda3 1122 2434 10546672+ 83 Linux
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a9b97
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2611 20971520 7 HPFS/NTFS
/dev/sdb2 2611 5222 20971520 7 HPFS/NTFS
/dev/sdb3 5222 7833 20971520 7 HPFS/NTFS
/dev/sdb4 7833 19457 93369780+ f W95 Ext'd (LBA)
/dev/sdb5 7834 11749 31455270 7 HPFS/NTFS
/dev/sdb6 11750 15665 31455238+ 7 HPFS/NTFS
/dev/sdb7 15666 19457 30459208+ 7 HPFS/NTFS
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0a510a50
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 2433 19543041 7 HPFS/NTFS
/dev/sdc2 2434 9729 58605120 f W95 Ext'd (LBA)
/dev/sdc5 2434 4866 19543041 b W95 FAT32
/dev/sdc6 4867 7299 19543041 b W95 FAT32
/dev/sdc7 7300 9729 19518943+ 7 HPFS/NTFS
and
my menu.1st file is like this[after messing by adding chainloader entries for windows]:
# Modified by YaST2. Last modification on Tue Feb 3 22:54:54 IST 2009
default 0
timeout 8
gfxmenu (hd2,1)/boot/message
###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd2,1)
kernel /boot/vmlinuz root=/dev/disk/by-id/scsi-SATA_ST320413A_7ED1NFH8-part2 splash=silent showopts
initrd /boot/initrd
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.0
root (hd2,1)
kernel /boot/vmlinuz root=/dev/disk/by-id/scsi-SATA_ST320413A_7ED1NFH8-part2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe
initrd /boot/initrd
title Windows XP
rootnoverify (hd2,1)
chainloader +1
title Windows XP1
rootnoverify (hd2,1)
chainloader (hd2,0)+1
title Windows2
rootnoverify (hd2,1)
chainloader /dev/sdb1
title Windows3
rootnoverify (hd2,1)
chainloader /dev/sdc1
title Windows5
rootnoverify (hd2,1)
chainloader (hd1,0)+2
title Windows 6
rootnoverify (hd2,1)
chainloader (hd0,0)+2
title Windows8
rootnoverify (hd2,1)
chainloader /dev/sdb1
title Windows9
rootnoverify (hd2,1)
chainloader /dev/sdc1
Can somebody help me to solve this multibooting problem,please?
Can you switch boot order to get to windows? You should have installed grub to sda your linux drive, that will mean you didn’t damage the mbr on the windows drives. Do you know what you did?
Thanks for replying caf4926.
I tried switching the boot sequence but i can’t boot to windows. I am afraid I had installed grub on the windows drives and damaged mbr :(. Is there any way at all then?
If you boot off an XP disk and choose the option to go into the recovery console, if my memory’s correct you have to press F2 at some stage, you can fix the windows mbr there
The command to do this is:
/fixmbr
Make sure you have the relevant XP drive set as your boot drive in bios first though
That won’t fix booting XP from grub though, just get your xp booting again and will probably tool grub
But you can set the suse drive as boot drive in bios and redo grub once you have the XP booting
I find the best way is to use the openSUSE DVD (if you have it). Select the repair installed system option. Let it fix grub. It won’t set up windows but should get openSUSE working.
Once in openSUSE go to the bootloader option in YaST and add the chainloader for windows you need.
Remove all of the entries for Windows from your Menu.lst, they are all wrong.
try:
title Windows 1
rootnoverify (hd0,0)
chainloader +1
title Windows 2
rootnoverify (hd1,0)
map (hd0)(hd1)
map (hd1)(hd0)
chainloader +1
I can not tell which one should be XP or windows 7.
When you only had MS Windows, how did you have the boot selection, ie: use windows 7 boot manger, change boot order in bios, or ?
You have some complications here to sort through, particularly if you installed Windows 7 which, with XP installed, will fundamentally change how Windows boots unless you take extra steps to isolate Windows 7 from XP (that is, prevent Windows 7 from knowing XP is there).
As it is, it appears you have Windows on the first partition of of both SATA ports 2 and 3; which Windows version is on which? And, what is the hard disk boot sequence configured in the bios; it appears that SATA port 1 is the first boot device, and that is where openSUSE is. Yet, your openSUSE menu.lst is booting from grub (hd2), which indicates that in /boot/grub/device.map (hd2) is mapped to sda; if this is the case, then of course all of your chainloading stanzas will fail because they are all pointing to sda - and furthermore, if you installed Windows 7 following XP in the default method, then W7 is using the XP root partition on its drive at its boot volume and has replaced XP’s loader with its own.
So to start sorting this out, boot into openSUSE, open a terminal, switch to root (the “su” command, no quotes), and post back here the output of:
cat /boot/grub/device.map
cat /etc/grub.conf
And, again, post back what the boot device sequence is configured in the bios, and which drive XP is on vs W7.
You currently have the grub boot loader’s stage1 installed to the sdc MBR, the first bios boot disk, calling grubs actual stage2 loader program located on sda2.
There is more than one way to install/configure the boot setup when W7 in on the same machine as XP. The following assumes you used the default W7 method, which would replace the XP boot sector in sdc1 and put W7’s bootmgr in the sdc1 root to control both Windows booting or that you installed/configured W7 fully independent from XP, in which case booting from sdc1 will only boot XP. So, first remove all the Windows stanzas currently in menu.lst; none will work. Add these; one or both should work:
title Windows 1
rootnoverify (hd0,1)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader (hd2,0)+1
title Windows 2
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader (hd2,0)+1
If you did installed/configured W7 fully independent, the second method described above, then W7’s boot control is in sdb1 and the above code will only boot XP. In this case, you will need to also add one of these for W7:
title Windows 3
rootnoverify (hd0,1)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd2,0)+1
title Windows 4
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
Try this as a replacement for Windows 3; I made a typo (sorry):
title Windows 3
rootnoverify (hd0,1)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
I suspect it will still fail, except with “BOOTMGR is missing”. Right?
Have you changed the bios boot order since installing openSUSE?
Before installing openSUSE, did you have the current bios boot order?
Microsoft asks that W7 only be installed on a “dedicated test computer.” The error “BOOTMGR is missing” suggests that W7 was installed with XP present using the default method, which would put the W7 boot manager in sdc1 rather than sdb1. Please boot into openSUSE, open a terminal, and switch to root. Then do:
mkdir /mnt/XP
mount -t ntfs-3g /dev/sdc1 /mnt/XP
ls /mnt/XP
mkdir /mnt/W7
mount -t ntfs-3g /dev/sdb1 /mnt/W7
ls /mnt/W7
And post back the output of the above. (Hint: Narrow the terminal window so that the ls output can easily fit in a posting window back here.)
Finally, in your W7 Beta, is there included on it an “RE” (Recovery Environment)? And your XP media, is that a regular installation CD or a “recovery CD” that came with the machine?