If I can, how do I install Ubuntu from Ubuntu?

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!


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.


I think this link that may help: How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

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.