Skip to main content

How to install (K)Ubuntu alongside Yosemite and Windows 8 on Mac Book Pro?

Here let's see how we can install Windows 8 and (K)ubuntu 15.10 (Wily Werewolf) along side Mac Yosemite as triple boot.

Software/Hardware required

  • Mac book Pro 11,1 (instruction might be similar for newer models)
  • Yosemite
  • Windows 8
  • (K)Ubuntu 15.10  Wily Werewolf (might work with 15.04 as well)
  • Refind (not reEFIt)
Here is the summary of what we are going to do.
  1. Partition mac to have windows boot-camp partition 
  2. Install windows 8
  3. Create two new partitions from mac partition for Linux
  4. Install (K)ubuntu
  5. Fix GPT-MBR
  6. Install Refind

Step-0

In case you want to backup your mac: 
  1. Restart mac and hold 
  2. This will boot Mac in recovery mode as shown below   
  3. Plugin an external drive and choose Disk Utility option
  4. Select the mac partition (not your hard disk root) and go to restore tab
  5. Choose your external drive as the destination as shown below
  6. Important: ensure that your mac partition is the Source
  7. Click Restore to take a copy of Yosemite
  8. You are done. Close all the windows and restart

Step-1 & 2

Create a bootcamp partition using bootcamp software and install windows 8. This is part is pretty straight forward; hence we will not go in detail. But the point to remember is that you need to leave more space for Yosemite as we are going to carve out Linux partition from there. 
eg.

Step-3

Create two Linux partitions out of Yosemite partition as show below.

Here we are going to use one for '/' partition and the other for 'swap' partition. Create them as HFS+ (Journaling File System) as they are easy to resize.

Caution: DO NOT RESIZE BOOTCAMP PARTITION

After this step restart into Yosemite and Windows once to ensure that you are able to boot into them properly.

Step-4

Download Kubuntu from here. Write it to a pendrive (instructions can be found here). Restart mac and hold option key








Follow the instructions on screen and install Kubuntu on the respective partitions. 
Caution: Remember to install grub on '/' partition  of Linux (/dev/sda4 in my case) and NOT ON /dev/sda (the hard disk root)
At this point you can boot to Yosemite but you will not be able to boot to Windows. Don't worry; we will fix it.

Step-5

  1. Restart and hold option key; boot to Yosemite. (you can also do this from Kubuntu, in which case you can skip the next step)
  2. Install gdisk from here.
  3. Run sudo gdisk /dev/disk0 (assuming your hard disk is /dev/disk0)
  4. gdisk should launch and tell you, among other things, MBR: hybrid.
  5. Before installing Kubuntu this was  MBR: protective Hence we need to convert it back to  MBR: protective
  6. Type p to view the partition table. Assuming you know enough about your partitions, you should be able to verify that you're looking at the right disk. If not, type q to quit and try another disk device.
  7. Type x to enter the experts' menu.
  8. Type n to create a fresh protective MBR to replace your existing hybrid MBR.
  9. Type p again to verify that your partitions are all still in place. This is just a precaution to ensure you didn't accidentally hit the wrong key.
  10. Type w to save your partition table. You'll be asked to verify this action. Do so.
(Courtesy: http://askubuntu.com/a/650302)

Step-6

At this point you will be able to hold option key and boot to Windows or Yosemite. But you will not see an option to boot to (K)ubuntu. Restart to Yosemite and install Refind from here. (All you need to do is to open the dmg file and drag and drop ./refind-install file to terminal)

That's it. You are done. No more holding of option key. You will get a pretty menu option when you restart your mac (something similar to the one below)
rEFInd presents a graphical menu for selecting your
    boot OS.

Comments

Popular posts from this blog

Using Nginx as proxy server for Keycloak

I have used Keycloak  in its very early stage ( when it is was in 2.x version). But now it has come a long way (at this time of writing it is in 21.x) In this article let's configure Keycloak behind Nginx. Here are the points to consider.  If you want to configure Apache2 as a proxy server for your java application, please check  this article . We are going to use a domain name other than localhost Anything other than localhost will require Keycloak to run in production mode which requires SSL configurations etc. Or it requires a proxy server. Lets begin. Requirements Keycloak distribution Ubuntu 22.04 server Configuring Keycloak 1. Download Keycloak from here . 2. Extract it using tar -xvzf  keycloak-21.0.1.tar.gz 3. Create a script file called keycloak.sh with the following contents #!/bin/bash export KEYCLOAK_ADMIN=<admin-username-here> export KEYCLOAK_ADMIN_PASSWORD=<admin-password-here> nohup keycloak-21.0.0/bin/kc.sh start-dev --proxy edge --hos...

Installing GoDaddy certificate in Wildfly/Keycloak

In the previous post we saw how to set up Keycloak . Here we will see how to generate and install GoDaddy.com certificate in Keycloak. The steps are similar for Wildfly as well. Step 1: Generate CSR file Run the following commands in your terminal. <mydomain.com> has to be replaced with your actual domain name. keytool -genkey -alias mydomain_com -keyalg RSA -keysize 2048 -keystore mydomain_com.jks keytool -certreq -alias mydomain_com -file mydomain_com.csr -keystore mydomain_com.jks Step 2: Generate certificate Upload  mydomain_com . csr  file content into GoDaddy.com, generate and download certificate for tomcat server (steps to generating SSL certificate is beyond the scope of this article). If you unzip the file, you will see the following files. gd_bundle-g2-g1.crt ..5f8c...3a89.crt   #some file with alphanumeric name gdig2.crt Files 1 and 2 are of our interest. Third file is not required. Step 3: Import certificate to key...

Hibernate & Postgresql

If you are using Hibernate 3.5 or above to talk to Postgresql database, have you ever tried to store a byte array? Let's take an example. Here is the mapping which will store and read byte[] from the database. @Lob @Column(name = "image") private byte[] image; Here is the JPA mapping file configuration. <persistence version="2.0"  xmlns="http://java.sun.com/xml/ns/persistence"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">   <persistence-unit name="testPU" transaction-type="JTA">     <provider>org.hibernate.ejb.HibernatePersistence</provider>     <jta-data-source>test</jta-data-source>     <properties>     </properties>   </persistence-unit> </persistence> When you try to save your entity you will get t...

Dynamic SOAP Service Client

If you have written SOAP service client, you might know that you need the WSDL file; need to generate Java code for that,compile that Java classes and add it as dependency for your module. What would you do if you have to incorporate your code with a new SOAP service every now and then? What would you do if all you need is to consume the service and do a little processing on the output, i.e., you need the data in XML format? What would you do if you don't have a complete WSDL? What would you do if your service is in .NET whose WSDL is having problem while generating Java classes? Is there a way to write a dynamic client which can consume any SOAP service? .... YES!... there is a way. Let's quickly write a web (SOAP) service. Software used: Java 7 NetBeans IDE 7.4 GlassFish 4.0 Maven Create a web project and choose Glassfish as server. Now add web service (not a rest service) as below. Edit the SimpleService.java as follows. package com.mycom...

How to retry a method call in Spring or Quarkus?

Have you ever come across a situation where you wanted to retry a method invocation automatically? Let's say you are calling a stock ticker service for a given stock and get a transient error. Since it is a transient error, you will try again and it may work in second attempt. But what if it doesn't? Well, you will try third time. But how many times can you try like that? More importantly after how much time will you retry? Imagine if you have a handful of methods like this. Your code will become convoluted with retry logic. Is there a better way? Well, if you are using spring/spring boot, you are in luck. Here is how you can do that using spring. Let's write our business service as follows. import java.time.LocalDateTime; import java.util.concurrent.CompletableFuture; import lombok.extern.slf4j.Slf4j; import org.springframework.retry.annotation.Backoff; import org.springframework.retry.annotation.Retryable; import org.springframework.scheduling.annotation.Async; import...