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

Re: diskles-image-*


Please check to To and Cc fields before replying.  Not sure if
debian-testing is appropriate for this message.

I have changed the subject from diskless-image-secure, as the same
problems will also occur with diskless-image-simple, too.

I was about to release diskless 0.3.4, but will delay it until I can
fix this problem.

>>>>> "Marcin" == Marcin Kurc <siemce@linux.indtech.edu> writes:

Hello All,

Marcin has demonstrated a problem with my package that I had "Swept
under the rug" and hoped would not occur. As it is a problem with no
easy solution (as far as I can tell), I am cross posting this message
to debian-devel.

First a bit of background:

My diskless package aims to work for any Debian version, past and
future (although past versions may have problems with NFS, hence this
is not recommended).

This is done, by the base image that comes with Debian, eg
base2_1.tgz. My scripts will automatically uncompress this image and
attempt to configure it into a bootable system.

However, now that boot disks for potato have been produced, I guess
they have introduced incompatibilities since the last version. I am
not sure how to fix these without making my package specific to potato
(although that would be better then the current situation where it is
specific to slink).

In designing my postinst script, I had to do all tasks that are
required in order to make the NFS-image bootable, that aren't done by
the image itself.

For slink, this was (simplified, comments removed):

if [ -f /sbin/unconfigured.sh ]; then
   /var/lib/dpkg/info/timezones.postinst configure
   #create /etc/init.d/network file that configures localhost
   chmod 755 /etc/init.d/network
   chmod go+w /tmp /var/tmp
   cd /dev; /dev/MAKEDEV generic
   rm /sbin/unconfigured.sh

(also, my configuration utility creates/overwrites:
/etc/fstab /etc/resolv.conf /etc/hostname - sometime if/when
I get a chance I hope to replace this bit with calls to debconf)

_All_ of this is an ugly hack. However, every step is required (at
least for slink), as the base2_1.tgz wasn't intended to be a complete
bootable system. Perhaps I am wrong, and none of the above needs to be
done for potato (I haven't had a chance to check yet).

Now, for the problems...

    Marcin> It looks like diskless-image-secure_0.3.3.deb is looking
    Marcin> for /var/lib/dpkg/info/timezones.postinst, which doesn't
    Marcin> exist in potato.  I've noticed that diskless-newimage is
    Marcin> using base2_1.tgz, but if I rename base2_2.tgz to
    Marcin> base2_1.tgz it works.  Shouldn't it use base2_2?

The base2_2.tgz file should be easy to fix, I am not sure
what the significance of the numbers mean, but I can just
check for any files that match base*.tgz (for instance).

However, the other problems are more difficult...

I would rather not have to do things like:

if potato; then
   do potato stuff
elsif slink; then
   do slink stuff

...as this is messy and version specific. 

The only real solution I can think of is to have a file
on the base2_2.tgz that does configuration automatically.
So then my script would look like:

if [ -f /sbin/configure-image ]; then
   rm /sbin/configure-image

Which would mean that all the messy, version specific code, is where
it belongs, within the base image. The same script, could be used when
installing from the boot disk, too. However, this affects packages
outside my own, so I thought I should post here to get the opinion of
other developers.

Any ideas? What should I do?

If no one replies to this, then I guess I will have to hack out a
solution that is specific to potato. :-(

Brian May <bam@debian.org>

Reply to: