2

What I want to do is installing Ubuntu 20.04 on an external hard drive and be able to use that OS in my an old HP laptop when I'm at work, and then be able to take that drive and plug it in my home pc to use the same OS (different CPU/GPU/RAM etc from my laptop). What worries is me how will the drive handle the drivers and everything from both PC's. Will I need to install the drivers every time I plug it to a different pc? Thanks in advance! And please tell me if this a duplicate, couldn't find an answer or tutorial for this.

rjscr
  • 21

4 Answers4

3

Ubuntu on external hard drive in 2 different devices

As long as there are no proprietary drivers installed and both computers boot UEFI mode or else both computers boot Legacy mode, there will be no problem. It will be the same as booting a Live USB on both computers.

If you are installing a new Ubuntu 20.04 on a new external hard drive, you can use the method here: Easy Full Install USB that Boots both BIOS and UEFI to flash an Ubuntu image that boots both Legacy and UEFI modes.

The drive should boot an almost any Intel computer.

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125
1

Don't do that: This is asking for trouble.

This may work well for a while; but it might also fail in spectacular ways. For example, whenever a kernel package is upgraded, the initrd (the initial RAM disk used for booting) is recreated, and that involves selecting the kernel modules (i.e. hardware drivers) depending on the current hardware. That means the next reboot on the other machine may fail because some kernel module may be missing.

This works for live systems only because the initrd they use contains basically everything that may possibly be needed for booting. But that is a carefully hand-crafted initrd, unlike the one that is automatically generated after a kernel upgrade.

HuHa
  • 3,525
1

Comparison between Persistent and Full install USB

Advantages of a persistent install:

  1. You can use the persistent pendrive to install Ubuntu to another computer.

  2. A persistent install takes up less space on the pendrive.

  3. You can reset the pendrive by overwriting the old casper-rw file with a new one.

  4. The install to pendrive takes less time.

  5. Slightly less wear on the drive.

Advantages of a Full install:

  1. You can update and upgrade.

  2. If you have problems or wish to modify, the solution is the same as with an internal install, (You can ask for help in the forums).

  3. No ugly startup / install screen.

  4. Better security, you can use full encryption

  5. You can use proprietary drivers.

  6. Hibernation works.

  7. A persistent install is limited to a 4GB casper-rw and a 4GB home-rw persistence file, to get more persistence requires persistence partitions. Once casper-rw is full, the drive will not boot.

  8. More efficient usage of disk space. Does not require reserved space for persistence.

  9. Faster boot, no automatic disk checking or Try Ubuntu/Install Ubuntu screen.

  10. You can run VBox and use virtual machines.

  11. Generally faster boot than Live or Persistent USB's.

  12. More stable

Note that once booted, both methods run at about the same speed. If the computer has lots of RAM Ubuntu should run mainly in RAM and there will not be a big difference between running off internal HDD and USB3 flash drive.

Full Install Method

A quick and easy method to flash a Full install to USB can be found here: Easy Full Install USB that Boots both BIOS and UEFI

A more traditional methods for creating a Full install USB from scratch can be found here: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125
0

The only important part is your files. Setup the machines to use a /home/user_name on the external drive or as a folder for just your files. When this is plugged in to either machine it is used, giving you all your files on either machine. They can each have their own / file system with all your programs on them. An alternative is using the live USB stick on each machine with the external drive. When the live stick boots you have script that installs your programs and mounts the external for your use for the files you need. If you can get the stick to do the persistent idea for the programs you need installed on it plus the use of the external as your home directory you have exactly what you want with it too. Two USB sticks could be used as well one for each machine to boot from with an install on each using the external again as the home directory. Then you could use the machines for any other OS you wanted on them while booting the USB sticks when needed. Just a few ways to do it.