LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Tags used in this thread
Popular LQ Tags , , , , , , , , ,

Reply
 
Thread Tools
Old 06-19-2009, 05:23 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0
Grub error


[Log in to get rid of this advertisement]
Hi all

When my PC reboots and I try to access a OS, when it comes to accessing XP from grub menu I get the following error

Invalid or unsupported executable format

My grub is

Code:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title		Microsoft Windows XP Professional
rootnoverify	(hd1,0)
savedefault
makeactive
map		(hd0) (hd1)
map		(hd1) (hd0)
chainloader	+1
TT
tommytomato is offline  
Tag This Post , , , , , , ,
Reply With Quote
Old 06-19-2009, 07:54 AM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Sligo, Ireland
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,050
Blog Entries: 1
Thanked: 41
Ok, I'm gonna show you the Grub entries I have for Vista:

Code:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title		Windows Vista (loader)
rootnoverify	(hd0,0)
savedefault
makeactive
chainloader	+1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title		Windows Vista (loader)
rootnoverify	(hd0,1)
savedefault
makeactive
chainloader	+1
The first one is to boot the main vista partition, and the second one is to boot the recovery partition. Looking at your entries I see this:
Quote:
map (hd0) (hd1)
map (hd1) (hd0)
and I wonder why it's there? To my mind, this is similar to what should be there:
Code:
title		Microsoft Windows XP Professional
rootnoverify	(hd1,0)
savedefault
makeactive
chainloader	+1
Just a note on the rootnoverify entry: the (hd1,0) means the first partition on the second harddisk. Can you verify that is where your xp installation resides?
irishbitte is offline     Reply With Quote
Old 06-19-2009, 08:04 AM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
I have two hard drives

first is Ubuntu

second is XP

Quote:
fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0008195a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 29698 238549153+ 83 Linux
/dev/sda2 29699 30401 5646847+ 5 Extended
/dev/sda5 29699 30401 5646816 82 Linux swap / Solaris

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

Device Boot Start End Blocks Id System
/dev/sdb1 1 30400 244187968+ 7 HPFS/NTFS
/dev/sdb4 * 1 1 0 0 Empty
Partition 4 does not end on cylinder boundary.
root@smeghead:~#
TT
tommytomato is offline     Reply With Quote
Old 06-19-2009, 10:16 AM   #4
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
I jumped into grub and reloaded it

Quote:
grub> find /boot/grub/stage1
(hd0,0)

grub> root (hd0,0)

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.

grub> quit
my menu.lst is

Quote:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
when rebooting and picking XP it comes up and says starting up and then just hangs

I even reboot the OS with a fresh install and it still comes up with error 13

TT
tommytomato is offline     Reply With Quote
Old 06-19-2009, 10:20 AM   #5
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Sligo, Ireland
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,050
Blog Entries: 1
Thanked: 41
Ok, looking at this:
Quote:
Device Boot Start End Blocks Id System
/dev/sdb1 1 30400 244187968+ 7 HPFS/NTFS
/dev/sdb4 * 1 1 0 0 Empty
Partition 4 does not end on cylinder boundary.
I seem to see that your windows partition is not marked with a boot flag. This means that your computer is set to not boot from this partition.
You will need to
1. install gparted in ubuntu,
2. open it up,
3. set to scan on /dev/sdb
4. find your windows partition
5. right click on the windows partition
6. click on Manage Flags in the submenu
7. mark 'boot'
8. exit gparted
9. reboot your machine

if this does not work, come back and post here, and I'll try to help.

Last edited by irishbitte; 06-19-2009 at 10:22 AM..
irishbitte is offline     Reply With Quote
Old 06-19-2009, 10:23 AM   #6
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Sligo, Ireland
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,050
Blog Entries: 1
Thanked: 41
Also, I see that /dev/sdb4 is marked bootable, that needs to be have the boot flag removed, and if you have nothing in it, I would get rid of it by deleting it in gparted.
irishbitte is offline     Reply With Quote
Old 06-19-2009, 11:03 AM   #7
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
The flag is ticked boot, it was all ready ticked

TT
Attached Images
File Type: png Screenshot1.png (96.5 KB, 2 views)
tommytomato is offline     Reply With Quote
Old 06-19-2009, 11:08 AM   #8
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
here is a fresh fdisk -l

Quote:
root@tomatoland:~# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0008195a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 29698 238549153+ 83 Linux
/dev/sda2 29699 30401 5646847+ 5 Extended
/dev/sda5 29699 30401 5646816 82 Linux swap / Solaris

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

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30400 244187968+ 7 HPFS/NTFS
root@tomatoland:~#
TT
tommytomato is offline     Reply With Quote
Old 06-19-2009, 03:06 PM   #9
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Sligo, Ireland
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,050
Blog Entries: 1
Thanked: 41
I think windows partition is gone.

What is the result of an attempt to boot into windows? I note from your screenshot that tho the partition is marked bootable, there is no 'used' information for the partition, implying it is empty.

I am attaching a screenshot from my own gparted info. The highlighted partition is the main vista partition, it should give you an idea what it should look like.
Attached Images
File Type: png Screenshot--dev-sda - GParted.png (80.3 KB, 3 views)
irishbitte is offline     Reply With Quote
Old 06-19-2009, 07:16 PM   #10
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
It does look like there is nothing there

I may of deleted it when I did a fresh install of Ubuntu

at one stage I could access the windows drive from Ubuntu but now I cant

I'm going to see if I can recall the windows HD with a XP disk

TT
tommytomato is offline     Reply With Quote
Old 06-19-2009, 07:48 PM   #11
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
Some strange stuff going on here

I wacked in the XP disk, had a look at the drives and it says XP was there, so I hit F3 to get out of it, now XP boots up, but there's NO grub menu now, LOL

How do I get grub back up ?

TT
tommytomato is offline     Reply With Quote
Old 06-19-2009, 08:27 PM   #12
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
I cant seem to access the root tree from the live CD
Any idea's on how to get the grub back up ?

only way I can access my Linux is from the Ubuntu CD as a live CD

I tried to access the grub and typing in find /boot/grub/stage

here is what I get

error 15: file not found

TT
tommytomato is offline     Reply With Quote
Old 06-20-2009, 02:27 AM   #13
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
I had to install that super grub program via XP to get it to work, now I have a strange grub, but it works

TT
tommytomato is offline     Reply With Quote
Old 06-20-2009, 02:45 AM   #14
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
LOL

Super grub only worked once, I'm back to the same deal

my menu.lst file has

Quote:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
TT
tommytomato is offline     Reply With Quote
Old 06-20-2009, 03:50 AM   #15
tommytomato
Member
 
Registered: Nov 2003
Location: Rockingham Western Australia
Distribution: GUI Ubuntu 9.04 - Server Ubuntu 6.06-1
Posts: 748
Thanked: 0

Original Poster
Well its got me foxed big time, no matter what i change or do, nothing works

Quote:
fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0008195a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 29698 238549153+ 83 Linux
/dev/sda2 29699 30401 5646847+ 5 Extended
/dev/sda5 29699 30401 5646816 82 Linux swap / Solaris

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

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30400 244187968+ 7 HPFS/NTFS
TT
tommytomato is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 07:53 PM
Loading Grub 1.5 Please Wait...... Grub Failed Error 18 2words4uready Linux - Newbie 5 06-12-2008 06:37 PM
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration