[SOLVED] multi boot with Ubuntu

General support questions including new installations
Posts: 14
Joined: 2010/02/08 18:10:49
Location: Arizona, USA

Re: multi boot with Ubuntu

Post by azjp » 2010/06/10 00:09:25

While I was working on my reply the previous post was entered. The post before this is a good answer and I do not need to add one more way of accomplishing the same thing.

Good luck MrBrainstorm.

Posts: 355
Joined: 2009/12/11 10:25:56

Re: multi boot with Ubuntu

Post by chuina » 2010/06/10 03:36:45

No Ubuntu grub,update grub required...

Install CentOS as usual ([b]with[/b] GRUB) keeping a partition free for Ubuntu.

Then install Ubuntu in that free partition [b]without[/b] any bootloader (GRUB).

Then backup grub.conf like
[code]cd /boot/grub/
cp -v grub.conf grub.conf.backup[/code]

Now edit the grub.conf and tell it where the Ubuntu's [b]kernel[/b] and [b]initrd[/b] located , like i showed in my earlier post (in the pastebin).
You may notice my kernels are in same partition so all of them are [b]root (hd0,0)[/b]

You may need to [b]fix[/b] it as [b]pschaff[/b] showed,
[quote]Note (hd0,2) not 3 - fdisk numbers from 1, GRUB numbers from 0[/quote]

Posts: 19
Joined: 2010/05/28 11:29:07

Re: multi boot with Ubuntu

Post by MrBrainstorm » 2010/06/10 06:37:07

Wow, so many replies while I was sleeping :-D Thank you very much. And no apologies needed for 'noise or confusion'. For now it looks like the way azca used is the most straightforward. I am trying it right now. Of course I have reinstall everything again but at least I don't lose any important data, just more time :-)

First I deleted ALL partitions on hd0 and created new ones. Since Ubuntu is supposed to be my main OS I created an ext4 partition as hd0,0 (for now it is just a spacer, not used yet). The CentOS partition will be hd0,1 and hd0,2. The CentOS installation is running right now. I just installed the bootloader by default, so it should go to the MBR.

After the installation finishes I should be able to boot CentOS. Then I am going to write the bootloader to the CentOS partition by opening a terminal and entering 'grub' (w/o the quotes).

Next, I enter 'find grub/stage1 (hd0,1) (hd0,0 is reserved for Ubuntu, hd0,1 should be the /boot partition of CentOS,here I am not sure about the correctness of the command, need confirmation on this). I will confirm the partition with fdisk -l

Ok, then 'root (hd0,1)' and 'setup (hd0,1)' -> 'quit', right?

After all this is done, I install Ubuntu as usual (grub2 to the MBR), edit the /etc/grub.d/grub.cfg (using hd0,2 instead of hd0,1). That should work, right?

In principle I only repeated what azca already wrote, but I want to make sure I understood everything correctly.

Thanks for the support guys, it really helps to keep up the motivation and I don't drown in frustration :-)

P.S.: It's a bit ironic that the installation of any Linux next to Windows works without any problems, while the installation of Linux next to a Linux system can give you quite some headaches :-D

Posts: 19
Joined: 2010/05/28 11:29:07

Re: multi boot with Ubuntu

Post by MrBrainstorm » 2010/06/10 09:42:58

Thanks for all the help guys. It worked. Now I only have to find out how to display the grub menu at startup automatically. But that shouldn't be to hard to find out.
Dual boot works now.

Well, now I have another problem with installing 3rd party software, but I am going to open another thread for that.

User avatar
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: multi boot with Ubuntu

Post by AlanBartlett » 2010/06/10 13:35:04

In view of your success, and for posterity, this thread is now marked [SOLVED].

Post Reply

Return to “CentOS 5 - General Support”