Kickstart support info

Marc MERLIN marc at merlins.org
Mon Apr 11 17:46:59 CDT 2005


On Mon, Apr 11, 2005 at 10:57:59PM +0100, Colin Watson wrote:
> %pre worked fine in Array CD 6, as far as I know, so I don't know what
> that comment was about. %post in the chroot was broken, and %packages
> sort of worked although it didn't support groups yet.

%pre seems to work fine
%post seems to be problematic since the CD install reboots and installs
most of the debs after the reboot.
I take it %post would work be run before the reboot when all the software
is still missing, wouldn't it (not too good for me)?

> > Can I use %packages too?
> 
> Yes. The only package groups you can use are "Ubuntu Desktop" (or
> "ubuntu-desktop") and "Kubuntu Desktop" (or "kubuntu-desktop"),
> depending on your installation source.

I indeed found out those seemed to be the only two ubuntu task packages,
thanks for confirming.
As general feedback, ubuntu should have more tasks like RH does. At least
one task should have sshd installed by default, along with all the regular
server stuff.

For that matter, for stuff like postfix (not an ubuntu-desktop dependency),
if I want exim4 by default do I have to let the installer put it, and then
remove it myself and put exim or is there a way to seed negative packages
compared to the default install?

> > As long as I can work around it, it's a whole lot better than nothing :)
> > I do realize that it's hard to get right, even RH doesn't have it working
> > perfectly after 5-6 years of having come up with kickstart.
> 
> Let me know about problems; I'm interested in how things work out in
> practice.
 
Well, here's my current list:

- ks will not default to the first hda/sda/whatever drive like RH.
  In other words, this doesn't work:
  # Clear all partitions
  clearpart --drives=hda,sda --initlabel 
  part /	--fstype ext3 --size -1 --grow --maxsize=45000
  part swap	--fstype swap --size=1024

- 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

- how do I get/see debug output for the installer outside of F4 or whatever
  VT it was? 

- More generally, how do I tell the name of the d-i question I need to
  preseed with an answer after the installer hangs on it? (and how do I get
  the list of valid preseed 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 :)

- 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 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

- I don't want the default user (which I get prompted for and can't seem
  to preseed in kickstart, I probably need d-i for that too). I use other
  auth methods, so I have no local users except root.
  I'd like a default root password so that I can log into the system if the
  install and alternate auth does not install properly. Does:
  rootpw --iscrypted "$1$Q3fKveE4$xxxxxxxxxxxxxxx"
  work?
  How do I make the default user part of the install go away?

> I don't expect that you'll be able to do this part with pure Kickstart.
> Something like this in a preseed file might work:
> 
>   d-i partman-auto/init_automatically_partition select Manually edit partition table
>   d-i partman-auto/choose_partition string Finish partitioning and write changes to disk
>   d-i partman/confirm boolean true
> 
> (totally untested, though)
 
I'll try that when I get there, I have other problems right now :)
I'm not quite at the "put CD/floppy in, boot, wait for it to be ejected
and the install continues/finishes, the machine reboots by itself and is
ready for use" stage quite yet :)

But with your other suggestion:
  db_set preseed/file /tmp/my-preseed-file                                      
  apt-install file-preseed  
or
  debconf-set-selections directly | db_register/db_set/db_fset

I should be able to take care of the remaining problems once I know the
keys and answers :)
 
> > Actually, is there a generic way to preseed a question disable: can I tell
> > xorg: don't generate config file?
> 
> No generic way, since packages generally don't ask debconf questions of
> the form "may I set this package up so that it actually works". :-) I
> don't think xserver-xorg will overwrite an existing customised
> /etc/X11/xorg.conf, though.
 
Aaah, so I could just touch /etc/X11/xorg.conf in %pre and fix it up later
in %post. That works for me :)
 
> > Eventually, some examples of kickstart files that are ok, info on using
> > kickstart+preseed and what overrides what,
> 
> Preseeding comes second, so it always overrides Kickstart.

Thanks.

> > and so forth would be useful, but I'll see if I can contribute example
> > files to you after I sort this out (if you don't have any yourself)
> 
> That would be good, thanks. All I have so far are my own test files
> (which aren't real-world, and are more test cases for particular pieces
> of code I was developing) or files kindly sent to me by Red Hat users
> (which will need customisation before they'll work on Ubuntu, and so
> don't make good examples).

Well, hopefully, I'll be giving you plenty of feedback :)

Best,
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