Score:4

How to make a portable Ubuntu server

jp flag

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?

Score:4
jp flag

Portable Ubuntu Server

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).

C.S.Cameron avatar
cn flag
I can't wait to give this a try.
sudodus avatar
jp flag
@C.S.Cameron, and I can't wait for your result :-P Maybe it needs polishing.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.