Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: I can't boot windows after installing ubuntu

  1. #1
    Join Date
    Feb 2013
    Beans
    14

    Talking [solved] I can't boot windows after installing ubuntu (SOLVED THANKS TO DARKOD)

    If you are having a similar issue I suggest you read through this thread to make sure you have the same issue as I did. Throughout the thread there are two working solutions; one that requires a win7 repair disk and one that can all be done from the linux terminal.

    Thanks to darkod I was pointed to this link which fixed my problem in a very easy step by step manner.

    http://sourceforge.net/apps/mediawik...ms:Boot_Sector

    MY ORIGINAL POST:
    Hi,

    I'm currently dual booting windows and linux.
    When i first installed ubuntu (after windows 7) everything worked fine except I accidentally installed the boot files to my usb flash drive for ubuntu,
    The only way i could boot ubuntu was to push f10 while my pc was starting up and select boot from my usb drive.
    So i started the process of trying to get a grub menu when my pc powered on.
    Now i got my grub working but the menu never popped up. So I used the repair tool and now a grub menu appears. However, it wont display a windows partition!
    Here is the URL the repair tool gave me.

    http://paste.ubuntu.com/1637400/


    I need to be able to boot windows. I'm hoping I didn't somehow delete my boot partition.
    Last edited by rocktheartsm4l; February 12th, 2013 at 12:01 AM. Reason: SOLVED

  2. #2
    Join Date
    Jun 2012
    Location
    Sweden
    Beans
    324
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: I can't boot windows after installing ubuntu

    Please post the output of following commands:
    Code:
    cat /boot/grub/grub.cfg
    Code:
    df -h
    Code:
    sudo fdisk -l
    Code:
    cat /proc/partitions

  3. #3
    Join Date
    Feb 2013
    Beans
    14

    Re: I can't boot windows after installing ubuntu

    Code:
    shane@SS-DeskTop:~$ cat /boot/grub/grub.cfg
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      insmod vbe
      insmod vga
      insmod video_bochs
      insmod video_cirrus
    }
    
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      load_video
      insmod gfxterm
      insmod part_msdos
      insmod ext2
      set root='(hd0,msdos5)'
      search --no-floppy --fs-uuid --set=root 3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d
      set locale_dir=($root)/boot/grub/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    if background_color 44,0,30; then
      clear
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
            set vt_handoff=vt.handoff=7
        else
            set vt_handoff=
        fi
    }
    if [ "${recordfail}" != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
    menuentry 'Ubuntu, with Linux 3.2.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d
        linux    /boot/vmlinuz-3.2.0-32-generic root=UUID=3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d ro   quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.2.0-32-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d
        echo    'Loading Linux 3.2.0-32-generic ...'
        linux    /boot/vmlinuz-3.2.0-32-generic root=UUID=3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-3.2.0-32-generic
    }
    submenu "Previous Linux versions" {
    menuentry 'Ubuntu, with Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d
        linux    /boot/vmlinuz-3.2.0-29-generic root=UUID=3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d ro   quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.2.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d
        echo    'Loading Linux 3.2.0-29-generic ...'
        linux    /boot/vmlinuz-3.2.0-29-generic root=UUID=3240cac4-ed9e-4d8a-88b5-a6533dd8cd3d ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-3.2.0-29-generic
    }
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    Code:
    shane@SS-DeskTop:~$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda5       317G  3.2G  298G   2% /
    udev            2.0G  4.0K  2.0G   1% /dev
    tmpfs           787M  920K  786M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            2.0G   80K  2.0G   1% /run/shm
    Code:
    shane@SS-DeskTop:~$ sudo fdisk -l
    [sudo] password for shane: 
    
    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xa239f0c9
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
    /dev/sda2          206848  1270138151   634965652    7  HPFS/NTFS/exFAT
    /dev/sda3      1270138878  1953523711   341692417    5  Extended
    /dev/sda5      1270138880  1945182207   337521664   83  Linux
    /dev/sda6      1945184256  1953523711     4169728   82  Linux swap / Solaris
    Code:
    shane@SS-DeskTop:~$ cat /proc/partitions
    major minor  #blocks  name
    
      11        0    1048575 sr0
       8        0  976762584 sda
       8        1     102400 sda1
       8        2  634965652 sda2
       8        3          1 sda3
       8        5  337521664 sda5
       8        6    4169728 sda6

  4. #4
    Join Date
    Jun 2012
    Location
    Sweden
    Beans
    324
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: I can't boot windows after installing ubuntu

    Tried run grub-update?
    On startup, hold SHIFT from when you see the BIOS load screen to bring the GRUB menu up.
    To make GRUB show at booot: http://askubuntu.com/questions/87409.../106706#106706

  5. #5
    Join Date
    Feb 2013
    Beans
    14

    Re: I can't boot windows after installing ubuntu

    I've tried update-grub. I already got the grub menu to display using the repair-tool. So that isn't my issue. My issue is that in the grub menu there is no windows boot. only 2 ubuntu option and a previous ubuntu version option.

    Just trying to track down the issue so that I can ask the question or search forums for the right topic: Is there a way to verify that my windows 7 boot is still intact? Or is that part of the results you had me post above?

    If my windows 7 boot is still intact I won't need a recovery disk, correct?

    and if it's not this is going to be much more complicated?

    I've been browsing forums but I'm scared to try things because I dont want to mess my system up worst.
    Last edited by rocktheartsm4l; February 11th, 2013 at 10:11 PM.

  6. #6
    Join Date
    Jun 2012
    Location
    Sweden
    Beans
    324
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: I can't boot windows after installing ubuntu

    Quote Originally Posted by rocktheartsm4l View Post
    I've tried update-grub. I already got the grub menu to display using the repair-tool. So that isn't my issue. My issue is that in the grub menu there is no windows boot. only 2 ubuntu option and a previous ubuntu version option.

    Just trying to track down the issue so that I can ask the question or search forums for the right topic: Is there a way to verify that my windows 7 boot is still intact? Or is that part of the results you had me post above?

    If my windows 7 boot is still intact I won't need a recovery disk, correct?

    and if it's not this is going to be much more complicated?

    I've been browsing forums but I'm scared to try things because I dont want to mess my system up worst.
    Run update-grub, then use the solution I linked to get the GRUB menu appear at boot.

  7. #7
    Join Date
    Feb 2013
    Beans
    14

    Re: I can't boot windows after installing ubuntu

    Quote Originally Posted by Bufeu View Post
    Run update-grub, then use the solution I linked to get the GRUB menu appear at boot.
    As I just stated. My issue is not getting the grub menu to run at boot. It does. When i start my computer the grub menu pops up. I get the options: Ubuntu, Ubuntu (recovery), and previous versions of ubuntu. There is no option to run windows 7. I can run update-grub all day and nothing is going to change.

    and by the way thank you for trying to help me I really appreciate this.

  8. #8
    Join Date
    Jun 2012
    Location
    Sweden
    Beans
    324
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: I can't boot windows after installing ubuntu

    Quote Originally Posted by rocktheartsm4l View Post
    As I just stated. My issue is not getting the grub menu to run at boot. It does. When i start my computer the grub menu pops up. I get the options: Ubuntu, Ubuntu (recovery), and previous versions of ubuntu. There is no option to run windows 7. I can run update-grub all day and nothing is going to change.

    and by the way thank you for trying to help me I really appreciate this.
    Hmm... so there's no different after running grub-update? Strange.... According to your outputs, Ubuntu finds the Windows partitions, so GRUB should do the same. Can you mount the Windows partition?
    Code:
    sudo -s
    cd /
    mkdir win_partition
    mount /dev/sda2 win_partition
    cd win_partition
    Can you see your files?

  9. #9
    Join Date
    Oct 2005
    Location
    INDY
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: I can't boot windows after installing ubuntu

    I looks to me that something has overwritten essential boot files that are usually in the first partition of Win 7 installations. ( see: pastbin link /dev/sda1) which shows grub legacy there. So grub-prober does not see the files it is looking for to make a proper entry for win7

    I think that you will need to repair the windows boot files, then probably reinstall grub into the mbr of your drive.

    Sorry I do not run win7 or 8 so I can't be much help with fixing there.
    Last edited by arpanaut; February 11th, 2013 at 10:32 PM. Reason: added some
    Castles Made of Sand,
    Fall in the Sea,
    Eventually!

  10. #10
    Join Date
    Feb 2013
    Beans
    14

    Re: I can't boot windows after installing ubuntu

    Code:
    shane@SS-DeskTop:~$ sudo -s
    [sudo] password for shane: 
    root@SS-DeskTop:~# cd /
    root@SS-DeskTop:/# mkdir win_partition
    root@SS-DeskTop:/# mount /dev/sda2 win_partition
    root@SS-DeskTop:/# cd win_partition
    root@SS-DeskTop:/win_partition# ls
    BnetLog.txt              masm32               Recovery
    comcastrelease.log       Nexon                $Recycle.Bin
    D2XP_IX86_112a_113c.mpq  NVIDIA               RHDSetup.log
    Documents and Settings   pagefile.sys         Riot Games
    extensions               PerfLogs             System Volume Information
    hiberfil.sys             ProgramData          TempEI4
    hla                      Program Files        user.js
    Intel                    Program Files (x86)  Users
    IRST.log                 realtek.log          Windows
    root@SS-DeskTop:/win_partition#
    I noticed as I was looking at the outputs you asked me for a comment that said, the grub boot menu was easy to edit. Do you think I need to add the option to boot from my windows partition to the menu? and if so how would I go about doing this?

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •