No network in chroot environment
Volker Wysk
post at volker-wysk.de
Fri Jan 24 18:38:33 UTC 2020
Am Freitag, den 24.01.2020, 13:28 -0500 schrieb Ken D'Ambrosio:
> On 2020-01-24 13:13, Volker Wysk wrote:
> > 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:
>
> Two things come to mind:
> * Is it possible you have duplicate IP addresses? You don't mention
> whether you're static or DHCP.
Should be DHCP. I haven't had the necessity to cope with that yet.
> * You should check and see if you can ping by IP address; it's not
> clear
> if you're failing networking, or just a host lookup.
You're right, I can ping by IP address.
And the "host" command in the chrooted shell fails, like to be
expected.
Bye,
Volker
>
> -Ken
>
> > 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