Score:0

Can't transport Ubuntu to another machine - fails dhcp connection

bi flag

I have an application running under Ubuntu 18.04 server which I've always been able to clone and move to another machine. When I create a 20.04 drive, I can move it to another machine with the same motherboard and it runs fine, but if I try a different motherboard, same manufacturer (ASRock), it will not pickup an IP address. My /etc/network/ directory is:

/etc/network$ ls -l
total 12
-rw-r--r-- 1 root root  245 Aug 11 14:40 dlc.yaml
drwxr-xr-x 2 root root 4096 Aug 31  2022 if-pre-up.d
drwxr-xr-x 2 root root 4096 Aug 31  2022 if-up.d

I know the .yaml file in /etc/netplan/ defines the interface 18.04 and beyond:

/etc/netplan$ cat 00-installer-config.yaml

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      dhcp4: true
  version: 2

when working on the original installed system "ip a" is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether a8:a1:59:d6:5f:2e brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.116/24 brd 192.168.0.255 scope global dynamic eno1
       valid_lft 6555sec preferred_lft 6555sec
    inet6 fe80::aaa1:59ff:fed6:5f2e/64 scope link
       valid_lft forever preferred_lft forever

When I move it to another motherboard "ip a" is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp6s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether a8:a1:59:a4:f4:f6 brd ff:ff:ff:ff:ff:ff

looking to have the system be able to pick up a dhcp IP address from a different box. The application running under the OS operates fine.

ru flag
You did change `eno1` to `enp6s0` in your netplan config right? Because otherwise it will say "OK, so I am configuring eno1 but it doesn't exist so nothing to do here!" if you don't update the ethernet interfaces in netplan
SES-Energy avatar
bi flag
I didn't edit netplan config, the .yaml file or change eno1 to enp6s0. I just moved the drive from one machine to another and when it booted in the original it was eno1. When I booted in another machine it was enp6s0.
ru flag
That was your flaw. **You have to adjust your configuration for every machine it's installed on to properly match the target system.** OTHERWISE you will never *get* a configured Internet connection on your system. This is a limitation of Netplan based configurations, but is something you must do if you're going to use one drive on more than one system.
SES-Energy avatar
bi flag
If I run "dhclient" on the new system from the command line, it will pickup the IP address.
I sit in a Tesla and translated this thread with Ai:

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.