Page 1 of 4 123 ... LastLast
Results 1 to 10 of 236

Thread: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    London, UK
    Beans
    491

    “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    This thread is now obsolete. It will no longer work for current releases of Ubuntu. Please google around for newer guides. This thread is not being updated, it is not being checked, questions will not be answered and help will not be given. Please Let it die.

    “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    ##This guide does not work for Karamic or future releases, For that see page 14 and follow the link provided by presence1960 for how to dual boot with Grub2 (requires some reading) I will update this guide for grub2 when I have more time##

    I have recently seen many posts from people trying to dual boot Ubuntu and Windows 7 beta, but not succeeding. So I tried it out myself and found a solution.
    Index
    1. Obtain a copy of Windows7.
    2. Partition your disk with gparted.
    3. Install Windows7.
    4. Re-install Grub.
    5. Edit Grub to List Windows 7.
    6. Have Fun.
    __________________________________________________ ________________________________

    1. Obtain a copy of windows 7.

    *You can also find a torrent of this but for legal reasons I cannot provide a link. *


    2. Partition your disk

    **This does go wrong in some cases, if in doubt back up your valuable data.**

    Boot from a Ubuntu live cd or a gparted live cd.
    Start up gparted, If ubuntu is on the whole disk you need to re-size it by at least 8 gb for Windows 7. (Make sure windows 7 is on the second partition to make it easier for grub) You will be left with some unallocated space on your hard disk if you want you can partition it to NTFS or you can do it later on the windows install.

    3. Install Windows 7

    Follow the on screen instructions, Select the un-partitioned space to format and install windows on, or if you already made it NTFS choose your NTFS partition.

    **It will ask for a product key but you have 30 days to do that. Note: Beta keys will work with the RC**


    4. Re-install GRUB

    Now you have windows 7 but it has completely eaten your boot loader so you need to re-install grub.
    Boot from the ubuntu live cd and go to terminal.
    Type in terminal:

    "sudo grub"
    "grub> find /boot/grub/stage1"

    That should return your Ubuntu partition in the form of (hdX,Y), use that:

    grub> root (hdX,Y)
    grub> setup (hd0)
    grub> quit

    (you don’t need to type the grub> bit)

    That has re-installed grub but you can no longer see windows7

    5. Edit grub.
    Go to terminal from normal ubuntu and type :

    “sudo gedit /boot/grub/menu.lst”

    A large text file will open and at the bottom leave a line and add this:

    title windows 7 beta (Loader)
    root (hd0,1)
    savedefault
    makeactive
    chainloader +1

    (Do not type this line but if that does not work on re-boot try “hdo,0 or hd0,2” and so on until it works.)

    Now that is done you can re-boot into windows 7 and ubuntu happily

    ******************Edit***********************
    Hi
    I have remembered that if you also have vista installed on your machine when you in install 7, that windows 7 will add itself to the vista bootloader.

    So You will need to point grub to the vista partition so it will load the vista loader and give you the option for 7 and vista.

    Also To work out what partition number your 7 partiton is use gparted it will give you results like "Windows 7 sda2" that means hda0,2 or if you have two internal hard drives than change the tab in the top right to the appropriate disk. Then take note of the sda2 but as it is on the 2nd drive it will be hda1,2. And so on..........
    ****************Edit*************************
    Last edited by hyperdude111; August 6th, 2011 at 12:58 PM.

  2. #2
    Join Date
    Jan 2007
    Beans
    22
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Thanks for the simple tutorial. I installed win7 on virtualbox and it took about 13GB though, not 8GB.
    Life: See. Do. Get. Share. Enjoy.
    Visit my blog: The World of Brian
    See my photos: PicasaWeb.

  3. #3
    Join Date
    Oct 2005
    Location
    Rome, Ga
    Beans
    2,339
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Thank you! I installed Windows 7 on a spare hard drive with everything else unplugged so I could just turn the machine off and plug cables back in to run Ubuntu, not knowing if or how I could dual boot, so I'm glad to find this. I'll be trying this out tonight or tomorrow sometime and will come back whining when I hit a glitch, you know, lol.

    I do have to say, W7 seems like they got it right. So far the best windows experience I've had with the one exception of using XP to download the first Ubuntu Live CD .iso file, that is.

    So, I shouldn't have any problems if I just turn off, plug everything back in the way it was in the beginning, right?

  4. #4
    Join Date
    Jul 2008
    Beans
    4

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Excellent article. Worked flawlessly.

  5. #5
    Join Date
    Jan 2008
    Location
    the space between spaces.
    Beans
    1,654

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Nice little guide, but this pretty much applies to any Windows installation when it is installed after Ubuntu.
    "If a cluttered desk signs a cluttered mind, Of what, then, is an empty desk a sign?" -Albert Einstein.

  6. #6
    Join Date
    Oct 2005
    Location
    Rome, Ga
    Beans
    2,339
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Jeez, you'd think there was a way to determine which hd was which. I have 4, so it ought to be hd0 through hd3, but I can't get grub to work with one I know is in there no matter what entry I use. I know it's either hd1,1 or hd3,1 because hd0,1 and hd2,1 have ubuntu loaded on both of them, and the other hard drive is storage only. The one in question has two partitions, the first, hd*,0 would not be the operating system, but hd*1, the second partition is the one with the operating system. I edit menu.lst so reflect either hd1,1 or hd3,1, yet each time I try to select the drive at the grub menu, it says that's not a partition. Dang.

    And I don't really want to go having to installing anything on a disk to use it...

    Oh well.

    By the way, the hard drive in question has windows loaded on it, and it was loaded with the drive in the machine by itself.

  7. #7
    Join Date
    Apr 2008
    Location
    Carlisle, MA
    Beans
    71
    Distro
    Ubuntu 10.04 Lucid Lynx

    Arrow Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Quote Originally Posted by damis648 View Post
    Nice little guide, but this pretty much applies to any Windows installation when it is installed after Ubuntu.
    NOTE: This procedure also covers a specific problem with Windows7 installer Partition editor. ( avoid using it)
    But your link is a great help to those having GRUB issues !

  8. #8
    Join Date
    Feb 2009
    Beans
    8

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Thank you for that easy to do fix for my lost grub after a WinXP reinstall! I really appreciate it!

  9. #9
    Join Date
    Sep 2009
    Beans
    2

    Post Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    I have tried using hd0,1 - 5 and none of them will load 7. Any ideas from looking at the fdisk as to what I should use?

    I tried hd1,0 and it said starting up... and sat there and did nothing.

    Code:
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x108d0a57
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        9563    76814766   83  Linux
    /dev/sda2            9564       19457    79473555    f  W95 Ext'd (LBA)
    /dev/sda5            9564       19457    79473523+   7  HPFS/NTFS
    Code:
    # 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        5
    
    ## 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=b93dd274-291b-495a-a7bf-225d574876db ro
    
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=b93dd274-291b-495a-a7bf-225d574876db
    
    ## 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.04, kernel 2.6.28-15-generic
    uuid        b93dd274-291b-495a-a7bf-225d574876db
    kernel        /boot/vmlinuz-2.6.28-15-generic root=UUID=b93dd274-291b-495a-a7bf-225d574876db ro quiet splash 
    initrd        /boot/initrd.img-2.6.28-15-generic
    quiet
    
    title        Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
    uuid        b93dd274-291b-495a-a7bf-225d574876db
    kernel        /boot/vmlinuz-2.6.28-15-generic root=UUID=b93dd274-291b-495a-a7bf-225d574876db ro  single
    initrd        /boot/initrd.img-2.6.28-15-generic
    
    title        Ubuntu 9.04, kernel 2.6.28-11-generic
    uuid        b93dd274-291b-495a-a7bf-225d574876db
    kernel        /boot/vmlinuz-2.6.28-11-generic root=UUID=b93dd274-291b-495a-a7bf-225d574876db ro quiet splash 
    initrd        /boot/initrd.img-2.6.28-11-generic
    quiet
    
    title        Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
    uuid        b93dd274-291b-495a-a7bf-225d574876db
    kernel        /boot/vmlinuz-2.6.28-11-generic root=UUID=b93dd274-291b-495a-a7bf-225d574876db ro  single
    initrd        /boot/initrd.img-2.6.28-11-generic
    
    title        Ubuntu 9.04, memtest86+
    uuid        b93dd274-291b-495a-a7bf-225d574876db
    kernel        /boot/memtest86+.bin
    quiet
    
    title        Windows 7 (Loader)
    root        (hd0,1)
    savedefault
    makeactive
    chainloader +1
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    Last edited by ..::Ryan::..; September 5th, 2009 at 02:24 AM.

  10. #10
    Join Date
    May 2009
    Beans
    3

    Re: “How to” Dual boot Ubuntu and Windows 7 (Ubuntu installed first)

    Excellent articole, easy and simple understandable for everyone!!!

    Ciao

    Ricky

Page 1 of 4 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
  •