executable format

Asked by dave

Ok so I had windows XP originally and then i wanted to try out ubuntu so i did ..accidentaly i pressed install on teh desktop and it installed using the guided partition ( the whole thing) i would like to know if there is anyway to get back my windows XP i tried doing gedit to be able to see the words Windows XP Home but when i press enter it says something about teh executable format and how it doesn't recognize it and basically it doesn't work.. please help.. thx in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
dave
Solved:
Last query:
Last reply:
Revision history for this message
Alli (alzeih) said :
#1

When you boot your computer, a menu comes up looking like:

Ubuntu
Ubuntu (recovery)
Memtest
....

Is there windows in the list? Use the arrow keys to get to it and then you can boot from it.

From what you said it installed ubuntu on the full disk. - If windows is on another disk then it might still be there. Did you have a disk d: or e: under windows (ie: not a dvd/cd drive but another hard drive)?

Revision history for this message
dave (dave14nyc) said :
#2

Ok i didn't have windows on the list but i added it but when i try to boot it it says invalid executable format or such. I downloaded Ubuntu onto a CD then i was booting it from the D drive and i clicked install which was on the desktop and i did a guided partition.

Revision history for this message
dave (dave14nyc) said :
#3

Oh yes i did have Ubuntu , Ubuntu (recory) , Memtest

Revision history for this message
Alli (alzeih) said :
#4

Yeah the top 3 entries are defaults for ubuntu.

Can you attach /boot/grub/menu.lst just from the ## ## End Default Options ## line.
Also attach /etc/fstab and the output of df -a

(for the files.. they print into a terminal if you type cat 'filename' )

Revision history for this message
dave (dave14nyc) said :
#5

um sorry i don't know what you mean?

Revision history for this message
dave (dave14nyc) said :
#6

i'm not that familiar with Ubuntu i just started it and i want windows XP back please explain a bit more

Revision history for this message
debianmigrant (debianmigrant) said :
#7

What he means is - please run the following command in a terminal (Applications -> Accessories -> Terminal)

gedit /boot/grub/menu.lst

and

gedit /etc/fstab

and copy/paste the content of those 2 files here.

Revision history for this message
dave (dave14nyc) said :
#8

ok for gedit /boot/grub/menu/.lst it says

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=501b3f3a-a0eb-480a-8d17-2b7af7360e06 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=501b3f3a-a0eb-480a-8d17-2b7af7360e06 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=501b3f3a-a0eb-480a-8d17-2b7af7360e06 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST
title Microsoft Windows XP
root (hd0,0)
savedefault
makeactive
chainloader +1

and for gedit /etc/fstab it says
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=501b3f3a-a0eb-480a-8d17-2b7af7360e06 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=31498012-82b1-43e1-b175-3900ed45c56b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec 0 0

Revision history for this message
Alli (alzeih) said :
#9

Thanks debianmigrant for stepping in - im in the middle of exams :( (and he is a she btw... no offence taken :) )

Your error "executable format" is probably because you are trying to load windows from a partiton which has ubuntu on it, not windows! the (hd0,0) means disk 1, partiton 1 (numbered from zero because computers count from zero).

In your fstab you have /dev/sda1 which is (hd0,0) to grub - and this is where ubuntu is installed for you.

If you only have one disk... then everything will be on (hd0,*) somewhere.

What to try:
open the terminal and type

sudo gedit /boot/grub/menu.lst
and enter your password for the password.

scroll down to this section:

title Microsoft Windows XP
root (hd0,0)
savedefault
makeactive
chainloader +1

and change 'root (hd0,0)' to one of (hd0,1) or (hd0,2) or (hd0,3).

Reboot and choose Windows and hope it boots.

If it doesn't for all of them:

Open a terminal

type:
sudo apt-get install gparted
(your password at prompt)

let it install. Then find gparted in the menu (probably under something like administration or sytem : if can't find open a run dialogue and run 'gksu gparted' no quotes)

Take a screenshot (alt-prtsc) and upload it to flikr or photobucket (anywhere really) and send me the link. or describe everything in the window to me.

This is all in all a really fiddly way to have a look at your partition table... im sure there is a nicer way but don't know it sorry. But at least from this I will be definitely be able to tell you if you still have windows or not.

Thankyou for your patience!

Revision history for this message
dave (dave14nyc) said :
#10

Ok i tried hd o,1 but now it says device not found, see i think what i did was i installed ubuntu over windows xp and now it's deleted. I have a windows XP installation CD but when i try to install it says No Hard Disk Drive found how can i make room for Windows XP to come in or to uninstall Ubuntu and be able to install Windows XP.

Revision history for this message
Alli (alzeih) said :
#11

The easiest way is to boot into the ubuntu live cd and run gparted there. Make your whole disk into one partiton and format it as fat32 or ntfs. If gparted complains something is mounted and cannot be changed, open a terminal and type

'sudo umount -a' (no quotes)

this will not unmount the swap drive, so just leave it on the disk for now, its easier, and doesnt affect windows.

Revision history for this message
dave (dave14nyc) said :
#12

can you like make a small tutorial including every step ( I know i am very un pro like I am very sorry!) Could you explain how to make my whole disk into one partition and how to format it as fat32 or ntfs

Revision history for this message
dave (dave14nyc) said :
#13

also how do i check if my whole disk is alredy in on epartition

Revision history for this message
dave (dave14nyc) said :
#14

my friend said something about my SATA drive and taht's why im getting Hard Drive Disk not found or something help pleasee

Revision history for this message
Alli (alzeih) said :
#15

This guide is probably your best bet.

http://www.windowsxphome.windowsreinstall.com/installxpcdoldhdd/indexfullpage.htm

At the partitioning stage, as long as you have no partitions you want to save, just delete everything and make a new partition the full size of the disk.

Is this ok?

Revision history for this message
dave (dave14nyc) said :
#16

alright thanks yes this helped ! thankyou very much