Kickstart support info
Marc MERLIN
marc at merlins.org
Tue Apr 12 10:02:58 CDT 2005
On Tue, Apr 12, 2005 at 12:38:08PM +0100, Colin Watson wrote:
> > I take it %post would be run before the reboot when all the software
> > is still missing, wouldn't it (not too good for me)?
>
> Right, %post is run at the end of the first stage. I couldn't see any
> other way to do it, as %post and %post --nochroot are meant to happen at
> the same time, and by the time the system reboots and installs remaining
> packages the installation root has gone away.
I figured. I'll need to run most of my post stuff after software has been
installed since I use post to install local software and fixup installed
packages.
I can work around that though by installing a trigger in /etc/rcS.d or
/etc/cron.d for instance
> There's a preseeding workaround, though; write a post-installation
> script into some executable file in /target, and set the location of
> that file (without "/target") as the value of base-config/late_command.
That would work too, thanks.
> I guess one option for the future might be to allow the second-stage
> package installation step to be optionally pulled back to the first
> stage. (I think the current behaviour's right for the default install
> mode, since you get to find out whether your system actually boots as
> early as possible.)
The current behaviour is fine for most installs. For automated though, one
can prefer a full install before the last reboot, at which time the system
is ready for use (at least, that's what I've been doing with RH kickstart)
Either way, not a huge deal for now.
> I agree (and always have, FWIW; I lost the argument about using tasksel
> in the Warty installer :-)). We'll be discussing this in Sydney as part
> of this BOF session:
>
> http://udu.wiki.ubuntu.com/UbuntuDownUnder/BOFs/UbuntuDevelopment/PackageSelection
I see :)
> At the moment, postfix is hardcoded in debootstrap, and ubuntu-base
> depends on it. It will probably be easiest to let that happen and then
> include exim4 in %packages, which will automatically remove postfix
> (and, unfortunately, ubuntu-base as well).
Gotcha.
> > - installer still stops and asks me hda or hdc when I have two drives.
> > Is --ondisk unsupported?
> > # Clear all partitions
> > clearpart --drives=hda,sda --initlabel
> > part / --fstype ext3 --ondisk=hda --size -1 --grow --maxsize=45000
> > part swap --fstype swap --ondisk=hda --size=1024
>
> These two problems are due to pre-existing annoying limitations in
> partman-auto, which can currently only deal with one disk. As a result,
> kickseed only lets you specify one disk in 'clearpart --drives', and
> doesn't support --ondisk. (It should spit out warnings to
> /var/log/syslog about either of the above constructions.)
I didn't know this was in syslog.
Makes me think that a nice ks/d-i extension would be to setup remote syslog
so that I can watch the logs realtime elsewhere as soon as the network comes
up on the installed machine, and in real time, which would be nice.
> Taking advantage of devfs-style paths and using 'clearpart
> --drives=discs/disc0/disc' may help here.
I'll try that.
> > - how do I get/see debug output for the installer outside of F4 or whatever
> > VT it was?
>
> VT4 is /var/log/syslog; VT3 also has a few useful things, and is
> /var/log/messages. The installation root has nc if you want to copy
> those to another system.
That'd work (pending remote syslog :)
> The quick answer is "look up the text of the question in
> /var/lib/cdebconf/templates.dat". The longer though possibly more
> elegant answer is to boot with the DEBCONF_DEBUG=5 argument, which will
> give you a trace of the debconf protocol in syslog.
Understood (along with the /var/lib/cdebconf/templates.dat answers)
> > - how do I tell d-i to install all my packages and reboot by itself without
> > prompting after running %post?
> > (right now, it first tells me it's done with the install and stops with
> > a prompt, then does stuff, then reboots, and then installs a lots of apt
> > packages :)
>
> Use the 'reboot' Kickstart command.
I had reboot in my ks file. I'll fix my other things that make the installer
drop of fully presed mode and see if I still have this problem.
> > - Can I safely use a chvt equivalent (works in the RH installer) when I want
> > my pre or post to output stuff on the screen?
>
> The installer doesn't have chvt or openvt or any equivalent that I can
> think of. It would be a simple matter of enabling them in busybox,
> though.
That'd be nice. RH has it and I found it useful for scripting an install and
outputting my stuff on another VT that doesn't conflict with the installer's
VT
> > - the installer has a bug where if I happen to be on VT2 typing stuff when
> > it outputs a screen (asking for partitions for instance): it then starts
> > outputting screens on VT2 but still takes answers on VT1
>
> Hmm. I do this often in non-automatic mode (editing stuff while the base
> system installation is running, usually), and haven't noticed any
> problems. I'll try again. Anything special about this system?
Not really :)
I'll send you my ks file and boot command line and info on how to reproduce
if you'd like to track it down.
> > I'd like a default root password, does:
> > rootpw --iscrypted "$1$Q3fKveE4$xxxxxxxxxxxxxxx" work?
>
> Yes.
Cool
> > How do I make the default user part of the install go away?
>
> A Kickstart extension, 'user --disabled' (which I now realise I
> neglected to document in the manual; added to my to-do list).
Nice :)
> > Aaah, so I could just touch /etc/X11/xorg.conf in %pre and fix it up later
> > in %post. That works for me :)
>
> Right, that general approach; although when %pre runs, /target hasn't
> been created or mounted yet (unless you're creating and mounting it
> yourself, I guess). However, since %post runs before the first reboot
> and xserver-xorg is installed in the second stage, you don't actually
> need to do anything in %pre; writing out the xorg.conf you want in %post
> would be fine.
Good points.
Thanks for all your help
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | Finger marc_f at merlins.org for PGP key
More information about the ubuntu-devel
mailing list