Preliminary rescue mode implementation
I've checked in packages/rescue/, which is a very preliminary rescue
mode implementation for d-i. Include rescue-check in your initrd and
boot with the 'rescue/enable=true' argument to enable it. Instead of
running partman, d-i will then ask you for a device name (boot with
'rescue/root=<device>' to suppress the question), mount that on /target,
give you a shell chrooted into /target, and reboot after you exit that
It's a little quirky as rescue modes go: rather than dropping you
straight into a chrooted shell, it runs the first half of d-i (language,
country, keyboard, hardware detection, udeb retrieval) beforehand. I
consider this an advantage, because we can use the existing modular
kernel rather than having to build one with all the filesystem modules
in it or trust that the modules in the filesystem you chroot to are
compatible with the kernel on the CD, and we don't even have to generate
a separate rescue.bin (imagine doing that for powerpc/power3/power4).
It's very small:
-rw-r--r-- 1 cjwatson cjwatson 856 2004-11-27 14:42 rescue-check_0.1_all.udeb
-rw-r--r-- 1 cjwatson cjwatson 2182 2004-11-27 14:42 rescue-mode_0.1_all.udeb
Things rescue-mode really should do, and probably could do, but doesn't:
* accept non-devfs paths for rescue/root;
* avoid running choose-mirror in monolithic images (it needs to run it
in netboot images in order to retrieve filesystem modules, etc.);
* it might be nice if it asked slightly fewer questions, either by
preseeding or by running at critical priority or something.
I anticipate that we'd eventually want to include 'rescue' options in CD
bootloader configurations which add the rescue/enable=true argument.
In order to use this, you must have the unreleased cdebconf-udeb 0.73
from SVN trunk, which exports DEBCONF_OLD_FD_BASE through the shell
confmodule (and has a few other changes). I don't particularly expect
this to make it into sarge, so this shouldn't be a problem.
Any comments? It works for me ...
Colin Watson [email@example.com]