Re-runnability of operations modifying ram rootfs
Please CC me on replies, as I am not on this list.
To what extent is it a goal to make the installation steps
rerunnable?
I have noted while testing the woody boot floppies that some
steps that intuitively one would not think need repeating
actually do. Namely, the install OS & drivers step. Since
boot-floppies/scripts/drivers/install.sh creates five symlinks
in the ramfs, it makes it necessary to reinstall the drivers
if the install is interrupted for any reason and restarted
from the beginning. As a naive user, I expected that all that
installing the OS & drivers did was to populate /target. Not
so. When I examined the drivers script, I found this:
test -f /bin/sed || ln -sf `pwd`/bin/sed /bin/sed
test -f /usr/bin/whiptail || ln -sf `pwd`/usr/bin/whiptail /usr/bin/whiptail
if [ -e ${FLOPPY}/pcmcia.tgz ]; then
zcat ${FLOPPY}/pcmcia.tgz | tar -x
ln -sf `pwd`/sbin/ifport /sbin/ifport
ln -sf `pwd`/sbin/ifuser /sbin/ifuser
ln -sf `pwd`/sbin/cardmgr /sbin/cardmgr
fi
So if I start the install, encounter a problem, then restart
it, I know I need to:
- reset the keyboard map
- turn swap back on
- remount the root partition
- reset the host name
- reconfigure PCMCIA
- reconfigure the network ...
But in the last couple of steps, I start getting errors (logged on vt3)
because, for instance, cardmgr isn't found. The problem here is I never
expected I'd have to repeat the (lengthy) reinstall of the rescue and
drivers disks upon restarting the install. I figured they were there
on my hdd already, so I needn't bother doing it over again.
What if these symlinks were saved as they were performed via a small
helper script:
save ln -sf `pwd`/sbin/ifport /sbin/ifport
etc.
'save' would perform the command immediately but also append the
command to /target/tmp/save.sh
Then, in the event that the install is interrupted and restarted from
the beginning, upon remounting /target, /target/tmp/save.sh could be
executed to redo these saved steps.
Each step written to save.sh should be idempotent. If someone
installs the drivers multiple times, it should not matter that
multiple ln -sf's are appended to save.sh.
If something like this is not done, at the very least the user should
be notified that they need to rerun a step before they can proceed.
As it is, the user is left in the dark.
Ben
--
nSLUG http://www.nslug.ns.ca synrg@sanctuary.nslug.ns.ca
Debian http://www.debian.org synrg@debian.org
[ pgp key fingerprint = 7F DA 09 4B BA 2C 0D E0 1B B1 31 ED C6 A9 39 4F ]
[ gpg key fingerprint = 395C F3A4 35D3 D247 1387 2D9E 5A94 F3CA 0B27 13C8 ]
Reply to: