The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Vista wont boot after installing Ubuntu 8.10 x64

    Discussion in 'Linux Compatibility and Software' started by mr_bankai, Dec 20, 2008.

  1. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    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?
     
  2. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    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
    Good Luck..
     
  3. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    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!
     
  4. archer7

    archer7 Notebook Evangelist

    Reputations:
    289
    Messages:
    647
    Likes Received:
    0
    Trophy Points:
    30
    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
    
    Now, if, hypothetically, you have a second hard drive and your Vista partition is /dev/sdb3, the first line should be root (hd1,2). The important thing to note is that grub IDs partitions and block devices starting from 0.
     
  5. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30

    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?
     
  6. archer7

    archer7 Notebook Evangelist

    Reputations:
    289
    Messages:
    647
    Likes Received:
    0
    Trophy Points:
    30
    I edited my last post right after your reply. Please try the new code, see if it works. :)
     
  7. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    that's exactly what i did, and just did it again to double check...still error 12... :(
     
  8. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    (General instructions for editing the Grub parameters under Ubuntu from this howto)
    Code:
    gksudo gedit /boot/grub/menu.lst
    Then this is your Vista entry if /dev/sda5 is your Vista OS partition;
    Code:
    title Microsoft Vista
    rootnoverify (hd0,4)
    makeactive
    savedefault
    chainloader +1
    OR this is your Vista entry if /dev/sda6 is your Vista OS partition;
    Code:
    title Microsoft Vista
    rootnoverify (hd0,5)
    makeactive
    savedefault
    chainloader +1
    I would assume that sda5 was your Vista OS partition, but it's better that you make sure which one it is. BTW, this is how I understand the Grub device naming convention;
    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...
    The thing to remember is that even if you don't have 4 primary partitions first, the extended partition naming still begins at (hd0,3). So your Grub drive configuration naming should be;
    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
    Good Luck and Safe travels..
     
  9. archer7

    archer7 Notebook Evangelist

    Reputations:
    289
    Messages:
    647
    Likes Received:
    0
    Trophy Points:
    30
    I learn something new every day. :D
     
  10. nizzy1115

    nizzy1115 Notebook Prophet

    Reputations:
    2,557
    Messages:
    6,682
    Likes Received:
    1
    Trophy Points:
    205
    Did you overwrite the vista partition?
     
  11. puter1

    puter1 Notebook Deity

    Reputations:
    95
    Messages:
    776
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  12. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Did that...still the same error...

    Nope, if i mount the partition in ubuntu all my files are still there...
     
  13. archer7

    archer7 Notebook Evangelist

    Reputations:
    289
    Messages:
    647
    Likes Received:
    0
    Trophy Points:
    30
    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'?
     
  14. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    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..
     
  15. puter1

    puter1 Notebook Deity

    Reputations:
    95
    Messages:
    776
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  16. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Yes, that's the error I'm getting

    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


    No, vista is installed onto a primary partition. I originally had a dual boot setup with xp and vista. I wiped my xp partition and installed ubuntu in its place. All OSs were installed on primary partitions
     
  17. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    This doesn't agree with the partition map you posted previously.
    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
    So using your explanation you wiped your XP installation from /dev/sda1 and replaced it with Ubuntu. Correct? Then what primary partition is Vista installed in? Your remaining primary partition, /dev/sda3, is your Linux swap partition, and your 2 NTFS partitions, /dev/sda5, and /dev/sda6 are logical partitions in your extended partition, /dev/sda2.

    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).
     
  18. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Really??? hmm...that's strange...Dont know why it would have installed itself on a logical partition...I thought windows defaulted to creating primary partitions for itself...So i guess i have no hope of reviving vista until i get home then huh?
     
  19. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    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...
     
  20. puter1

    puter1 Notebook Deity

    Reputations:
    95
    Messages:
    776
    Likes Received:
    0
    Trophy Points:
    30
    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_

    If at all possible, if you can save the data on your drives to some external drive or media, I would re-do your system. Create 4 primary partitions (well, 3 will be NTFS) and one is an extended partition. The logical partitions from that, I would have one small partition and then one more about 15-20 GB size for Ubuntu. You could always use the 1st logical partition you create for a separate grub partition if you feel up to it. That would give you lots of options.

    Then read the grub page and set up operating systems to boot via chainloading.
     
  21. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    upon deleteing the "makeactive" command i get a little further..."starting up..." and it hangs there :rolleyes:

    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.
     
  22. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    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..
     
  23. mr_bankai

    mr_bankai Notebook Evangelist

    Reputations:
    24
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    The guide that Jas provided did the trick! thanks everyone for your patience and assistance!