0

Say I'm running an experimental/unstable linux distro day-to-day, but want a stable fallback in case things break (e.g. Arch on one partition, Debian on a second, data on a third).

Is there a way to ensure that the stable distro is updated while booted into the unstable one? So that when I boot into the stable distro after months away it doesn't have a huge number of updates to run at once.

Samizdis
  • 249

1 Answers1

1

So TJJ's comment gives the key: use chroot, then run apt-get or whatever. There are a few devilish details though:

1) PATH needs to be set correctly. export PATH=$PATH:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin gets Ubuntu's apt-get to work correctly.

2) Ubuntu has a fancy resolv.conf alternative, which breaks. Prompted by this askubuntu answer: backup /etc/resolv.conf using cp -av /etc/resolv.conf{,.bak} (since it's a symlink), replace it with a one-line resolv.conf (rm /etc/resolv.conf ; echo 'nameserver 91.239.100.100 #blog.uncensoreddns.org' > /etc/resolv.conf), and restore it afterwards (cp -av /etc/resolv.conf{.bak,})

3) apt-get warns that /dev/pts is broken, but this doesn't seem to cause a problem.

I haven't come across any of the kernel issues that TJJ mentions, but YMMV I guess.

Samizdis
  • 249