No network in chroot environment

Volker Wysk post at volker-wysk.de
Fri Jan 24 18:13:23 UTC 2020


Hi

I'm migrating my old system to a new SSD in a new computer, and come to
the point to set up the new root file system in a chroot:

cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt
mount /dev/mapper/nvme0n1p3_crypt /mnt/rootneu
mount --rbind /dev /mnt/rootneu/dev
mount --rbind /proc /mnt/rootneu/proc
mount --rbind /sys /mnt/rootneu/sys
mount /dev/nvme0n1p2 /mnt/rootneu/boot
mount /dev/nvme0n1p1 /mnt/rootneu/boot/efi
chroot /mnt/rootneu

This works, but the network in the chroot-ed environment isn't
available:

Wartung1804 / % LANG=C ping heise.de
ping: heise.de: Name or service not known

In the original system, it's fine:
v at Wartung1804:~$ LANG=C ping heise.de
PING heise.de(redirector.heise.de (2a02:2e0:3fe:1001:302::)) 56 data
bytes
64 bytes from redirector.heise.de (2a02:2e0:3fe:1001:302::): icmp_seq=1
ttl=57 time=15.0 ms
...

So what happened to the network..? Might the "mount --rbind ..."
commands be incomplete?

Thanks for any help!

Volker





More information about the ubuntu-users mailing list