Find the answer to your Linux question:
Results 1 to 10 of 10
Whenever I select Windows 7 under GRUB, it just hangs at a flashing underscore windows 7 is installed under my first primary partition, what should the GRUB section look like ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9

    GRUB won't boot into windows 7, and windows 7 recovery erases ubuntu...


    Whenever I select Windows 7 under GRUB, it just hangs at a flashing underscore
    windows 7 is installed under my first primary partition, what should the GRUB section look like for it?
    I can't check what mine looked like because this happened:

    1. I started up the windows 7 recover (another option under GRUB, on hd(0,3). 7 is on hd(0,1)) and it worked.
    2. I decided that i wanted to try something else before i restore my windows 7 partition to its factory state, so i exit the recovery thing.
    3. Next thing I know, my Ubuntu partition is completely gone, along with my grub.cfg files -.-



    Partitions are like this in this order:
    sda1: Windows 7 (can't boot into)
    sda8: ubuntu (gets erased)
    sda5: partition i'm going to use soon for another distro
    sda6: Fat 32 partition for media files, etc.
    sda7: swap partition
    sda3: Windows Recovery
    sda4: really small fat32 partition that i think ASUS uses for quick boot

    Asus Eee PC btw.

    oh, and by default, there was like 20 MB of free space in front of my windows partition (idk why asus did that) and when i shrunk my first partition (the windows one) it moved it all to the left -.- do you think something when wrong while doing that?

    Although when I reinstalled Ubuntu, it still gave me the option to use my bookmarks and stuff from my windows 7 partition. And I can access all of the files.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Which version of Ubuntu are you using?
    Although when I reinstalled Ubuntu, it still gave me the option to use my bookmarks and stuff from my windows 7 partition. And I can access all of the files.
    Is Ubuntu booting up fine now? Post the exact output of fdisk -l command here? Post the contents of /boot/grub/menu.lst file too. In case

    Code:
    sudo fdisk -l
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9
    Everything boots fine from GRUB aside from windows 7 (windows 7 recovery, another partition, boots up fine, though)

    hm, i ran it while reinstalling ubuntu from a live CD and it displayed this:

    Code:
    ubuntu@ubuntu:~$ sudo fdisk -l
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8da2c67c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        6534    52484323+   7  HPFS/NTFS
    /dev/sda2            6535       29093   181205167+   5  Extended
    /dev/sda3           29094       30400    10485760   1b  Hidden W95 FAT32
    /dev/sda4           30400       30401       16064+  1b  Hidden W95 FAT32
    /dev/sda5           11762       13078    10578771   83  Linux
    /dev/sda6           13079       28800   126286933+   b  W95 FAT32
    /dev/sda7           28801       29093     2353491   82  Linux swap / Solaris
    /dev/sda8            6535       11541    40218664+  83  Linux
    /dev/sda9           11542       11761     1767118+  82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Disk /dev/sdb: 8019 MB, 8019509248 bytes
    255 heads, 63 sectors/track, 974 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x6f20736b
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1         974     7823623+   b  W95 FAT32
    it's done installing now and now only this is being output:
    Code:
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8da2c67c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        6534    52484323+   7  HPFS/NTFS
    /dev/sda2            6535       29093   181205167+   5  Extended
    /dev/sda3           29094       30400    10485760   1b  Hidden W95 FAT32
    /dev/sda4           30400       30401       16064+  1b  Hidden W95 FAT32
    /dev/sda5           11762       13078    10578771   83  Linux
    /dev/sda6           13079       28800   126286933+   b  W95 FAT32
    /dev/sda7           28801       29093     2353491   82  Linux swap / Solaris
    /dev/sda8            6535       11541    40218664+  83  Linux
    /dev/sda9           11542       11761     1767118+  82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    /boot/grub/grub.cfg displays this (GRUB 2 was installed by Ubuntu, not GRUB 1)
    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s /boot/grub/grubenv ]; then
      have_grubenv=true
      load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
      saved_entry=${prev_saved_entry}
      save_env saved_entry
      prev_saved_entry=
      save_env prev_saved_entry
    fi
    insmod ext2
    set root=(hd0,8)
    search --no-floppy --fs-uuid --set 686b613a-6efb-48cd-a687-61f2e1ffa317
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    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/white
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry "Ubuntu, Linux 2.6.31-14-generic" {
            recordfail=1
            if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,8)
        search --no-floppy --fs-uuid --set 686b613a-6efb-48cd-a687-61f2e1ffa317
        linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=686b613a-6efb-48cd-a687-61f2e1ffa317 ro   quiet splash
        initrd    /boot/initrd.img-2.6.31-14-generic
    }
    menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
            recordfail=1
            if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        insmod ext2
        set root=(hd0,8)
        search --no-floppy --fs-uuid --set 686b613a-6efb-48cd-a687-61f2e1ffa317
        linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=686b613a-6efb-48cd-a687-61f2e1ffa317 ro single
        initrd    /boot/initrd.img-2.6.31-14-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows 7 (loader) (on /dev/sda1)" {
        insmod ntfs
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set f8126b77126b3a30
        chainloader +1
    }
    menuentry "Windows Vista (loader) (on /dev/sda3)" {
        insmod fat
        set root=(hd0,3)
        search --no-floppy --fs-uuid --set 066c-cc6c
        chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### 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 ###

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Problem is with Windows OS only because Partition Structure and contents of grub.cfg are correct.
    You have to fix Windows OS using recovery partition or other tools. First of all, re-install Windows Boot Loader and check what error message it throws on boot up. Fix Windows OS problems.
    Its really easy to re-install GRUB2 later on.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9
    Ah, okay, thanks. Eee PC doesn't have a CD drive...so I use the recovery partition? That'd erase Ubuntu again, wouldn't it? >.>
    And all of my windows files?

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    No. Recovery will remove GRUB from MBR and re-install Windows Boot Loader only. It doesn't edit Partition table.

    If Windows OS boot up fine, just boot up from Ubuntu LiveCD and mount root partition of Ubuntu
    Code:
    sudo mkdir /media/ubuntu
    sudo mount /dev/sdaX /media/ubuntu 
    sudo grub-install --root-directory=/media/ubuntu /dev/sda
    sudo umount /dev/sdaX
    * Replace X with Ubuntu partition number.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Your Harddisk have two swap partitions. There is no need to create more than one swap partition even if you have installed more than one Linux distro. All Linux distros can share same SWAP partition.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #8
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9
    Oops, yeah, when i reinstalled, it made another swap partition.

    I tried running recovery, all it did was erase my ubuntu partition. Grub is still installed in the MBR now so i can't boot to anything currently

  9. #9
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,109
    If you are having trouble repairing your win 7 boot using the recovery CD, you might try downloading EasyBCD and running it. It repairs vista/win 7 bootloader and is easy to use. Good documentation is available.

  10. #10
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9
    I don't have a CD drive. And I can't boot into my Windows partition.

Posting Permissions

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