LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Argh! Dual boot Vista / Ubuntu (https://www.linuxquestions.org/questions/linux-general-1/argh-dual-boot-vista-ubuntu-593100/)

dun3141 10-19-2007 03:15 PM

Argh! Dual boot Vista / Ubuntu
 
I'm trying to set up a dual boot. I have Windows Vista installed, and last night I installed Ubuntu 7.10 (at least I think it's 7.10).

I have 3 hard disks. My main disk has the Vista partition, and then I created another one for Ubuntu. So after Ubuntu installed, I rebooted, and it said "No operating system found". I coudln't find a way around this, so finally had to pop in the Vista CD and repair the MBR using the recovery console, just so that something would load up.

Now, on startup, it goes straight to Windows (as expected at this point). My next idea was to simply reinstall grub, and then configure it. Everything I've read says to do something like the following:

Code:

sudo grub
find /boot/grub/stage1
root (hd1,1)
setup (hd0)
quit

So I put in the live CD and did just that. It said it was successful, so I rebooted my computer.

That didn't work. It still goes straight to Windows. I'm at my wit's end here, and if someone could offer some advice, I would greatly appreciate it!

I have a feeling it either has to do with how my partitions are set up, or with the fact that I'm using the live-cd rather than the actual installation.


Thanks in advance.

bigrigdriver 10-19-2007 03:21 PM

Start with this:
1) boot the Ubuntu liveCD.
2) get the output of 'fdisk -l /dev/hdx' or 'fdisk -l /dev/sdx' where x represents the disk you think you installed Ubuntu.
3) copy /etc/fstab (the part about the partitions and their mount points.
4) mount the Ubuntu partition (if fdisk says it's there) and copy /boot/grub/menu.lst (grub.conf on some distros).

Report your findings here. We might be able to work it out from that info.

syg00 10-19-2007 05:00 PM

Much better to use "fdisk -l" - leave the device off.
The more data the better.

jay73 10-19-2007 05:26 PM

If you are using the livecd, you may be looking at a bug. I found that there was simply no way that I could get it to install GRUB on my system. Fortunately, I already had a GRUB and was able to boot into Ubuntu by adding the entry manually. Of course, if you have multiple disks, it might be interesting to put Ubuntu on a different one. That will save you the hassle of recreating the windows MBR if anything goes wrong.

dun3141 10-19-2007 07:33 PM

Thanks for your help, guys, but I think this problem may have resolved itself almost on its own.

I read a lot of other websites, and I found out how to mount my installation from the livecd. So I did that and ran the grub installation script. It worked, and I saw the grub screen when I rebooted. Problem is, all of the ubuntu listings said "no such partition" whereas all the windows listings said "can't find NTLDR". So I rebuilt the MBR from the Vista CD again.

Then I tried downloading EasyBCD, and adding ubuntu to the listing that way. Same problem occured - it said "no such partition" (but this time I could still boot up windows). So I played around a bit more, and decided to add a listing for every single partition EasyBCD detected. I had 6 total. I just kept rebooting and selecting the next OS in line. Finally one of them worked. I don't know how or why.

The one that worked was for "hd1,2" which is the partition that showed up as "Extended". I assumed I should point it at my main 10GB linux partition, but I guess not.

Somehow it works now. I am curious as to why it works with a seemingly wrong partition, but right now I'm just happy that I can boot into either OS.

dun3141 10-19-2007 07:46 PM

One more interesting thing to note:

First of all, the way it works is the Windows bootloader comes up, and asks me if I want to load Vista or ubuntu. Then if I select ubuntu, grub comes up and asks which specific thing I want to boot. So it's quite a chain of events here.

When I select Ubuntu from the Vista Bootloader, it spouts off some text, and then it says it can't boot from hard disk, and it tells me to insert a system disc and then press a key. Naturally, I pressed the key anyway, because I don't have a system disk to insert. Then grub came up, and I booted normally. Something's weird here.

syg00 10-19-2007 08:07 PM

There have been some people having issues with EasyBCD, but I found it o.k.

To get the bootsector record built correctly, you need to install grub to a partition, not the MBR. This is what the Vista loader needs.
And yes, you will always have to load the grub menu after that - you can set the timeout short, and hide it, if you really want.

Let's see that "sudo fdisk -l" (needs sudo, else you get no output - blame the Ubuntu devs).


All times are GMT -5. The time now is 10:42 PM.