I can't get my system to load Windows XP. It's dual-boot, and the selection for "Windows XP Home" returns a "Error 13: Invalid or Unsupported Executable Format" error.
I posted on the Ubuntu boards, -not knowing how long that might take, -is there anyone here whom know what to do here?
Here is dialogue of my compliant as-posted on Ubuntu Help:
I have read several "Error 13: Invalid or Unsupported Executable Format" threads and so far, nothing has helped.
My stats:
Dual-boot, WIN-XP is master (on C: drive) and Ubuntu (Gutsy) is on the slave/secondary HDD.
Nothing was done differently or abnormally the last time I used XP, but the next day upon trying to boot I chose to start Window XP, and get the error message:
"Error 13: Invalid or Unsupported Executable Format"
I tried re-booting several times and tried 'tapping on the F8 key during start-up' to hopefully get into Windows' "SAFE MODE", but cannot get beyond the "Error 13: Invalid or Unsupported Executable Format" message. Clearly, it's in GRUB(??)
I can use Ubuntu on the secondary drive just fine, of course.
So, from Terminal, I tried typing:
sudo gedit /boot/grub/menu.1st
and edit that file to read:
title Windows XP
root (hd0,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
and SAVE the file, re-boot, and still no change from the "Error 13: ~" message.
What is wrong here? I rather desperately need to get my XP-drive back. I have NOT edited any files on XP (such as boot.ini, etc..) No re-naming of drives or folders, etc.
Can anyone assist me?
Regards,
-Joel
stalebrew
02-22-2008, 01:41 PM
did you edit menu.1st or menu.lst (LST VS 1ST)
WebJoel
02-22-2008, 02:01 PM
did you edit menu.1st or menu.lst (LST VS 1ST)
Probably *1st (one-es-tee). There is a *Lst (el-es-tee)? Is "el-es-tee" the correct one to edit?
stalebrew
02-22-2008, 02:26 PM
yeah, edit the menu.lst not the one-s-t. Even if the file doesnt exist and you gedit a file, it will just create a new file.Once you open menu.lst you will see a bunch of lines already written. Find the existing windows entry and then edit it to this:
title Windows XP
root (hd0,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Oh yeah, always be sure to create a backup of the file, or write down the original values just in case.
stalebrew
02-22-2008, 02:35 PM
Whats weird is you said you had Windows XP already working and booting from the GRUB menu? could be a bigger problem, but try editing the grub menu to point towards the right partition.
WebJoel
02-22-2008, 03:16 PM
-Whats weird is you said you had Windows XP already working and booting from the GRUB menu? could be a bigger problem, but try editing the grub menu to point towards the right partition.
-You've lost me here now.
A dual-boot system, with WIN_XP on C:, and Ubuntu on the secondary HDD. When my computer boots, it 'defaults' to boot Ubuntu on the slave and I am presented with option (and 7-seconds to respond) to scroll-down and select "Windows XP Home Edition" (on C: ), else, it boots the default (Ubuntu). And you keep saying "partition", -no, two hard-drives. :) XP-on C: and Ubuntu on the slave drive. XP was installed *first*, and Ubuntu installed entirely upon and 100% of the second HDD. There are no 'partitions' involved for either. :) Basically, the easiest 'Linux newbie' set-up possible.
...but try editing the grub menu to point towards the right partition. It seems to be pointing in the right direction but encountering a non-executable file (hence the "Invalid or Unsupported Executable Format". -A *txt file, for instance. It wants an executable, lending me to think now that I may have to use the OEM-disk and run RECOVERY to repair the boot.ini(??). Probably Windoze found out that I've been dating Linux on the sly for awhile and now, -it's P.O.'d at me... :cool:
Anyone, -does this sound valid? I *use* Ubuntu but have to admit that I know very little about how to fix it when it/Windows boot, goes sour... :( GRUB merely points the way and mine is set-up to default to Ubuntu with option for XP....
stalebrew
02-22-2008, 03:56 PM
After you install Ubuntu, no matter what hdd or partition(you actually have at least 3 partitions - your ntfs, your ext2 and your linux swap) it will use the grub menu to select which partition to boot.
By default it selects ubuntu which is on hd1,0(or hd1,1 depening on your swap partition) meaning your second hard drive and the first partition of that harddrive.
Windows is pointing to hd0,0 which is harddrive 1 and partition 1.
Sometimes your harddrive has other partitions for system utilities or like Dell, mediadirect.
I have ubuntu installed on my single harddrive with a dual boot option just like you except I have 5 partitions.
Dell utility: hd0,0
Windows: ntfs at hd0,1
FAT32(share): hd0,2
linux swap: hd0,3
EXT2(linux): hd0,4
So my grub menu goes like so
Ubuntu root (hd0,4)
Windows XP root (hd0,1)
Hopefully this makes sense.
What I was saying is to make sure your menu.lst file has windows pointing to the right drive and partition. Most likely you only have your single partition on that drive which would be hd0,0 but I wasn't sure.
Also when editing the menu.lst file make sure you are editing the windows XP entry near the bottom of the file. There is an example near the top which you can tell is an example because of the # before each line.
stalebrew
02-22-2008, 03:59 PM
Copy and paste what your menu.lst file looks like..
scragar
02-22-2008, 04:04 PM
why not take the boot flag of the second drive and put it back on the first HD, see if windoze can boot without grub.
make sure you have your ubuntu live CD ready to put boot flags back when your done, windoze is a little restritive about messing with that sort of thing.
WebJoel
02-22-2008, 07:12 PM
Well let's start small here... how can I view files/folder over on C: (the XP drive)? I used to be able to, -can't seem to find the method here to view. I am on E: right now (Ubuntu)... used to be able to view my hard-drives and access across them... now, -can't locate this.
Hell, -I'd settle for being able to boot C:- again (to use XP), and re-install Ubuntu dual-boot over on E:...
stalebrew
02-22-2008, 08:00 PM
well they should be mounted in /media/ or you should be able to see them on the left pane of your file browser or places menu. sounds like something else is wrong. try booting just your C: drive. aka disable your e: drive and power up your computer.
WebJoel
02-22-2008, 08:04 PM
-How do I 'disable' the E-drive? :confused: The slave-drive comes on with the C:-drive, -right?
PLACES - Computer -shows two icons: "CD-RW drive" and "filesystem". Clicking on "filesystem" I see many folders, including "media", which only contains "cdrom" and "cdrom0"...
Here is where *I thought* I used to have shown the HDDs of my computer... (includ. the 80GB "C" drive, from where I could view/copy/access my XP stuff...)
stalebrew
02-22-2008, 08:14 PM
Yeah you should have the other drives listed there. By disable I mean unplug the power from the HDD inside your computer case
stalebrew
02-22-2008, 08:22 PM
or since you have two actual drives, check /mnt/ or something like /dev/hdc/.
And if unplugging your second drive doesnt work, you may have to fix your master boot record (mbr). To do this pop in your windows cd, run recovery console and type fixmbr.
This will however change your mbr so GRUB does not load.
Or you could try to boot into windows with a bootdisk
bootdisk.com
WebJoel
02-22-2008, 08:31 PM
or since you have two actual drives, check /mnt/ or something like /dev/hdc/.... /mnt/ and /dev/ are both empty (no files or folders)... :confused:
(<-- jumping back-n-forth between here and Ubuntuhelp forums... think I may have to call it a night 'cause this is giving me a headache.. ) :\
-But THANKS everyone for the help so far! :)
scragar
02-22-2008, 08:38 PM
If your windows drive is mounted it's /media/disk or some such, if it's not mounted try creating the directorymkdir /media/diskand mounting it:mount /dev/hda1 /media/disk for an IDE drivemount /dev/sda /media/diskfor sata drives or on ubuntu Gutsy. you will need root perms.
you could also look for it on cat /proc/partitions to see what partition number/device name it has if that doesn't work.
to bypass grub and try windows without grub as a boot loader.
use gparted(not installed by default:sudo apt-get install gparted to view your devices and partitions, take boot flag of the ubuntu partition(on the second HD) and add it to the windows partition(right click the partition and pick edit flags). You will need the live CD to restore these flags later, don't worry, the live CD's all have gparted on them.
EDIT: hda1(partition), not hda(device).
WebJoel
02-22-2008, 11:16 PM
omg I hope I am smart enough to do all that. :eek: Anyway, I am making small progresses here and, -I used to *live in DOS* in the 80s, -so it's all kind of coming back around again...
And this is re-enforcing my contention of the weakness of the quintessential M$ product/s... I'm really, really starting to like Linux all over again! :D
Stephen Philbin
02-23-2008, 05:55 AM
Just a quick tip for the future to give yourself more room to manoeuvre if you have bootloader trouble in the future, Joel. When you are booting more than one OS and one of them is Windows, try to leave the MBR (Master Boot Record) on the Windows HDD untouched, and try to make sure that the Grub bootloader is installed to the MBR of one of your Linux distributions. This way, something happens to your MBR, you won't have to tinker with an already fragile Windows installation to regain access to it and you can easily get in to your Linux distro of choice with your install disk or various other means. It would enable you to easily boot Windows again by simply changing the order your computer looks for a HDD to boot. Telling it to look for the Windows HDD first will bypass Grub and Windows would boot normally (as if it was the only OS on the only HDD in the computer).
WebJoel
02-23-2008, 04:13 PM
Just a quick tip for the future to give yourself more room to manoeuvre if you have bootloader trouble in the future, ... -I'm still digesting all this information folks! :D
I *seem to have* recused my WIN-XP drive, it is the 'sole bootable' right now (and now I am having Linux withdrawl symptoms despite the hugs & accolades from my wife whom desperatly requires WIN_XP to work)..
Instead of 'unhooking my E-drive', I booted while pressing the DEL key, and edited C-MOS to make the HD0 ("C:") be the first-primary loaded drive, followed by CD and E. The effectively makes Linux-on-E 'unavailable' to me at the moment, but the OEM-disk and "R" to "restore" may have helped (even though I know about as much of DOS-current as I know of Terminal commands, ...anyway..). Seems to have worked. Ran "chkdsk" and it said it found an "unrecoverable error". Ran it a second time and this time, no errors(??!!?).
Ran two more commands to 'repair' the boot sector (is this the right expression?), -seemingly, no change, but upon shut-down & re-start, -Win-XP loaded correctly. :confused::D
-And, -I am not kidding about 'missing Linux' already... I was just starting to get tight with it.
Soon... :D
Thanks for the helps peeps. :)
-Joel
stalebrew
02-23-2008, 04:47 PM
<3 chkdsk! Did you try to boot into your E: and see if the grub menu still works like it once did?
scragar
02-23-2008, 06:11 PM
I know exactly what you mean about missing linux, I had to shut down my linux box for about 2 hours this afternoon while I upgraded and it felt terrible using a windows machine for my little tasks while I put together the new computer.
on the other hand I now have a super powerful computer and I'm in the process of installing multiple distro's onto it so I can shop and change so to speak(I've still not decided on my distro of choice, so I'm doing a lot of hopping from the "just plain work but won't let you fix anything that goes wrong" world of ubuntu to the "build everything yourself and get nothing handed to you, not even a propper installer" planet of gentoo -- and as for picking a desktop enviroment forget it, as it is I use KDE half the time, Gnome about 30% of the time and fluxbox the remainder).
WebJoel
02-23-2008, 06:13 PM
I changed directories to get into E: but at that point, not being familair with whatever version of DOS that WIN-XP uses (7 or 8+??, -my forte is DOS 5.0 and 5.5... anything after DOS 6 is bunk), didn't know what to do, what to look for. Most of the "HELP" wasn't, and the DOS 5.x commands that I know, -didn't recognize. :(
*I suspect* that since hd0 is the default first-boot now, and finding a HDD with a boot executable, it 'boots' successfully (to XP), bypassing GRUB on my Linux-on-E:.
When I feel safe enough to switch the C-MOS to boot (in this order) CD-0, Floppy, E:, then C: again, I can see if first-boot E comes up (with GRUB), giving me the chance to either allow E-boot Linux, or key/scroll-down to "XP HOME" again...
I mostly think that the problem was on "C" (with XP, etc.) and that "E" was never in problem or danger. I had re-installed my Ubuntu last night and about 190 packages and restored the distro to 'my satisfaction' sans the images and folders from "C" that I want mirrored upon "E", so right now I'm feeling pretty good about myself. -I figure it's gonna be 'beer-thirty' here in a little bit so no more tweagesness tonight. -Goin' to kick-back and have a tall cold sudsy one and chips. :D
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.