A small thing I learned just now that may help somebody:

I'm trying to rescue a machine that had been rudely interrupted in mid-upgrade. Normally I'd do this by booting off alternate media, mounting/chrooting into the drive and resuming work, but networking didn't work anymore but: only in the chrooted space. It worked fine outside it.

The answer is "/etc/resolv.conf might be stale". It's generated at boot, and was wrong in my chroot.

Editing /etc/resolv.conf (I used 1.1.1.1) fixed it.

Update: Welp. Once again, I find myself in a situation that is unsupported and untested, as I am watching apt absolutely lose its mind at the notion that /proc is unavailable.

@mhoye there's a set of two or 3 magic --bind mounts needed to work in the chroot. In pub or would be more helpful soz

@falken @mhoye

here's the set as I know them

sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

@falken @xlrobot Oh nice, thank you both. I'll give this a shot.

@mhoye @falken don't often praise Arch but when I do, it's because of

man.archlinux.org/man/arch-chr

packaged for Debian under `arch-install-scripts`

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.