Ok, I realize this is a common problem and that you guys are probably sick of hearing this...but after scouring through forums and google I've come up empty so any help would be nice. Here's my problem:
After installing Ubuntu, GRUB failed to recognize my Vista partition. No big deal...so i went and added it manually...
root (hd0,0)
savedefault
makeactive
chainloader +1
Got error 13: invalid or unsupported executable format
I then tried to mapping it and different partitions (hd1, hd2, etc)
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
savedefault
makeactive
chainloader +1
I get this: Error 21: Selected disks does not exist
I gathered from my searching that I probably deleted Vista from the MBR. And the solution is to reinstall via the vista install disc. My problem is that Im on a trip and i dont have my discs. But I need Vista up before I return. Is there any way to correct this problem without the vista discs? and is that even the correct solution for my problem?
-
You do NOT want to reinstall the Vista bootloader. Then the GRUB bootloader won't run. What you need to do is make sure you have the correct entry for your Vista partition.
Post the output of the command;
Code:sudo fdisk -l
-
ok, fdisk gave me the following:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5bfacaa8
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2362 18972733+ 83 Linux
/dev/sda2 2612 30400 223215142+ f W95 Ext'd (LBA)
/dev/sda3 2363 2611 2000092+ 82 Linux swap / Solaris
/dev/sda5 2612 6527 31455238+ 7 HPFS/NTFS
/dev/sda6 6528 30400 191759841 7 HPFS/NTFS
What changes do i need to make to get vista to boot? thanks! -
Do you know how grub's naming scheme works?
If your Vista partition is /dev/sda5, the first line should be root (hd0,4).
If it's /dev/sda6, the line should be root (hd0,5).
Try the following, assuming it's in /dev/sda5:
Code:title Vista rootnoverify (hd0,4) makeactive chainloader +1
-
Thanks, but that didnt work...I got "error 12: invalid device requested"
I had 1 hdd so i did (hd0,4) and yea...anything else im doing wrong? -
I edited my last post right after your reply. Please try the new code, see if it works.
-
-
(General instructions for editing the Grub parameters under Ubuntu from this howto)
Code:gksudo gedit /boot/grub/menu.lst
Code:title Microsoft Vista rootnoverify (hd0,4) makeactive savedefault chainloader +1
Code:title Microsoft Vista rootnoverify (hd0,5) makeactive savedefault chainloader +1
Code:(hd0,0) first primary partition on first hard disk (hd0,1) second primary partition (hd0,2) third primary partition (hd0,3) fourth primary partition (usually an extended partition) (hd0,4) first logical partition (hd0,5) second logical partition ... ... (hd1,0) first primary partition on the second hard disk...
Code:(hd0,0) /dev/sda1 * 1 2362 18972733+ 83 Linux (hd0,3) /dev/sda2 2612 30400 223215142+ f W95 Ext'd (LBA) (hd0,2) /dev/sda3 2363 2611 2000092+ 82 Linux swap / Solaris (hd0,4) /dev/sda5 2612 6527 31455238+ 7 HPFS/NTFS (hd0,5) /dev/sda6 6528 30400 191759841 7 HPFS/NTFS
-
-
Did you overwrite the vista partition?
-
Yeah, that's why I told someone if you decide to combine Windows and Linux on the same disk to partition your drive first and create all the partitions you're allowed which means four primary and then the last partition you create, you make that an extended partition (which divides into logical partitions if you want more). The other primary partitions you format NTFS and then you can install XP and/or Vista in them.
It's easier if you are a stickler for an easy to follow partition sequence (sda1, sda2 etc. etc.). It's mostly for aesthetics but not only will it look neater, it's probably generally easier to follow in the event of partition/booting issues as well.
I also advise to create a dedicated / separate grub partition in one of the logical partitions (via extended), too. Set up your grub files in there and then chainload your operating systems. -
-
bankai, can you post the actual contents of your menu.lst here?
I don't understand why it wouldn't work if the partition is indeed healthy. Are you still getting 'Error 12: invalid device requested'? -
Ok.. Well I learned something new today. Apparently Windows doesn't like booting from a logical partition, although some users have configured their systems for it. Apparently this howto, from this thread, will walk you through the process. The unfortunate part is it looks like you need your Vista OS disc. Sorry..
You can read more on this subject from this thread, although ge.ubuntuforums.com is down now. Here's the Google cache of the thread.
Good Luck.. -
I wouldn't use a logical partition for Windows. Why create more headache than you need? That's just me, though.... Up to you...
I have some ideas for you to try but I would like to use a disclaimer.
Try this?:
Give output in:
/boot/grub/menu.lst -> for e.g., try this: $ cat /boot/grub/menu.lst
Then try:
sudo grub
grub> rootnoverify (hd0, 4) [either sda 5 or sda6 has Vista? Then either hd0, 4 or hd0, 5]
grub> makeactive
grub> chainloader +1
grub> boot_
If that fails...
run "fixboot" from the Vista Recovery console:
http://support.microsoft.com/kb/927392/en-us ( http://support.microsoft.com/kb/927392/en-us)
In case (either step of ) this overwrites grub, you can reinstall Grub from the Ubuntu LiveCD or any Linux LiveCD. I also use System Rescue CD.
Reinstalling GRUB to MBR:
sudo grub
and at the grub prompt:
root (hd0,0) [assuming first hard disk and first partition]
setup (hd0)
quit
*Use at own risk although you should be fine. -
menu.lst is as follows:
# 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 4
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 2
## 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=cf90ca21-d3d7-421b-8aaa-26138ea438d6 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=cf90ca21-d3d7-421b-8aaa-26138ea438d6
## 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 8.10, x64 (Secure Workstation)
uuid cf90ca21-d3d7-421b-8aaa-26138ea438d6
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=cf90ca21-d3d7-421b-8aaa-26138ea438d6 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (Recovery Mode)
uuid cf90ca21-d3d7-421b-8aaa-26138ea438d6
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=cf90ca21-d3d7-421b-8aaa-26138ea438d6 ro single
initrd /boot/initrd.img-2.6.27-7-generic
title Ubuntu 8.10, Memory Test86+
uuid cf90ca21-d3d7-421b-8aaa-26138ea438d6
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to seperate the manu items below from the Debian
# ones
title Other operating systems:
root
# This entry automatically added by the Debian installer for non-linux OS
# on /dev/sda5
title Windows Vista Ultimate, x86 (Gaming Setup)
root (hd0,4)
savedefault
makeactive
chainloader +1
-
Code:Device Boot Start End Blocks Id System /dev/sda1 * 1 2362 18972733+ 83 Linux /dev/sda2 2612 30400 223215142+ f W95 Ext'd (LBA) /dev/sda3 2363 2611 2000092+ 82 Linux swap / Solaris /dev/sda5 2612 6527 31455238+ 7 HPFS/NTFS /dev/sda6 6528 30400 191759841 7 HPFS/NTFS
Good Luck..
BTW, archer7's Grub original notation was right, and I was wrong. I thought your swap partition was a logical partition, but I see now that it's not. So if /dev/sda5 is your Vista partition Grub would denote it as (hd0,4), with /dev/sda6 as (hd0,5). -
-
Ok, so i just read the how-to jas refered me to and there is a download for the vista cd there so i'm going to give that a shot. with any luck that'll fix this...cant believe this is all over a stupid logical partition...
-
You get grub error #12 because you tried to run Grub's 'makeactive' command when trying to boot Windows from a logical partition.
Source:
http://users.bigpond.net.au/hermanzone/p15.htm#12_
Then read the grub page and set up operating systems to boot via chainloading. -
I will definately reinstall everything when i get back but the logical partition fix will have to do until then(assuming i can get it to work). will update you guys once i've finished giving it a go. -
Removing the makeactive command from your Vista Grub menu entry alone, will not solve your problem, (as you can see). You need to follow the howto I linked to earlier in this thread and follow all of the steps there. Specifically you need to make sure you install the missing Vista boot files INTO the Vista logical partition. Then follow the remaining steps involving booting the Vista recovery CD and editing the BCD on your Vista partition. This should enable your system to allow Grub to boot you into either your Ubuntu primary partition, or your Vista logical partition.
Good Luck.. -
The guide that Jas provided did the trick! thanks everyone for your patience and assistance!
Vista wont boot after installing Ubuntu 8.10 x64
Discussion in 'Linux Compatibility and Software' started by mr_bankai, Dec 20, 2008.