4

It can be useful to have an Ubuntu Server in an SSD connected via USB or in a fast USB pendrive and run it in different computers. The wired network system of Ubuntu Desktop and the community flavours works [without tweaks] in different computers, but the Ubuntu Server seems dedicated to the computer, where it was installed.

How can I make [at least the wired] network system of Ubuntu Server portable between computers?

sudodus
  • 46,324
  • 5
  • 88
  • 152

1 Answers1

4

Portable Ubuntu Server

Edit May 2023:

Use Ubuntu's own compressed image file

Ubuntu creates daily images for testing purposes. You can use these compressed image files with Ubuntu Server, because when extracted and cloned they are portable out of the box:

  • can be booted both in UEFI mode and BIOS mode and
  • works where the built-in linux drivers can manage the hardware

I would recommend that you use an image of a released LTS version (in May 2023: jammy preinstalled server image)

You find more details here.

End of Edit May 2023

Network

I applied the method by N0rbert to Ubuntu Server installed from the file

ubuntu-20.04.3-live-server-amd64.iso

The following method makes the installed server's network portable between computers. I installed it in a Toshiba laptop and tested it in a Dell Latitude E7240 and a Lenovo V130.

The main difference compared to the method by N0rbert is that the package network-manager must be installed (before tampering with the network system).

sudo apt install network-manager

Restore Network Manager renderer:

cat <<EOF | sudo tee /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
EOF

Apply netplan configuration with:

sudo netplan apply

Restart NetworkManager

sudo service network-manager restart
sudo service NetworkManager restart

I ran also the following command to restore contents of /etc/network/interfaces (without checking if it was necessary)

cat <<EOF | sudo tee /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
EOF

More details in order to make the installation portable

Custom Portable Ubuntu system

This method can also be used to create a custom portable Ubuntu system, not only a server, but also a custom desktop system for example with a simple window manager (like fluxbox).

sudodus
  • 46,324
  • 5
  • 88
  • 152