How to install Windows, Ubuntu and Openelec with Grub2
#1
My goal when putting together this setup was to have a computer at my TV, to act as a Media Center with Windows, so I can play Windows based video games on my TV. In this example I’m using Windows XP Pro and not Windows 7. I would prefer Windows 7, but I don’t have licenses, but I do however have a spare Windows XP Pro license. I will include requirements for Windows XP and Windows 7 below, so you can just adjust this guide for your version of Windows. This guide is simply a walkthrough on how I installed this desired setup. The steps listed can be used and modified for you to accomplish a similar setup. I hope these steps help clear some questions on how Dual-booting with Openelec can be accomplished.

First you need to plan out your partitions; if you don’t know what you really want to do, moving partitions around after they are created, can be very difficult. So give yourself a break and take some time to plan this portion out.

The placements for the partitions I describe below are only my preference and not mandatory, they simply work for me and that’s how I choose to present them.

Here are some requirements to consider.

Minimum space requirements
Windows XP - 1.5GB
Windows 7 - (32-bit)16GB, (64-bit)20GB
Ubuntu 11.04 - 15GB
Openexec - 256MB

Openelec requires two partitions, a “BOOT” and a “STORAGE” partition. In my setup I have a Network Attached Storage unit, where I store all my media, so the “STORAGE” partition that Openelec uses is minimal. So I don’t allocate a lot of space for it.

Here is an example of my drive partition schema.

Partition File System Label Size Flags Use
/dev/sda1 ntfs Windows 25GB Windows is installed here
/dev/sda4 extended 20GB Ubuntu is installed here
/dev/sda5 ext4 Ubuntu 16GB
/dev/sda6 linux-swap 4GB
/dev/sda3 ext3 STORAGE 10GB Openelec storage partition
/dev/sda2 ext3 BOOT 1GB boot Openelec is installed here

On to the steps:
  1. Download your respective version of Openelec and create a bootable thumb drive by running create_installstick.bat in the downloaded archive.
Installing Windows
[LIST=3]
[*]Boot your computer to your Windows CD.
[*]Delete all existing partitions and create a single partition of the desired size you planned for in the above section.
[*]Install Windows to that new partition.
[/LIST]
Installing Openelec and Ubuntu
[LIST=15]
[*]Boot your computer to your Ubuntu CD, select “Try Ubuntu” when prompted between “Try Ubuntu” and “Install Ubuntu”.
[*]When Ubuntu boots, open Gparted Partition Manager.
[*]Now create a partition with the following parameters.
Quote:File System: ext3
Label: BOOT
Flags: boot
Size: the desired size you planned for in the above section.
Placement: put it at the very end of the drive
[*]Now create a second partition with the following parameters.
Quote:File System: ext3
Label: STORAGE
Size: the desired size you planned for in the above section.
Placement: put it just before the previously created partition.
[*]After you apply these changes you should have an empty space of “unallocated” space on your drive, between the Windows and Openelec partitions. Close Gparted Partition Manager and open Terminal.
[*]Plug in your Openelec thumb drive and run the following code in the terminal, to install Openelec onto the “BOOT” partition of your drive.
Code:
sudo su
cp /media/OPENELEC/KERNEL /media/BOOT
cp /media/OPENELEC/SYSTEM /media/BOOT
[*]Close Terminal and click the “Install Ubuntu” icon on your desktop.
[*]Select the option to let Ubuntu install alongside Windows.
[*]When you’re prompted to restart the computer select “No”.
[*]Now open Terminal again and run the following code.
Code:
sudo su
nano /etc/grub.d/40_custom
[*]Now enter the following code below the last line, but change the following aspects to suit your situation. Note the number proceeding the sda of the partition you have labeled “BOOT”. Mine is “2”, refer to my example partition schema above. Note the number proceeding the sda of the partition you have labeled “STORAGE”. Mine is “3”, refer to my example partition schema above. Now replace “BOOTSDANUM” and “STORAGESDANUM” in the following code with the numbers, noted respectively.
Code:
menuentry "OpenELEC.tv" {
    set root=(hd0,BOOTSDANUM)
    linux /KERNEL boot=/dev/sdaBOOTSDANUM disk=/dev/sdaSTORAGESDANUM quiet
}

menuentry "OpenELEC.tv (Textmode)" {
    set root=(hd0,BOOTSDANUM)
    linux /KERNEL boot=/dev/sdaBOOTSDANUM disk=/dev/sdaSTORAGESDANUM textmode quiet
}

menuentry "OpenELEC.tv (Debugmode)" {
    set root=(hd0,BOOTSDANUM)
    linux /KERNEL boot=/dev/sdaBOOTSDANUM disk=/dev/sdaSTORAGESDANUM debugging textmode quiet
}
[*]Now save the changes by using the follow key combination. ctrl+x -> y -> enter
[*]Next type the following in the Terminal
Code:
nano /etc/default/grub
Change the following values
Code:
GRUB_DEFAULT=”OpenELEC.tv”
GRUB_HIDDEN_TIMEOUT=
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
[*]Now save the changes by using the follow key combination. ctrl+x -> y -> enter
[*]Lastly, in the Terminal run the following code.
Code:
update-grub
[*]Now reboot, after GRUB loads, it should boot you into Openelec after 5 seconds.
[/LIST]

I hope this guide helps clear up some things and isn't too confusing. I got alot of this info from the OpenELEC forums, so thank you OpenELEC forums for some place to start!
Reply
#2
not bad but I am not a windows user.. so I would bypass that option all together.
and where is the swap partition for use with ubuntu? swap,boot,ubuntu,openelec, storage
In a world without walls and fences who needs windows and gates, open source, opens minds, so open yours today.

Image
Reply
#3
(Edit: Figured out what to do. Made a NTFS partition using gparted and told windows 7 to install there. Now it does not make a second partition.)

Thanks for this how to. Just a few questions although i know this is an old thread.

I want a system with windows 7, ElementaryOS (ubuntu based) and OpenElec.
Did a clean windows install on an empty drive.
Then i booted into elementary live to create two partitions for OE using gparted.
When i want to install Elementary i cannot because Windows made a small primary partion of 100mb.
So i already have 4 primary partitions.

I ave read that the system partition of OE can be a logical partition as well unfortunalty i cannot select that in gparted.

Any ideas on how to resolve this or get rid of the 100mb partition of windows?

Thanks,

Paul
Image
Reply
#4
I'm trying install Window 7 with Grub2.

Thanks for your guide, this is really helpful.


- James
Reply
#5
I found it more reliable to use the UUID in /etc/grub/40_custom - it will still boot if the drive order has changed. See http://wiki.openelec.tv/index.php?title=Config_dualboot

Also anyone wanting to reboot once to another OS with out using a keyboard check out http://forum.xbmc.org/showthread.php?tid=172715 With that add on you can completely hide the GRUB splash screen.
Reply

Logout Mark Read Team Forum Stats Members Help
How to install Windows, Ubuntu and Openelec with Grub21