Page 1 of 5 123 ... LastLast
Results 1 to 10 of 41

Thread: Grub 2 - Windows 7

  1. #1
    Join Date
    Jun 2005
    Beans
    9

    Grub 2 - Windows 7

    I have not used Ubuntu since 7.10--so Grub 2 is particularly new for me and as such I am sort of lost.

    I installed the Ubuntu partitions manually by resizing my main partition and creating a swap and ext4 partition in the new free space. Both my Windows 7 boot partition and the main (C:) partition are still in tact and there has been no data loss.

    Grub2, however, did not automatically add Windows 7. I have no idea how to work with its syntax and I am also not very sure if grub handles Windows 7 differently than previous windows releases.

    Could anyone tell me how to manually or automatically add my windows 7 partition?

    Thanks!
    Last edited by Sef; December 17th, 2009 at 06:25 AM. Reason: Disabled Smilies in Text

  2. #2
    Join Date
    Jul 2005
    Location
    England
    Beans
    Hidden!

    Re: Grub 2 - Windows 7

    https://wiki.ubuntu.com/Grub2
    Everything you need is here.

  3. #3
    Join Date
    Jun 2008
    Location
    L'viv, Ukraine
    Beans
    53
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Grub 2 - Windows 7

    Quote Originally Posted by Cole View Post
    I have not used Ubuntu since 7.10--so Grub 2 is particularly new for me and as such I am sort of lost.

    I installed the Ubuntu partitions manually by resizing my main partition and creating a swap and ext4 partition in the new free space. Both my Windows 7 boot partition and the main (C partition are still in tact and there has been no data loss.

    Grub2, however, did not automatically add Windows 7. I have no idea how to work with its syntax and I am also not very sure if grub handles Windows 7 differently than previous windows releases.

    Could anyone tell me how to manually or automatically add my windows 7 partition?

    Thanks!
    $ sudo update-grub

  4. #4
    Join Date
    Sep 2008
    Location
    Philadelphia, PA
    Beans
    5,193
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Grub 2 - Windows 7

    I would run in terminal from 9.10 sudo update-grub as requested by SlonUA.

    Reboot and if windows still is not in the GRUB menu do this:

    Let's get a better look at your setup & boot process. Boot into Ubuntu. Come back here and use the link in my signature to download the Boot Info Script to the desktop. Once on desktop open a terminal (Applications > Accessories > Terminal) and run this command
    Code:
    sudo bash ~/Desktop/boot_info_script*.sh
    This will create a RESULTS.txt file on the desktop. Paste the entire contents of that file back here. Once pasted highlight all text and click the # sign on the toolbar to place code tags around the text.
    Multi-boot: Arch linux, Ubuntu 12.04, Windows 7 & Windows 8

  5. #5
    Join Date
    May 2007
    Location
    Virginia, USA
    Beans
    13,186
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Grub 2 - Windows 7

    When you run update-grub in a terminal, it will report back on every OS (and kernel) it finds, one row at a time. You should see it report on finding Windows 7, although it might say Windows OS Loader.
    Ubuntu 16.04 Mate, Mint 18 Mate; MS Win 8.1, MS Win10 Pro.
    Will not respond to PM requests for support -- use the forums.

  6. #6
    Join Date
    May 2008
    Location
    Lisbon, Portugal
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Unhappy Re: Grub 2 - Windows 7

    Having the same problem here, after a kernel upgrade to 2.6.31-19...

    I'v been using 9.10 for a while and after a kernel upgrade it seems that the upgrade-grub script doesn't run the /etc/grub.d/30_os-prober and so it doesn't find oter OSses...

    And upgrade-grub insists in generating menu.lst that I would think it's no longer necessary with grub2.

  7. #7
    Join Date
    Sep 2008
    Location
    Philadelphia, PA
    Beans
    5,193
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Grub 2 - Windows 7

    Quote Originally Posted by ferdez View Post
    Having the same problem here, after a kernel upgrade to 2.6.31-19...

    I'v been using 9.10 for a while and after a kernel upgrade it seems that the upgrade-grub script doesn't run the /etc/grub.d/30_os-prober and so it doesn't find oter OSses...

    And upgrade-grub insists in generating menu.lst that I would think it's no longer necessary with grub2.
    I need to see what you have on that machine. Do this:

    Boot the Ubuntu Live CD/USB. Choose "try ubuntu without any changes", when the desktop loads come back here and do the following:

    1. Download the boot info script. There is link in my signature.
    2. Once downloaded move the boot info script to the desktop.
    3. Open a terminal and run the command
    Code:
    sudo bash ~/Desktop/boot_info_script*.sh
    This will create a RESULTS.txt file on the desktop. Paste the entire contents of that file back here. Once pasted highlight all text and click the # sign on the toolbar to place code tags around the text.

    See here for more info on the boot info script.

    Above link is to meierfra's Sourceforge web page.
    Multi-boot: Arch linux, Ubuntu 12.04, Windows 7 & Windows 8

  8. #8
    Join Date
    May 2007
    Location
    Virginia, USA
    Beans
    13,186
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Grub 2 - Windows 7

    Quote Originally Posted by ferdez View Post
    Having the same problem here, after a kernel upgrade to 2.6.31-19...

    I'v been using 9.10 for a while and after a kernel upgrade it seems that the upgrade-grub script doesn't run the /etc/grub.d/30_os-prober and so it doesn't find oter OSses...

    And upgrade-grub insists in generating menu.lst that I would think it's no longer necessary with grub2.
    Presence's script will show us what you have -- but if I had to guess, I would say you updated from 9.04 to 9.10 because that will not automatically install GRUB2 and running update-grub will simply rewrite the legacy menu.lst file.
    Ubuntu 16.04 Mate, Mint 18 Mate; MS Win 8.1, MS Win10 Pro.
    Will not respond to PM requests for support -- use the forums.

  9. #9
    Join Date
    Apr 2008
    Beans
    11,465

    Re: Grub 2 - Windows 7

    In deed run the Boot Info Script and post those results here. To be sure you don't have a "mixed bag" of legacy grub and grub2 files it would also help to see the output of:

    Code:
    grub-install -v
    Code:
    ls /boot/grub

  10. #10
    Join Date
    Feb 2010
    Beans
    1

    Re: Grub 2 - Windows 7

    Hi Guys i Have the same problem please find the revelant information below.

    Thanks

    Boot Info Script 0.55 dated February 15th, 2010

    ============================= Boot Info Summary: ==============================

    => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
    partition #6 for /grub.

    sda1: __________________________________________________ _______________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files/dirs: /bootmgr /Boot/BCD /grldr /boot/grub/core.img

    sda2: __________________________________________________ _______________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System: Windows 7
    Boot files/dirs: /Windows/System32/winload.exe

    sda3: __________________________________________________ _______________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files/dirs:

    sda4: __________________________________________________ _______________________

    File system: Extended Partition
    Boot sector type: -
    Boot sector info:

    sda5: __________________________________________________ _______________________

    File system: swap
    Boot sector type: -
    Boot sector info:

    sda6: __________________________________________________ _______________________

    File system: ext2
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files/dirs: /grub/menu.lst /grub/grub.cfg /grub/core.img

    sda7: __________________________________________________ _______________________

    File system: ext3
    Boot sector type: -
    Boot sector info:
    Operating System: Ubuntu 9.10
    Boot files/dirs: /etc/fstab

    =========================== Drive/Partition Info: =============================

    Drive: sda ___________________ __________________________________________________ ___

    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x7e0ef28c

    Partition Boot Start End Size Id System

    /dev/sda1 * 2,048 206,847 204,800 7 HPFS/NTFS
    /dev/sda2 206,848 399,859,711 399,652,864 7 HPFS/NTFS
    /dev/sda3 399,859,712 522,751,999 122,892,288 7 HPFS/NTFS
    /dev/sda4 522,755,100 625,137,344 102,382,245 5 Extended
    /dev/sda5 616,494,438 625,137,344 8,642,907 82 Linux swap / Solaris
    /dev/sda6 522,755,226 523,140,659 385,434 83 Linux
    /dev/sda7 523,140,723 616,494,374 93,353,652 83 Linux


    blkid -c /dev/null: __________________________________________________ __________

    Device UUID TYPE LABEL

    /dev/sda1 7A9035119034D57B ntfs System Reserved
    /dev/sda2 344A37C34A3780A2 ntfs
    /dev/sda3 9402522202520A1E ntfs backup file
    /dev/sda5 a699e4ce-95f3-40de-b8aa-e261fe921112 swap
    /dev/sda6 e2289dee-7b24-48b6-98b5-338656e6c9a1 ext2
    /dev/sda7 bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ext3

    ============================ "mount | grep ^/dev output: ===========================

    Device Mount_Point Type Options

    /dev/sda7 / ext3 (rw,errors=remount-ro)
    /dev/sda6 /boot ext2 (rw)
    /dev/sda3 /media/backup file fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)
    /dev/sda1 /media/System Reserved fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)
    /dev/sda2 /media/344A37C34A3780A2 fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)


    =================== sda1: Location of files loaded by Grub: ===================


    ??GB: boot/grub/core.img

    ============================= sda6/grub/menu.lst: =============================

    # 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 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3

    ## 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=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=e2289dee-7b24-48b6-98b5-338656e6c9a1

    ## 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

    ## specify if running in Xen domU or have grub detect automatically
    ## update-grub will ignore non-xen kernels when running in domU and vice versa
    ## e.g. indomU=detect
    ## indomU=true
    ## indomU=false
    # indomU=detect

    ## 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 9.10, kernel 2.6.31-19-generic
    uuid e2289dee-7b24-48b6-98b5-338656e6c9a1
    kernel /vmlinuz-2.6.31-19-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro quiet splash
    initrd /initrd.img-2.6.31-19-generic

    title Ubuntu 9.10, kernel 2.6.31-19-generic (recovery mode)
    uuid e2289dee-7b24-48b6-98b5-338656e6c9a1
    kernel /vmlinuz-2.6.31-19-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro single
    initrd /initrd.img-2.6.31-19-generic

    title Ubuntu 9.10, kernel 2.6.31-14-generic
    uuid e2289dee-7b24-48b6-98b5-338656e6c9a1
    kernel /vmlinuz-2.6.31-14-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro quiet splash
    initrd /initrd.img-2.6.31-14-generic

    title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
    uuid e2289dee-7b24-48b6-98b5-338656e6c9a1
    kernel /vmlinuz-2.6.31-14-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro single
    initrd /initrd.img-2.6.31-14-generic

    title Windows 95/98/NT/2000
    root (hd0,0)
    makeactive
    chainloader +1
    ### END DEBIAN AUTOMAGIC KERNELS LIST

    ============================= sda6/grub/grub.cfg: =============================

    #
    # 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,7)
    search --no-floppy --fs-uuid --set bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65
    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-19-generic" {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set e2289dee-7b24-48b6-98b5-338656e6c9a1
    linux /vmlinuz-2.6.31-19-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro quiet splash
    initrd /initrd.img-2.6.31-19-generic
    }
    menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set e2289dee-7b24-48b6-98b5-338656e6c9a1
    linux /vmlinuz-2.6.31-19-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro single
    initrd /initrd.img-2.6.31-19-generic
    }
    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,6)
    search --no-floppy --fs-uuid --set e2289dee-7b24-48b6-98b5-338656e6c9a1
    linux /vmlinuz-2.6.31-14-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro quiet splash
    initrd /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,6)
    search --no-floppy --fs-uuid --set e2289dee-7b24-48b6-98b5-338656e6c9a1
    linux /vmlinuz-2.6.31-14-generic root=UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 ro single
    initrd /initrd.img-2.6.31-14-generic
    }
    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    linux16 /memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    linux16 /memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    if [ ${timeout} != -1 ]; then
    if keystatus; then
    if keystatus --shift; then
    set timeout=-1
    else
    set timeout=0
    fi
    else
    if sleep --interruptible 3 ; then
    set timeout=0
    fi
    fi
    fi
    ### 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 ###

    =================== sda6: Location of files loaded by Grub: ===================


    267.7GB: grub/core.img
    267.7GB: grub/grub.cfg
    267.7GB: grub/menu.lst
    267.6GB: initrd.img-2.6.31-14-generic
    267.6GB: initrd.img-2.6.31-19-generic
    267.6GB: vmlinuz-2.6.31-14-generic
    267.6GB: vmlinuz-2.6.31-19-generic

    =============================== sda7/etc/fstab: ===============================

    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # / was on /dev/sda7 during installation
    UUID=bc05eb9e-ff5c-4e6d-9aa8-937a2eccdd65 / ext3 errors=remount-ro 0 1
    # /boot was on /dev/sda6 during installation
    UUID=e2289dee-7b24-48b6-98b5-338656e6c9a1 /boot ext2 defaults 0 2
    # swap was on /dev/sda5 during installation
    UUID=a699e4ce-95f3-40de-b8aa-e261fe921112 none swap sw 0 0

    =================== sda7: Location of files loaded by Grub: ===================


    267.8GB: initrd.img
    267.8GB: initrd.img.old
    267.8GB: vmlinuz
    267.8GB: vmlinuz.old

Page 1 of 5 123 ... LastLast

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
  •