Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Here's what I mean:

I normally install by running a Ubuntu Live USB, clicking "try" Ubuntu, and when I'm ready, I double-click the "Install Ubuntu" icon on the desktop.

Install Ubuntu Icon

Now, I have an eSATAp port and what I'd like to do is connect my hard drive directly to my laptop/desktop which already has Ubuntu running on it and simply run that same application that's available on the Live CD/USB to install it on the external drive.

I'm open to other methods as well, as long as I don't have to "burn" an ISO to a USB, then reboot from the USB, then install it to the external drive.

A million thanks!

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

You are asking an interesting questions. I'll rephrase it my own words: Is it possible to run Ubuntu's installer, which is present at Ubuntu's LiveCD, from a regular Ubuntu system (installed to HDD)?

The GUI installer you found on the LiveCD is packaged as ubiquity. It's not clear, what will happen if you try to install and run this from your your HD install. While it might work, this does not seem supported or tested.

It's well known, that Debian-based systems such as Ubuntu can be installed in a chroot environment. Chroot is a tool, which can treat any directory as the root directory "/". You can easily create a chroot environment on your external HDD. If you want to boot this chroot Ubuntu, you have to install a kernel and a boot loader. While this is a known and tested method for Debian (and I have personally done this with Ubuntu), the tutorials on the web are outdated. Hence, this is only an option if you are familiar with grub and the Linux boot process.

Actual Answer: While your question is reasonable, it does not seem supported by Ubuntu or any other modern operating system. We have become so used to install OSs from a boot CD or USB, that other methods were neglected.

You didn't specify what the purpose of installing Ubuntu onto the external HDD is. If you leave this external HDD connected as it is, your computer will probably never boot it, because it prefers your internal HDD. If you change the BIOS settings, connect the external HDD to a different computer, or anything the like, then this (currently) external HDD can become the role of the boot HDD. Now, here comes the catch: It takes some guesswork to know now, whether and how this HDD will ever become bootable. The PC BIOS is a horrible bootloader, not designed for such things. That's probably why your idea is not supported through easy installation vectors such as Ubuntu's GUI installer.

share|improve this answer
add comment

I think this link that may help: How do I install Ubuntu to a USB key?

In short:

  1. Install qemu-kvm package and dependencies if not yet done so.

    sudo apt-get install qemu-kvm
    
  2. Run virtual machine with external HDD (assume it is mounted at /dev/sdb) as internal drive and Ubuntu ISO file as cdrom. Add more ram to virtual machine with -m 2GB if you have plenty of ram on your machine to speed up installation process.

    sudo kvm /dev/sdb -cdrom ~/.cache/testdrive/iso/ubuntu_natty-desktop-i386.iso
    

Personally, I prefer to run any installer on target PC/laptop instead of remove HDD from it and install at another PC/laptop.

share|improve this answer
add comment

It isn't really necessary to reinstall at all. You can just copy your installed operating system onto the other disk and boot it. If the two disks are of equal size, then it's very easy:

sudo dd if=/dev/disk1 of=/dev/disk2

This will make disk2 a clone of disk1, meaning that the partitions and everything will be copied. When the copy is finished, you can boot from the external disk, and have everything you had.

If your computer supports hardware virtualization, then you can also install kvm -- probably with virt-manager as a GUI -- and use the external disk as a disk for a virtual machine.

share|improve this answer
1  
This would be great if I needed to duplicate systems. But what I want is to install the first system (and not a duplicate of my laptop's setup). E.g. I'm at a friend's place and they have a spare laptop, I suggest trying Ubuntu on it, and they agree. I then take out the HDD, connect it via eSATAp to my laptop (which runs 11.04 currently), open the "Install Ubuntu 11.04" app (or do something else?), then install directly to the new hard drive. (As a side note, btw, it's faster to do fresh installs each time than to copy every bit from one HDD to the other.) –  Nathan J. Brauer Oct 7 '11 at 9:35
add comment

This may be possible by using Virtual Box. You would just need to set up a USB device in Virtual Box, and then install to the external drive that way.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.