installer

Michal Moskal malekith w pld.org.pl
Sob, 30 Gru 2000, 11:32:40 CET


Hello,

I've got a New Year's gift for you: 'Prowizorka mk ]['.  It's on level
of about Slackware installer or higher, so OK for most of middle-advanced
user. I would even say, that after some minor fixes, it will be possible
to install PLD with just few Enter presses.

So what is it? A bunch of shell scripts. While C is more flexible,
it's much easier to write installer in sh. Well I could also do
system("fdisk -l | awk ...")  but that's not the point. Also I think
that amount of ppl in PLD-team who can write/change/fix shell scripts
is several times greater then ppl with enough expirence with C.

Using shell also means that I didn't use most of CVS installer module.
Sorry. With one exception: wuch.

In this context I have a question to PawelK: is wuch able to handle
installation from scratch?  Also you can check if it's called correctly.
What about installation profiles? Telling the truth I wasn't able to
compile wuch and check this for myself, since I don't have means
to transfer these few megs (rpm, glibc, etc) of packges to my
home box, but this will change soon.

How does it look? It uses dml - dialog markup language, dialog command
on steroids ;) dml is still in alpha stage, man page is however already
written. it's way of making text mode windows from shell in
way similar to html forms, just few widgets are supported at the moment,
but I found it being enough for installer. Since dml has somewhat bigger
possibilites then dialog, installer looks better then the one from
Slackware. If one didn't know it's written in shell, he wouldn't notice.
There is also one very important thing about dml: it has some
kind of NLS. It's not GNU gettext however. You surround string like
this {{some example}} and it's changed with assitance of translation
file, and since all output is done through dml, entire installer
could be easly internalized. For now it is English. Could anybody
translate it to Polish? I'm still not sure whatever `shell' is
`shell' or `powłoka', `file' is `plik' or `zbiór', and how the hell is
`Primary Master' in Polish.

What can it do? 

 - Call (c)fdisk on choosen device. I think this would be the hardest
   thing to do for beginner ... some explanation, on how to do this
   should be possibly displayed
 - make filesystems - it scans disks for partions of Linux type,
   you can then set mount point for it, select filesystem (ext2/reiser 
   at the moment), set options for it (blocksize, label, hash etc)
   fstab is generated.
 - it should be able to configure kernel modules. i'm going to fetch
   this from prowizorka, I should commit this on Janruary 3rd.
 - it displays dialog for network, iproute2 wizard needed here, or
   rc-scripts will be available on install disk?
 - then you can choose source of installation, cdroms could be scaned,
   you can choose partition/nfs to mount, also you can select ftp
   server. Is list of mirrors on www.pld.org.pl actual? It (list) should
   be placed in installer, with places and bitrates. Source.conf
   for wuch is generated, as are scripts for (u)mount installtion
   media
 - then wuch should be run
 - after this you can configure lilo (grub wizard needed) in most 
   cases default is ok, but it can be easliy changed. it detects
   our root partition, bsd and dos partions.
 - set up the hostname
 - set up the timezone (and tell if GMT), mktimezone script is
   included, which makes script from /usr/share/zoneinfo,
   such gziped script should be placed on installtion disk.
   maybe making this on the fly would be better? anyway
   this (generated) script has only 4 or 5k.
 - then configuration is written to partitions, 
   /etc/sysconfig/{clock,timezone,network}, /etc/fstab is affected.
 - and reboot the machine.

Also user is given few possibilites like shell, mounting and umounting
dest partition and so on.

I'm by no means shell wizard. This code is somewhat dirty, it needs 
cleanups. Beside awk it uses sed and grep, which should not take
place, but I don't know awk well, I would write this in perl, but
I guess it's not possible ;)

Some configuration is not written, like configured network interface,
used language or keyboard. I'm still not sure if it's good idea to
save this...

At the moment installer shouldn't do anything harmful to your system,
since $dry=yes, so it only displays what is it about to do.
It has to be run permissions enough to run fdisk -l.

And one more: I put it into CVS module `prowizorka2'. I'm not sure
if it's right name though...

greetings....


-- 

                             Michał Moskal <malekith w pld.org.pl>

5191204625270805457964695575480234779108160500582132743089099204
5387169364764370076473597425941183680741973762154745366983057996
3022327445184252093714797111892347913483105724113222069964409702
905357106994771308266205



Więcej informacji o liście dyskusyjnej pld-devel-pl