Results 1 to 5 of 5

Thread: After installing windows 7, Grub doesn't work

  1. #1
    Junior Member carrot's Avatar
    Join Date
    Nov 2007
    Posts
    25

    Default After installing windows 7, Grub doesn't work

    Hi

    I am finally getting back into the swing of things after having been on hiatus for a long time. I'm trying to install a dual boot with BT4 Pre and Windows 7. I started with a laptop with two partitions, a recovery partition and a windows vista partition. I booted up backtrack from the liveCD and ran ubiquity. I had it leave the recovery partition alone and just resize the vista partition to make room for the linux stuff. Everything was working fabulously until I installed windows 7. I just dumped it into the partition that vista was in, and now the windows bootloader has taken over.
    I've booted back into the liveCD and I've been playing around with grub trying to fix it, but I'm not sure how.

    Here is my fdisk -l output.

    Code:
    Disk /dev/sda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xe3a4a506
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        1344    10791936   27  Unknown
    /dev/sda2   *        1344       21835   164592088+   7  HPFS/NTFS
    /dev/sda3           21836       30401    68806395    5  Extended
    /dev/sda5           21836       30046    65954826   83  Linux
    /dev/sda6           30047       30401     2851506   82  Linux swap / Solaris
    Thanks!
    A little nonsense now and then is relished by the wisest men.
    -Willy Wonka-

  2. #2
    Junior Member
    Join Date
    Jan 2010
    Posts
    76

    Default

    my experience with livedvd and install.sh was almost good becouse first I dont whant to delete at all my partitions but then when I make a Backup from all file in my Hd I format all disk then I follow a tutorial dont remember where

    ok first I have four partition
    1 Back|Track
    2 Windows 7
    3 Backup (ntfs)
    4 Linux Swap

    so after install Backtrack and partition my disk i installed Windows 7 (Xp) then on livedvd on a konsole


    sudo grub" Then type in the following commands in sequence:
    - root (hd0,0)
    - setup (hd0)
    - quit
    - exit
    these commands are if grub is installed on first partition! if I'm not that wrong

    espero que te ayude!

  3. #3
    Junior Member carrot's Avatar
    Join Date
    Nov 2007
    Posts
    25

    Default

    Quote Originally Posted by manulu View Post
    these commands are if grub is installed on first partition! if I'm not that wrong
    Thanks for the information! I actually already found something just like that.
    The only problem is, and this is embarrassing...., I'm not sure where grub is installed.
    I know you can either put it on its own partition, stick it on an existing partition, or hide it in the first 512 kb of the physical disk (Or something like that....)
    A little nonsense now and then is relished by the wisest men.
    -Willy Wonka-

  4. #4
    Junior Member
    Join Date
    Jan 2010
    Posts
    76

    Default

    grub
    find /boot/grub/stage1
    as i mention first if im not wrong

  5. #5
    Junior Member carrot's Avatar
    Join Date
    Nov 2007
    Posts
    25

    Default

    Quote Originally Posted by manulu View Post
    as i mention first if im not wrong
    You didn't mention that before, but it did work.

    Thank you!


    So I have everything working, but if someone could come and explain on a higher level why what I did actually worked, that would be awesome. I'm all for actually learning instead of just doing.

    Here's my take:
    I screwed up the grub bootloader that was on some partition somewhere (an extended one I think...) by installing windows. Windows put it's own boot loader on its own partition and did.... what? What did it do to steal the booting from the partition containing grub to its partition?
    Running the following in grub changed the something to make the computer boot from the grub partition again and ignore (delete?) the windows boot loader:
    Code:
    find /boot/grub/stage1      (what did this do? Did it just search every possible device for /boot/grub/stage1?)
    root (hd0,4)
    setup (hd0)

    Thanks again!
    A little nonsense now and then is relished by the wisest men.
    -Willy Wonka-

Posting Permissions

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