UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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?
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:~#
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
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..
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.
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:~#
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.
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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.