Came here in search of an answer to a problem, but didn't find it? Visit the forum @ LinuxBSDos.com, pick a category and ask a question.

Install Ubuntu 11.04 on external hard disk

Installing Ubuntu 11.04 or any other distribution on an external hard drive connected to a computer via USB is about the same as the method used to install it on an internal hard disk. Your choice of external disk to use are many, but the one I used for this tutorial is a 2.5′ hard disk that I put in a similarly-sized hard disk enclosure.

A 320 GB 2.5′ hard disk purchased for this tutorial cost US $45. Enclosures tend to be very cheap. The one I bought cost about US $7. At 5’x2.75′, the whole unit can fit comfortably in any pocket. You can use it to clone your Ubuntu 11.04 installation that you carry along with you. And with the USB connection, you can use it on any computer that can boot off a USB device.
extDisk

To start, connect the disk via the USB cable to any computer and boot the computer using an Ubuntu 11.04 CD or DVD. At the disk partitioning step, select “Something else.” Doing that and clicking on Forward will take you to the installer’s advanced partitioning tool, which you are going to use to configure the partitions for Ubuntu 11.04.
dualBoot4

If the computer you are using has only one hard disk, the external drive you are attempting to use will be detected as /dev/sdb. The “b” shows that it is the second disk detected by the system. The task now is to select the disk and configure the partitions for Ubuntu.

Note: If you are intend to use this installation for serious stuff, it is better that you encrypt the disk. That entails using an Alternate Installer ISO image. You may use how to install Ubuntu 11.04 on an encrypted LVM file system as a guide, if you decide to follow that route.

You might also be interested in how to install Ubuntu 11.10 on external hard drive, with an NTFS partition at the end.

By default, Ubuntu’s installer configures two partitions – the first for /, the root directory, and the second for Swap. When creating partitions for installing any desktop Linux distribution, my recommendation is to create the following four partitions:

  • /boot, the boot partition. This is where programs critical for booting the system will reside.
  • /, the root directory. The bulk of the programs used for running the system will be installed here.
  • Swap, unformatted disk space for use as virtual memory.
  • /home, the partition where your home directory will be located. In the course of using the system, files and folders you create will reside in various folders here.

To begin configuration, select the free space as shown, and click on Add.
eBuntu

The first partition will be for /boot. When setting up an LVM-based system using an Alternate Installer ISO image, the default disk space allocated to /boot is 258 MB. However, only about 22 MB of that is used, so anything thing between that size range will do. For this tutorial, the default will be used. The mount point will, of course, be /boot. The default file system is ext2. OK.
eBuntu1

The second partition will be for Swap, disk space that the computer may use as virtual memory. The suggested size for Swap is 2000 MB. Select “swap area” from the “Use as” dropdown menu. OK.
eBuntu2

The third partition will be for /, the root directory. The default journaling file system on Ubuntu 11.04 is ext4. You may stick with it or choose another journaling file system available. The installer recommends a minimum of 4.4 GB for Ubuntu 11.04, but on a new installation, less than 3 GB of disk space allocated to / is used. Note that as you install additional application after installation, disk space used will grow, so be generous here. I think 10 GB should be more than enough. OK.
eBuntu3

The last partition will be for /home. The file system is ext4, and you may allocate all available disk space to it. OK.
eBuntu4

All the partitions have been configured. Before clicking Install Now, you need to change where GRUB, the boot loader, will be installed. By default, it will be installed in the MBR of the computer’s internal disk. But that is not what you want. You want to install GRUB in the MBR of the external disk. So, under the “Device for boot loader installation” section, click on the dropdown menu, and select the entry that matches the external disk that you just partitioned. Once that is done, continue with the rest of the installation.

After installation, test the system by booting the computer from the disk. You may use this as a mobile clone of your Ubuntu 11.04 installation.
eBuntu5

You can have quality articles like this delivered automatically to your Feed Reader or Inbox by subscribing via RSS or email. This website now has a Question and Answer section. Use the commenting system for simple comments, but for more involved assistance, please use the Q & A section.

0saves
To have articles like this delivered automatically to your Feed Reader or Inbox, subscribe via RSS or email.
Digital Ocean SSD VPS Cloud Server droplets

Digital Ocean is a VPS/Cloud hosting provider. For just $5 per month, you can get yourself a Cloud server with 512 MB of RAM, 20 GB super-fast SSD, free snapshots, plus backups for a minimal fee. All via a simple graphical interface.

And by signing up with this referral link, you can help support this website.

If you are reading this, your ad could also be occupying this space. Contact us to make it happen.

If commenting on this article is closed, please post your comments at forum.linuxbsdos.com.

86 Comments

  1. SomeHELP_pls says:

    sir,i need your help.. i successfully install the ubuntu on my 8gb flash drive. Now my problem is how to delete the ubuntu on my flash drive.i try to reformat my flash drive. but it didn’t work it did not go back to its original size.the only space i could see is the 970mb space. which is the space that i left when i install the ubuntu. what am i going to do to return my flash drive to its original size.. pls i need some help.

    • finid says:

      If you using Windows, launch the partition manager (type “partition” in the menu’s search field). You will see the entry for the flash drive and the actions you can take on it.

      From a Linux distribution, there should be a disk utility in the menu, usually under Administration or System Tools or System Utilities. Launch it, select the entry for the flash drive, and choose the “Reformat” option. Just be sure that you choose the correct drive.

      • SomwHELP_pls says:

        sir, i have another problem, before i ask for your help, i try to find some solution in the net, i find some software that says they could help to format the partitions on flash drive and make it again as one partitions.So i tried it,and it works it gets back to its original size,actually it returns a bigger size. but when i try to open my flash drive my computer says that my flash drive needs to be reformatted so i reformat it again but it gets some error then my flash drive size becomes 0(zero) bytes. when i tried to reformat it again it says that my flash drive is now write protected. sir what am i going to do? is my flash drive now corrupted ?

  2. dragonhalls says:

    hi i wanna install ubuntu on 8gb usb flash drive,could u guide me on the partition?thx in advance

    sdf2 – ext2 – /boot – ???mb
    sdf5 – unknown – ???gb
    sdf6 – ext4 – / – ???gb
    sdf7 – ext4 – /home – ???gb
    sdf1 – fat32 – ????gb

    • finid says:

      If you are going with an 8GB Flash drive, no point having more than two partitions – / and Swap.

      8GB is too small to carve up into the standard partitions for a regular drive.

      • needHelp says:

        hey sir its,me too was planning to install ubuntu 11.04 on a 8gb flash drive,can you guide me on how to partitions my flash drive,what partitions is needed and not. thank you sir.

  3. Sam says:

    When i try to make new partitions im not getting the option of primary or logical. how can i get these options to create the different boot swap etc. drives

  4. Sal says:

    I tried to install ubuntu 11.04 from usb stick to external hard drive(no other internal hard drives are connected), but at the end of installation i get error message about grub not possible to install on selected drive(which is the right one).
    I don’t know if it’s ubiquity related, because i get the same error whith other ubuntu 11.04 based distributions using grub2.
    Thanks for help.
    Sal

    • finid says:

      It might be specific to a type or brand of HDD, but I’m not too sure about that. I did not have any problem installing GRUB in the external drive I used for this tutorial. I’m going to try another drive some time tomorrow to see if I can reproduce the errors that you guys have been reporting.

  5. needHelp says:

    hey,sir we have a project in networking,we need to install ubuntu 11.04 but we are not allowed to use the main hard disk of our computer laboratory to install the ubuntu 11.04,so our only option is to find a way on how to install ubuntu in a external hd or in a flash drive,then i found this tutorial, i like to try it,but i was wondering if i could make it because the size of my flash drive is only 4gb, my question is, could i install it even in a 4gb flash drive?

  6. animealam says:

    Wonderful tutorial, thanks!

    It worked like a charm, and I’ve been able to use Ubuntu on my laptop without needing to mess with Windows 7. I’m using a 230 gb partition on an Iomega 500 mb portable hdd.

    It booths well on the laptop I made the installation, but I can’t get it to show anything past the grub on any other computer (laptop and desktop). The grub is on the external hdd, but it only gives me a black screen after several minutes of activity on the hdd.

    Should I have done something else so it loads on other computers? They all run on windows (1 windows 7 like the one I installed it, the other windows Vista). One is dual core i5 the other is a quad core.

  7. Ryan says:

    I have an interesting problem. I followed your instructions exactly. So it should be that the grub is installed on the external hdd. I restarted after the installation and I chose to boot with the external hdd, but I get an error line followed by grub rescue>. Then I try booting the internal hdd. Windows comes up and everything is fine. Where did I go wrong? How do I get the external hdd to work?

    • Ryan says:

      I had to double check the error.

      error: unknown filesystem
      grub rescue>

      I don’t know if this is important or not, but my external hdd was not empty when I began the installation. I have a large cache of movies on it in a Fat32 partition. Then I split up the a good portion of the extra space using the above instructions.

      • Ryan says:

        Problem solved. The first partition I had on the hdd was 650gb in Fat32 format. I moved that partition to the back of the hdd and reinstalled Ubuntu in the front and everything works perfect now. Thanks.

  8. ubuntuhelp says:

    Hey, followed your instructions, it said it was succcessful and that i needed to restart. after i did that it is not showing that i can boot from the ext hdd. its not there in boot device options at the start, only shows internal hdd, cd/dvd rom, and internal network adapter.
    is it a problem that i didnt assign all of the free space to /home because it is a big hdd and i dont want to use all of it (i assigned 200gb)

    • finid says:

      Could it be that you installed GRUB in the internal HDD? That’s a common mistake.

      • ubuntuhelp says:

        Do you mean the boot loader installation ? because i chose the external hdd for the, or do you want me to specifically choose the /boot partition for the boot loader? it said it was sucessful, once it showed up on the boot menu but when i boot from it nothing happened. hasent happeard since

  9. HJ Chin says:

    I had tried few times and always encountered crash at grub-install/dev/sdb. It say “sorry an error occurred and it was not possible to install the bootloader…”

    It is working fine when I install it in internal hard disk.

    I’m new to Linux and have been trying install it the whole day and but still can’t figure out it after hours of googling. :(

  10. crazy says:

    Let me add that now I can only ‘see’ the internal hd only when I boot from the Live USB flash drive. And that says
    /dev/sda
    Freespace

    does that mean I have to reinstall windows and all the old data is gone

    • finid says:

      That doesn’t sound good. But do not panic. Sometimes, /dev/sda is not necessarily the internal HDD.

      Restart the installation of Ubuntu, then follow the instruction from my previous comment.

  11. crazy says:

    I followed the instructions to install Ubuntu onto an external hard drive that had two partitions. I was supposed to have installed linux in one of those partitions but somehow I seem to successfully installed linux at the cost of everything else. The external hd is repartitioned so that now there is only one partition and even my windows is gone.
    When i try to boot my computer i get a blank screen with a blinking curser at the top. I have to go to the Bios to load linux from the external HD. Well atleast i go that right.
    Any ideas how I can recover Windows i am new to Linux and I need to recover my data on the local drive.

    • finid says:

      The external HDD has two partitions. What was in those partitions?

      Where was Windows? I’m guessing it was is on the internal HDD because Windows cannot be installed to an external HDD. Right?

      If you have Windows on the HDD that you installed Ubuntu on, and you are not sure if you’ve hosed Windows or not, boot the computer from Ubuntu’s installation disk, and start the installation. When you get to the disk partitioning step, Select “Something else,” then click Next. That should open the advanced partitioning tool, where all detected partitions should be visible.

      If you do not see any NTFS partition listed, then you have hosed Windows. NTFS partitions belong to Windows

      Alternatively, if you can, boot into Ubuntu and open the file manager. Detected partitions should be visible on the left panel (of the file manager).

      Check that out and let me know, so we can move to the next step.

      • crazy says:

        Aoa,

        Yes windows was installed on the internal hardrive and it is not the one on which I installed Ubuntu. That is on the external HD.Both HDs had multiple partition but now it seems that i have managed to repartitioned both so that each has not partion on it all.

        when I followed the steps and booted from the installation USB I do not see an NTFS partition. The internal is detected as
        /dev/sda
        freespace

        Does that mean I will have to re-install window on the drive again. If I do that will most likely wipe the HD of data that I need to recover.

        Please advise on how to proceed

        • finid says:

          It’s almost difficult to imagine how you managed to do that in one installation of Ubuntu. If sda is as you described, then it’s not going to be easy to recover anything, that is, if it is even possible.

          The only solution I can think of now is to grab a security distribution with forensic tools, to see what you can do. Backtrack is a very good example.

  12. briceorbryce says:

    What’s the difference between installing GRUB in the MBR of the computers internal disk, rather than the /boot partition? Easier to move around, or modify perhaps?

    • finid says:

      Is that the boot partition of the internal disk?

      If you are installing a distro to an external disk, you want the boot loader in the external disk, and the best location is always the MBR. The main draw of installing to an external disk is to have a “mobile computer,” a system that you can take with you anywhere, connect to any available computer and boot.

    • briceorbryce says:

      Oh I understand now. You were installing GRUB on an external HD rather than the computer you were using to install it on. My question is then, what’s the difference between using the hard drive for the boot loader installation vs the /dev/sdb1 which is were the boot partition is located?

  13. mido says:

    man im doing what u say but when install finish i only see driver file system i dont see the other drive tell me what should i do?

    • finid says:

      You will have to select the external drive before the system boots into the internal drive. On most systems, pressing F11 will enable you to select the boot device. You may even go into the BIOS setup by pressing the Delete key to change the boot device.

  14. RSK says:

    Can i install ubuntu on a partitioned external USB hdd?
    Whether i need to select “Device for boot loader installation” as \dev\sdb1 (accouding to the pics in tut,with mount point /boot )

  15. Yuvraj Talukdar says:

    I have Windows 7 enterprise x86. If i install ubuntu 11.04 on an external hard disk than will some effects will occur in my windows 7?
    Will I be able to eject and remove the hard disk?

    • finid says:

      Your Windows 7 installation will not be affected in any way. If you are not running the computer from the external disk, and it is connected to the computer, you can do just about anything you would normally do with other connected devices.

Leave a Comment