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.
4 Answers
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.

- 19,519
-
Thanks a lot! In another answer someone warned that this would cause problems in the future because of the RAM configuration. How should I solve this? Both of my devices have different amount of RAM (8 and 16GB) My only option is using a persistent live linux version? – rjscr Feb 18 '21 at 09:34
-
@rjscr: I have been using Full install USB devices for 14 years now and Sudodus, the creator of this image file and the creator/maintainer of mkusb also has considerable experience. I have never encountered problems with RAM as described in the other post, never. I used one USB for over five years uprading Ubuntu twice a year with every new version. Ubuntu mainly runs in RAM, if using a SSD you should not find it different in speed from an internal install. – C.S.Cameron Feb 18 '21 at 09:54
-
I'll do that then, your case seems pretty accurate to what I need. I'll use a live Ubuntu from an USB and install a live version in my hard drive using mkusb. – rjscr Feb 18 '21 at 11:14
-
@rjscr I have added another answer comparing Persistent install and Full install, for your interest. – C.S.Cameron Feb 18 '21 at 11:29
-
Comparison between Persistent and Full install USB
Advantages of a persistent install:
You can use the persistent pendrive to install Ubuntu to another computer.
A persistent install takes up less space on the pendrive.
You can reset the pendrive by overwriting the old casper-rw file with a new one.
The install to pendrive takes less time.
Slightly less wear on the drive.
Advantages of a Full install:
You can update and upgrade.
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).
No ugly startup / install screen.
Better security, you can use full encryption
You can use proprietary drivers.
Hibernation works.
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.
More efficient usage of disk space. Does not require reserved space for persistence.
Faster boot, no automatic disk checking or Try Ubuntu/Install Ubuntu screen.
You can run VBox and use virtual machines.
Generally faster boot than Live or Persistent USB's.
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

- 19,519
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.

- 3,385
-
Thanks a lot for the warning. About the live systems: how is their performance compared to a real OS installation? Will it be good for me when I will need to install and use multiple packages and programs? (My main use is web development.) – rjscr Feb 18 '21 at 09:35
-
So, what is the worst that can happen? In 14 years of using Full install USB's on multiple machines I have never encountered the problem you describe. I peruse Ask Ubuntu, Ubuntu Forums and other internet sites dally for posts on bootable USB and have never heard of such claims. Please provide some factual reference for what you write. – C.S.Cameron Feb 18 '21 at 10:45
-
Live systems load from USB, so the boot process takes somewhat longer; but once booted, they are running from a RAM disk which is lightning fast. But if you need to install packages, those also only go to the RAM disk, so no change will be permanent, i.e. you'll have to do it again after every reboot. That's not the way to go for a permanent solution. – HuHa Feb 18 '21 at 10:46
-
@C.S.Cameron: It depends on how similar or different the hardware on those machines is, of course. For run-of-the-mill PCs with, say, Intel on-board graphics and a standard Intel chipset, it may work well. For more exotic hardware, it might not. – HuHa Feb 18 '21 at 10:48
-
A Full install to USB is no different that an install to internal disk, to Ubuntu a drive is a drive. Even Internal installs of Ubuntu run mainly in RAM. I have done quite a bit of benchmarking that shows little difference between Ubuntu running Live toram and a Full install, as long as there is lots of RAM. https://askubuntu.com/questions/1238927/benchmark-ubuntu-persistent-usb-vs-installed-system. Changes made to a Full install USB are as permanent as those made to internal drive. – C.S.Cameron Feb 18 '21 at 11:09
-
@C.S.Cameron: That was never in any doubt. My warning was against using the same root filesystem for multiple machines with potentially different hardware and alternating between them. – HuHa Feb 18 '21 at 11:15
-
The USB I use on my Intel ComputeStick works just as well on my I7 workstation with Quadro graphics card and 24GB RAM. The main point is not to use proprietary drivers. (Nvidia drivers seem to know when there is no Nvidia card and in that case do not load). – C.S.Cameron Feb 18 '21 at 11:19
-
@C.S.Cameron I didn't know that Nvidia doesn't load the drivers when not neeeded, that's a very interesting feature fitting my needs for this setup. – rjscr Feb 18 '21 at 12:15
-
That worked for me with the proprietary Nvidia drivers, not sure about the Nouveau drivers, I recall having problems with them. Probably best to see if you actually need Nvidia drivers first. – C.S.Cameron Feb 18 '21 at 12:30
-
You may find this question interesting: https://askubuntu.com/questions/1060435/install-nvidia-drivers-full-install-usb-flash-drive – C.S.Cameron Feb 18 '21 at 12:45
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.
mkusb
to create my thumb-drive; it was actuallymkusb
I was testing... – guiverc Feb 17 '21 at 12:07