NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sysinst: /bin/sh with new system disk still mounted?



Re-familiarizing myself with NetBSD sysinst for installing 10.0 x86...

My goal is to make a couple minor config changes to a newly-installed
system, prior to the final reboot. E.g. add serial console config and
an optional addition to sshd_config; these make my post-installation
setup easier.

After the system disk is partitioned and sets are installed, plus any
"Configure the additional items as needed" (network, Timezone, etc.),
sysinst has a couple options to run a shell, i.e. the "Utility menu"
with "Run /bin/sh", or simply "Exit Install System" before "Reboot",
which drops to a root shell prompt.

This is all good, but by that point sysinst has already unmounted the
newly-installed sysdisk and removed disk wedges etc. Leaving just the
installation media mounted.

After poking around and reading dkctl(8), I worked out the basics of
re-mounting the sysdisk / partition from sysinst's /bin/sh, e.g. 'dkctl
wd0 makewedges' and 'mount /dev/dkN /mnt', so I can tweak the config
files I'm interested in.

This works OK for me, but I'm wondering if other folks have better
ideas. I don't see an obvious sysinst menu option for this kind of
activity.

Alternatively, I imagine I could probably modify NetBSD installation
set(s) to include the changes I want, but I believe I prefer to handle
it with a (documented) procedure rather than maintaining customized
NetBSD installation images.

FWIW, long ago I didn't deal with this situation much, as the hardware
I was running NetBSD on could natively use serial console -- Sun, DEC,
and SGI. So I might do an initial post-install setup from serial console
and complete the configuration over network.

PC's aren't quite as nice for out-of-band access like that. :-)

Thanks,
sr.


Home | Main Index | Thread Index | Old Index