Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Dual booting vista and ubuntu 9.10 with GAG

  1. #1
    Join Date
    Jul 2007
    Beans
    4

    Dual booting vista and ubuntu 9.10 with GAG

    Not so much asking for advice just logging my experience maybe it will help someone. My scenario I have a single 500GB hard drive.

    Installed Windows Vista on first 80GB
    Installed Ubuntu 9.10 (Karmic Koala) on next 25GB
    4GB Swap
    Remainder as NTFS storage

    Installed GAG as boot loader (love this program). Vista started fine. However when I chose Ubuntu from the GAG boot menu I would get a message "sector boot not found or invalid". Hmmm I had done this before with a previous version of Ubuntu. I figured it was something with GRUB not being configured correctly.

    I booted using the Ubuntu LiveCD and tried to reinstall grub. I guess 9.10 uses grub2 which I kept getting error messages and could find no one online doing what I was trying to do. grub2 was frustrating me. So I uninstalled grub2 and reinstalled grub as follows (this is from memory):

    Boot Ubuntu LiveCD
    Open Terminal
    In terminal:
    sudo -i
    fdisk -l (to find out which partition ubuntu was installed)
    mount /dev/sda5 /media/root
    mount --bind /dev /media/root/dev
    mount --bind /proc /media/root/proc
    chroot /media/root su
    apt-get purge grub2 grub-pc
    apt-get update
    apt-get install grub
    grub

    At grub prompt:
    find /boot/grub/stage1
    root (hd0,4)
    setup (hd0,4)
    quit

    Rebooted. All is well. Vista and Ubuntu can now start from GAG. Key points:
    -I couldn't get apt-get install grub to work. It would complain something about no installation candidate and I discovered I had to do apt-get update
    -For grub, most instructions tell you to do "setup (hd0)" but for using GAG you need to do "setup (hd0,4)" replacing 4 with your partition number, because you want GAG in the MBR not grub

    Had to post because I wish I had this post when I was trying to get this to work for hours.
    Last edited by overflowing; February 2nd, 2010 at 05:18 AM.

  2. #2
    Join Date
    Dec 2009
    Beans
    3

    Angry Re: Dual booting vista and ubuntu 9.10 with GAG

    LUV U MAN!

    U ROCK

  3. #3
    Join Date
    Jun 2009
    Beans
    5

    Re: Dual booting vista and ubuntu 9.10 with GAG

    Hello,

    I was actually desperated with GAG and GRUB2 when I found your post. I've tried everything you say, but I get an error at this point: find /boot/grub/stage1.

    It says the file can't be found, and I can´t continue. I'm using GRUB2 meanwhile (I've reinstalled it), but do you have any idea why this happens and how can I solve it? I'm totally newby to Ubuntu :s

    Thank you very much!

  4. #4
    Join Date
    Jul 2007
    Beans
    4

    Re: Dual booting vista and ubuntu 9.10 with GAG

    Well one thing is, where it says "/dev/sda5", that is particular to my setup. It probably will be something different for you.

    Also this will probably be different for you:
    root (hd0,4)

    You have to use the output of fdisk -l to figure out which partition ubuntu is on.

  5. #5
    Join Date
    Jun 2009
    Beans
    5

    Re: Dual booting vista and ubuntu 9.10 with GAG

    Quote Originally Posted by overflowing View Post
    Well one thing is, where it says "/dev/sda5", that is particular to my setup. It probably will be something different for you.

    Also this will probably be different for you:
    root (hd0,4)

    You have to use the output of fdisk -l to figure out which partition ubuntu is on.
    Yes, I know. My Ubuntu is on sda7 and I used /dev/sda7, but Grub can't find /boot/grub/stage1.

    Any ideas?

    Thanks!

  6. #6
    Join Date
    Jul 2007
    Beans
    4

    Re: Dual booting vista and ubuntu 9.10 with GAG

    Quote Originally Posted by itziar View Post
    Yes, I know. My Ubuntu is on sda7 and I used /dev/sda7, but Grub can't find /boot/grub/stage1.

    Any ideas?

    Thanks!
    Yeah I think I forgot a step. Before you chroot you also have to mount dev and proc like:

    mount /dev/sda7 /media/root
    mount --bind /dev /media/root/dev
    mount --bind /proc /media/root/proc
    chroot /media/root su

    Try that and then the remaining steps. If that doesn't work, you might also need to do install grub after the chroot like:

    grub-install /dev/sda7

  7. #7
    Join Date
    Jun 2009
    Beans
    5

    Re: Dual booting vista and ubuntu 9.10 with GAG

    Thanks, I'll try that

  8. #8
    Join Date
    Feb 2010
    Beans
    1

    Re: Dual booting vista and ubuntu 9.10 with GAG

    I found that the cleanest way, which has given me no problem with either Vista or Ubuntu was to install a second clean hard disk, and while installing Ubuntu on that, I had the Vista disk disconnected. After installation and checking Ubuntu, I reconnected the Vista disk and now select which OS using the BIOS Boot menu at start up.

  9. #9
    Join Date
    Dec 2010
    Beans
    1

    Triple Boot w/ 2 Primary Windows and Ubuntu 10.10

    Had to change a few steps to get this working for me (in red):

    Boot Ubuntu LiveCD
    Open Terminal
    In terminal:
    sudo -i
    fdisk -l (to find out which partition ubuntu was installed)
    mount /dev/sda5 /media/root
    mount --bind /dev /media/root/dev
    mount --bind /proc /media/root/proc
    cp /etc/resolv.conf /media/root/etc/ (This is needed to enable networking for the apt-get update below)
    chroot /media/root su
    apt-get purge grub2 grub-pc
    apt-get update
    apt-get install grub
    grub-install /dev/sda5 (This was previously noted in a later post)
    grub

    At grub prompt:
    find /boot/grub/stage1
    root (hd0,4)
    setup (hd0,4)
    quit

    #I was getting errors: "embed /boot/grub/e2fs_stage1_5 (hd0,5)" ...failed (this is not fatal) at the >setup (hd0,4) in grub
    #so had to also run:
    update-grub (to update the menu.lst)

    #Comments / Notes:
    #1) Upon completion of the update-grub, the menu.lst file was finally generated. I was then able to reboot only to find GAG was no longer in the MBR and GRUB had replaced it. Fortunately it DID boot into ubuntu just fine. I rebooted off the GAG CD and tested the Windows partitions which worked fine as well, so I reinstalled GAG from the CD and now all 3 partitions are bootable.
    #2) The resolv.conf command was key for the apt-get update to work. For some reason that copy isn't always needed but I lost DNS resolution a few times without it.
    #3) The GAG Wiki notes a grub2 incompatibility and offers an alternative sudo grub-install /dev/sda5 command. I tried this and would get errors about blocklists, requiring the --force option. Using that grub2 would install into the partition and be bootable from GAG for exactly 1 reboot. Then it would fail again.
    #4) When I had the problems with resolv.conf I booted off an 8.0.4 ubuntu live cd hoping to use the grub1 from there. However, the chroot /media/root su doesn't work nor did /bin/bash in place of su. Not sure why, but, it's not required that I solve that. Might be a 32bit live cd vs 64bit install.

    #Hopefully I didn't forget anything else, I think that was all of it. I may have binded a few other directories at one point following a 'how to chroot, simple and fast' guide but I don't think that was needed just the cp resolv.conf part of that post.

    My Fdisk -l output:
    Device Boot Start End Blocks Id System
    /dev/sda1 1 5104 40997848+ 17 Hidden HPFS/NTFS
    /dev/sda2 7170 38913 254983618 5 Extended
    /dev/sda3 * 5105 7169 16587112+ 7 HPFS/NTFS
    /dev/sda5 9998 10994 8008402+ 82 Linux swap / Solaris
    /dev/sda6 7170 9997 22715847 83 Linux
    /dev/sda7 10995 38913 224259336 7 HPFS/NTFS


    #My install is on DEV/SDA6 so I adjusted the numbering accordingly.

    #Grub1 numbers partitions starting from 0. So, first hard disk is 0 and first partition is 0, hd(0,0).

    #Grub2 (I read) starts at 1 for the partitions instead of 0. Unfortunately even in the MBR, Grub2 would not detect the hidden primary install, or at least only detected one of the two Windows Primary partitions. I wasn't sure how to modify the scripts to get it to detect all 3 and hide the non-booted windows partition when I went that route. GAG is much simpler in this regards.

  10. #10
    Join Date
    Jan 2011
    Beans
    2

    Thanks a million

    Hey guys,

    I installed ubuntu10 for the first time and wanted to use gag and then couldn't understand what was happening ! Overflowing definitely saved my day by sharing this ! Still I was not able to get the apt update to work so I manually downloaded grub package from another system and I could boot from gag but still I was left with an empty grub prompt. Following every single step of eihcet04 got me out of trouble !

    This is very useful ! The incompatibility between gag and grub2 is often silenced.

    Best

    Soyouth


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