Partner links

Install Ubuntu 11.04 on external hard disk

extDisk

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.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
87 Comments
Inline Feedbacks
View all comments
SomeHELP_pls
SomeHELP_pls
12 years ago

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.

SomwHELP_pls
SomwHELP_pls
Reply to  finid
12 years ago

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 ?

dragonhalls
dragonhalls
12 years ago

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

needHelp
needHelp
Reply to  finid
12 years ago

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.

Sam
Sam
12 years ago

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

Sal
Sal
12 years ago

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

needHelp
needHelp
12 years ago

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?

needHelp
needHelp
Reply to  finid
12 years ago

ok.thank you very much sir.

animealam
12 years ago

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.

Ryan
Ryan
12 years ago

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
Ryan
Reply to  Ryan
12 years ago

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
Ryan
Reply to  Ryan
12 years ago

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.

Ryan
Ryan
Reply to  finid
12 years ago

Sure. In gparted this is the order from top to bottom.

sdf2 – ext2 – /boot – 245mb
sdf5 – unknown – 2gb
sdf6 – ext4 – / – 10gb
sdf7 – ext4 – /home – 288gb
sdf1 – fat32 – 631gb

The fat32 drive was the first one I created on the disk, that’s why it is sdf1. It IS at the end of the disk though.

raweed
raweed
Reply to  Ryan
12 years ago

Hi ryan just to make sure the unknown 2gb partition is the linux swap right?

ubuntuhelp
ubuntuhelp
12 years ago

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)

ubuntuhelp
ubuntuhelp
Reply to  finid
12 years ago

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

HJ Chin
HJ Chin
12 years ago

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. 🙁

HJ Chin
HJ Chin
Reply to  finid
12 years ago

It is a portable external hard disk

HJ Chin
HJ Chin
Reply to  finid
12 years ago

I just tried with a USB drive and it’s works! Is it possible due to that particular external HDD? It is freecom 2.5” mobile drive,

http://www.freecom.com/Products/External-Hard-Drives/Mobile-Hard-Drives/Mobile-Drive-XXS

I’ll try on another external HDD, it is freecom brand too. See how’s it turn out 🙂

HJ Chin
HJ Chin
Reply to  finid
12 years ago

Again, it just crashes. It is a 320GB Freecom external hard disk. Any idea?

crazy
crazy
12 years ago

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

crazy
crazy
12 years ago

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.

crazy
crazy
Reply to  finid
12 years ago

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

briceorbryce
briceorbryce
12 years ago

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?

briceorbryce
briceorbryce
Reply to  briceorbryce
12 years ago

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?

mido
mido
12 years ago

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?

RSK
RSK
12 years ago

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 )

Yuvraj Talukdar
Yuvraj Talukdar
12 years ago

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?

1 2 3

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
87
0
Hya, what do you think? Please comment.x
()
x