formats

Mac How-To Install Ubuntu to External USB Hard Drive

Published on June 26, 2010, by + in linux, osx.






This guide is for Intel Mac (only!)

How to install Ubuntu to external USB hard disk and leave your existing Intel Apple machine and internal hard drive untouched.

There seems to be a lot of confusion over this topic. Here is a method that works if you don’t want to/are unable to alter your existing OS X install or hard disk.

Before beginning, back everything up from your internal OS X hard drive install!
Instructions are at your own risk. Be careful not to install over your internal hard drive.


You will need the following before starting:

- USB hard drive

- Ubuntu install CD (http://www.ubuntu.com/desktop/get-ubuntu/download)

- rEFIt bootable CD (http://refit.sourceforge.net/doc/c1s5_burning.html)

- Coffee



1. Connect your USB hard drive, and reboot with the Ubuntu install CD in the drive. Hold down ‘c’, and when the disc boots, hit enter to begin the Ubuntu install as normal.

2. (Important!) During the install at ‘Prepare Disk Space‘, choose your USB hard drive as the location to install Ubuntu. It will default to the internal hard drive – change this or else you will accidentally install on the internal drive!

02macubuntu-2

03macubuntu-2

3. (Also important!) At the last point of the install where it says Ready To Install and you are given a summary screen, CLICK Advanced

04macubuntu-2

Here CHANGE the hard drive location for the boot loader. It will default to the internal drive location first. Change it to the /dev/sdb or other location of the external USB hard drive.

06macubuntu-2

4. Sit back and let Ubuntu install. At the end of the install, click to reboot and wait for Ubuntu to eject the CD. Now insert your rEFIt bootable CD.

5. Reboot with the rEFIt CD in the drive. Hold down ‘c’ as the machine turns on, and there you will enter the rEFIt boot menu. Select Linux Hard Drive and press enter.




Example rEFIt boot screen


You will need to boot from this rEFIt CD to enter Ubuntu! (Do step 5 in order to boot into Ubuntu!)

This leaves the existing internal hard drive and OS X install untouched.

Done!

26 Responses

  1. Spettro

    It doesn’t work:
    - Refit 0.14
    - Ubuntu 10.04.1
    - Macbook 4,1

    Any suggestion please?

    • scott
      Twitter:

      Can you provide more details?

      Did the install finish ok / where exactly is it getting stuck / can you boot off the refit CD ok / have you tried the latest version of Ubuntu (10.10) / have you searched ubuntuforums.org , etc ? for example

      The more details the better. :)

  2. Spettro

    The install finished ok.
    When I restart choosing the tux, from the screen of refit cd, I have a black screen saying ‘Missing operating system’.
    I followed every step of your article, i thought it was complete!

    p.s. The images in your article are about ubuntu 10.04, not 10.10.

    • scott
      Twitter:

      Re: 10.04 images in this article – yep, this post you found is from June 2010, before Ubuntu 10.10 which is as of today the latest version of Ubuntu.

      Probably after 11.04 is released I will update the screenshots. It may look a little different, but the process is the same.

      Right off hand it sounds as if your external drive is missing the boot loader, or the boot loader did not install correctly for some reason.

      It certainly won’t hurt to try the install again with 10.10 or check out ubuntuforums.org ‘s apple section for more info as well.

  3. Spettro

    I took the hard disk from the usb case and I put it inside the macbook and the system started up.
    This Ubuntu 10.04 automated installation procedure is not suited for an external usb on a macbook.

  4. David

    Greetings and thanks for some info on how to do this. One question, though…I have all of pictures and tunes on my external hard drive now. Also my Time Machine backups. If I follow these directions, will I lose my pictures, tunes, and backups??? If so, how can I still install Ubuntu on the the external hard drive and save all this data???

    Thanks!!!

  5. ben

    I followed these steps and installed ubuntu 10.10 on the second partition of an external usb drive (the first being a jhfs+ I use for time machine on my internal os x 10.5.8 install, if that matters in any way). BTW, the install gui has changed, and I did not even find a place to change where grub is installed. Thankfully, it did install to /dev/hdb’s MBR. I restarted, synced the partition tables (I already had rEFIt installed), and clicked on the linux icon. The full gray screen with tux in the middle appears followed by an all black screen with no cursor or anything. The system quits there. Any idea what’s gone wrong? Here’s some output from boot info script if that’s helpful:

    Syslinux is installed in the MBR of /dev/sda
    => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
    partition #2 for (,msdos2)/boot/grub.

    sda1: _________________________________________________________________________

    File system: vfat
    Boot sector type: BSD4.4: Fat32
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files/dirs:

    sda2: _________________________________________________________________________

    File system: hfsplus
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files/dirs:

    sdb1: _________________________________________________________________________

    File system: hfsplus
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files/dirs:

    sdb2: _________________________________________________________________________

    File system: ext3
    Boot sector type: -
    Boot sector info:
    Operating System: Ubuntu 10.10
    Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

    sdb3: _________________________________________________________________________

    File system: vfat
    Boot sector type: BSD4.4: Fat32
    Boot sector info: According to the info in the boot sector, sdb3 starts
    at sector 0. But according to the info from fdisk,
    sdb3 starts at sector 734527584.
    Operating System:
    Boot files/dirs:

    sdb4: _________________________________________________________________________

    File system: Extended Partition
    Boot sector type: -
    Boot sector info:

    sdb5: _________________________________________________________________________

    File system: swap
    Boot sector type: -
    Boot sector info:

    =========================== Drive/Partition Info: =============================

    Drive: sda ___________________ _____________________________________________________

    Disk /dev/sda: 60.0 GB, 60011642880 bytes
    255 heads, 63 sectors/track, 7296 cylinders, total 117210240 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes

    Partition Boot Start End Size Id System

    /dev/sda1 1 409,639 409,639 ee GPT
    /dev/sda2 * 409,640 116,948,055 116,538,416 af HFS

    GUID Partition Table detected.

    Partition Start End Size System
    /dev/sda1 40 409,639 409,600 System/Boot Partition
    /dev/sda2 409,640 116,948,055 116,538,416 HFS+

    Drive: sdb ___________________ _____________________________________________________

    Disk /dev/sdb: 500.1 GB, 500107861504 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773167 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes

    Partition Boot Start End Size Id System

    /dev/sdb1 63 524,550,206 524,550,144 af HFS
    /dev/sdb2 * 524,550,222 734,527,565 209,977,344 83 Linux
    /dev/sdb3 734,527,584 973,103,247 238,575,664 b W95 FAT32
    /dev/sdb4 973,103,290 976,773,104 3,669,815 5 Extended
    /dev/sdb5 973,103,292 976,773,104 3,669,813 82 Linux swap /”

    • scott
      Twitter:

      Hm, that sounds like it’s missing grub. Or grub was installed in the wrong place. Maybe start over? Careful – you could possibly trash your time machine backups if the Ubuntu installer installs over that existing HFS partition. (!)

      I’ll try and update screenshots when 11.04 comes out,

      • ben

        actually i found the problem. i already had refit installed, so i ignored your step that called for starting with the bootable refit cd. however, when i booted with that cd in and clicked linux from the refit screen grub appeared. i clicked ubuntu and ta-da. soo.. sounds like i should’ve followed your steps, although it makes no sense to me why booting with that cd would make any difference, since it shouldn’t have any effect on whether the external hd is bootable. any idea what the deal is there? btw, thanks for the instructions. they were spot on.

        sometimes after i choose ubuntu from grub it halts at a black screen again, but if i tap the power button (i.e., suspend/unsuspend) it continues the boot process. any clues about that one? could this have to do with grub thinking my timemachine backup is a bootable os x partition? (which it is, i assume. i just started using timemachine when i got this drive yesterday.)

        • supermariofan25

          That would be because you have refit installed on the internal drive, when your mac boots from the internal drive, it doesn’t need to load an external drives so when initialy booting from an external drive before it loads the internal helps boot linux better when booting refit from a cd

  6. Newman

    Hi there,

    hummm…. I tried above procedure to install ubuntu 11.04 to external hard disk connected USB drive. The problem was when I insert the refit bootloader CD after installing Ubuntu 11.04 to USB HDD, then I tried boot from rEFIt however it appears “Grub rescue” prompt always. I’ve been using Grub2 bootloader.

    Anything wrong the set-up procedure?

    kindly regards,

  7. Sei

    Hi, I have followed your steps with some differenses. One: I installed it on a partition on my external hdd. Two: I already have rEFIt installed so I did not use the cd. Turer: I installed ubuntu 11.10. When everything has installed without error and I have synced inside rEFIt I see the linux alternetiv in the boot menu. When I choose the linux alternetiv however I just get “missing operating system”. I have reinstalled 5 or 6 times no differense… Any ideas?

  8. raleigh

    but then you still need the disk drive to boot! the whole point is that its on my external hdd not the disk! btw i have a mba so i gotta use the super drive

  9. raleigh

    would this delete any data already on the external hard drive?

  10. scott
    Twitter:

    Note: rEfIt does not work (yet!) with OS X Lion. So you can install Linux, but cannot ever boot from the rEFIt CD.

    So probably wait until there is an update to rEFIt before attempting with a Lion machine. Thanks,

  11. Cody

    There is an alternative to rEFIt out there that is built on the original. It is called rEFInd and can be found here.

  12. a-fan-of-mario

    I know this thread is kinda old but to all people trying to run ubuntu from hdd with refit on the internal hdd, it cuts power to usb devices wheb booting, but when using refit on cd or from the hdd itself, the power wont be cut to usb devices as it knows they need to be used

  13. JP

    I’ve followed the directions and they have worked great, up to the point where
    I reboot with rEFIt in the CD drive. When I do this I get to select between my
    OSX and TUX installations. When I select the TUX installation it tells me that no
    boot device is present. I saw from a previous comment that I should run rEFIt
    partition tool. I did this and it tells me that the MBR and GPT are out of sync.
    Bear with me, I am no MBR expert. I __COULD__ just accept the partition tools
    suggested fix, but I am looking for a little advice from an expert.

    Here is what it tells me:
    Current GPT:
    #________StartLBA_______EndLBA_________Type
    1_________40___________409639_________EFI System (FAT)
    2______409640_________1953262903____MAX OSX HFS+

    Current MBR:
    #________StartLBA_______EndLBA_________Type
    1_________1___________1953525167______EE EFI Protective

    Proposed MBR:
    #________StartLBA_______EndLBA_________Type
    1_________1_____________409639_________EE EFI Protective
    2______409640_________1953262903_____AF MAX OSX HFS+

    The install of ubuntu I did was on an external USB drive. My internal OSX is on
    a 256G SSD drive. I also have 1TB for user/storage in the system.

    Advice/Questions:
    1) It looks like the proposed fix is to define to possible boot records in the MBR?
    Is that really what I want?
    2) What happens when I disconnect my external drive with ubuntu on it and restart
    the machine? Is MBR going to cause problems because I have these two entries in
    it and really there is only one connected in the system at this time when I reboot.
    3) Does it makes sense that I have to make this change?
    4) Would I ever need to restore the MBR? And if so, how would I?

  14. NS-1m

    I think the solution of successfully running linux in external usb drive (hard drive) in Macbook is to have a EFI boot.

    I managed to run usb install Linux Mint 13 (cinnamon) ~ (Ubuntu 12.04 derivative) without any reFit or reFind installed in the system. I created .dmg and dd into usb stick. It booted in my macbookpro retina. I have not installed yet in external hard drive since I don’ t have one yet.

    My plan is to installed Linux Mint in external HDD and then update the Linux kernel to 3.5.x from ubuntu repository. MacbookPro retina needs 3.5.x linux kernel to work properly (e.g. nvidia card, wifi and thurderbolt.

    I suggest try to install Linux Mint 13 or new Ubuntu which as support to EFI booting if you want external linux installation working.

  15. Shawn

    Will this work with fedora as well?

  16. Mike

    I can verify that a Ubuntu 12.10 live installer on a usb stick, made with unetbootin, will boot on a MacBook Air (mine is 2010) without rEFIt. That is because it supports EFI booting. The only trick is that at startup, you must hold down the option key and choose the “EFI” disk. I’m pretty sure that Ubuntu 12.04 will do the same, but the current version of Puppy Linux, based on Ubuntu 12.04, will not – it doesn’t show as a boot disk even with the option key. However, what I am really after is a persistent usb that will allow saved changes. I have done a lot of internet searching to find out how to do this and even after trying some of the suggestions, I have yet to solve this problem. I know one solution will likely work – install from the live usb stick onto another usb stick. But I’m afraid to do this for fear of messing up my internal drive. You can do this without concern on an MBP by easily disconnecting the internal drive before starting the process, but that’s less easy on a MBA. If anyone knows how to solve this problem, I’d like to hear about it.

  17. Milan Senar

    I followed all the procedures mentioned above but when I choose Linux (Ubuntu), Windows boots instead of Windows, since I have dual boot Mac OSX and Windows 7. Any possible explanations to what I am missing?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Mac How-To Install Ubuntu to External USB Hard Drive