Re: what files does dselect/dpkg use to discern choices?

1996-08-13 Thread Craig Sanders

On Tue, 6 Aug 1996, David C Winters wrote:

 I've got approximately 50 machines I need to build. My best option
 for the initial system build, unless I've missed something, would be
 to run deselect on one machine, then take a deselect-generated file
 containing my selections and exporting that file to all the other
 machines, so I can just start up dselect and choose Install without
 having to go through Select on each.

 How can I accomplish this? Which file(s) do I need to export in order
 to make this happen? And, is there a better way to achieve the same
 results?

I need to do something similar.i asked Ian Jackson (dpkg's author) about
it but he seems quite disinterested in the idea.

Anyway, what you need to do is:

(WARNING: The following steps should work, but i haven't tested this
process yet.)

1.  mirror the debian archive, and export it with nfs. NFS installation
from an up-to-date mirror is the easiest and quickest way of
installing debian. 

2. install the base system on one of the machines as normal: 

  - by floppy (boot,root, base1, base2, base3)
or
  - by creating a new boot floppy with NFS support. Switch to the
2nd virtual console and and mount a directory containing the
base_1.1.tgz file (which can be found under either rex or buzz in
disks-i386/current/).  

The debian install disks will install from that file rather
than the 3 base disks if it finds it in either the mount point or
any first level subdirectory (if you mount it as /debian, then it
will look in /debian/base_1.1.tgz or /debian/*/base_1.1.tgz).

It's probably simplest just to NFS mount your mirror
as /debian, and make sure there is a symlink from
{rex,buzz}/disks-i386/current/base_1.1.tgz to /debian/base_1.1.tgz

3.  configure the machine.

4.  now reboot. dselect will stary up automatically. select  install all
required packages.

5.  take a copy of the file /var/lib/dpkg/status.

cp /var/lib/dpkg/status /tmp

6.  now this is where it gets tricky.
for every package listed in the status file, there will be a Status:
line.  You need to change every line which contains Status: install
. so that it reads Status: install ok not-installed.

the following sed script is a good starting point for doing this
automatically.

sed -e 's/^Status: install..*/Status: install ok not-installed/' 
/tmp/stats /tmp/status.new

7.  now try installing another machine using this file.

8.  install the base system as in step 2 above.  configure it as in step 3.

9.  quit out of dselect.

10. copy the status.new file you created in step 6 to /var/lib/dpkg/status
on the new machine.  It might be convenient to use the top directory
of your mirror as a temporary transfer drive.  just NFS mount the
mirror as /debian and cp /debian/status.new /var/lib/dpkg/status.

keep a copy somewhere else, though. remember that mirror will
delete this file next time it runs because it doesn't exist on the
remote archive site. or configure mirror to not delete status.new.

11. run dselect.  tell it where to find the packages with 0. [A]ccess.  Then
1. [U]pdate packages information.

12. now run 3. [I]nstall.  It should install all the files which were
selected on the other machine.


note, it's possible to do something like this with a debian cdrom rather
than NFS. the base_1.1.tgz file was created to make cd-rom installations
as well as NFS installations easier. 

Reminds me, i should send some email to the archive maintainer (Guy
Maor, I think) asking him to include a symlink to base_1.1.tgz in rex/
or buzz/ so that the install disks can find it. And also some email to
Bruce Perens asking him to compile NFS into the kernel of the boot disk
- there's been some problems with symbol version mismatches for the NFS
module on the last few boot disks.


Craig



Re: what files does dselect/dpkg use to discern choices?

1996-08-13 Thread Warwick HARVEY
Craig Sanders [EMAIL PROTECTED] writes:
 I need to do something similar.i asked Ian Jackson (dpkg's author) about
 it but he seems quite disinterested in the idea.

Mmm, no I think he's just got plenty of other things to worry about at the
moment.  He seemed to give you the information you needed to try getting
this to work - but of course if you want any support for this in dpkg you'll
have to do it yourself.  :-)

 5.  take a copy of the file /var/lib/dpkg/status.
 
 cp /var/lib/dpkg/status /tmp
 
 6.  now this is where it gets tricky.
 for every package listed in the status file, there will be a Status:
 line.  You need to change every line which contains Status: install
 . so that it reads Status: install ok not-installed.
 
 the following sed script is a good starting point for doing this
 automatically.
 
 sed -e 's/^Status: install..*/Status: install ok not-installed/' 
 /tmp/stats /tmp/status.new

Mmm, why should they all be not-installed?  Won't some of them be
installed by the base system on the new machine?  I don't know what will
happen if you tell dpkg that something that's already installed now isn't -
e.g. what will happen with all its files, etc.?  Shouldn't be too hard to
write a slightly more sophisticated script that just alters the relevant
desired state (first) fields of the new status file.

Anyway, if you give this a try, I'd be interested to know how it goes.  I'd
be interested in giving it a try myself sometime, but time, time...  :-)

Warwick


Warwick Harveyemail: [EMAIL PROTECTED]
Department of Computer Sciencephone: +61-3-9287-9171
University of Melbourne fax: +61-3-9348-1184
Parkville, Victoria, AUSTRALIA 3052 web: http://www.cs.mu.OZ.AU/~warwick



Re: what files does dselect/dpkg use to discern choices?

1996-08-08 Thread Dale Scheetz
On Tue, 6 Aug 1996, David C Winters wrote:

 
   Now, to explain the question, since I can't understand the 
 Subject: line and I wrote it myself...
 
   I've got approximately 50 machines I need to build.  My best 
 option for the initial system build, unless I've missed something, would 
 be to run deselect on one machine, then take a deselect-generated file 
 containing my selections and exporting that file to all the other 
 machines, so I can just start up dselect and choose Install without 
 having to go through Select on each.
   How can I accomplish this?  Which file(s) do I need to export in 
 order to make this happen?  And, is there a better way to achieve the 
 same results?
 
I would suggest you look at UpGrade and base_list in the upgrades
directory. The script was written to upgrade the base section, but is
general in nature and will run on any list you make. If you start with the
base system list, you can add the other packages you wish to upgrade. It
is your responsibility to deal with depends (that is, packages that
another package depends on must appear in the list first), but once you
have a list that works, you only need to copy the script and the list to
the other machines you wish to upgrade and run it. Since the script checks
to see whether the package on the list has already been upgraded, you can
continue to use the list, into the indefinate future, to do incremental
upgrades as new versions of packages become available, or you can wait
till the next release and use your old list. Any packages you wish to add
to your installation just goes into the list in the proper place to obtain
all it's dependancy needs.

Check it out and let me know if it will work for you,

Dwarf

  --

aka   Dale Scheetz   Phone:   1 (904) 877-0257
  Flexible Software  Fax: NONE 
  Black Creek Critters   e-mail:  [EMAIL PROTECTED]

 If you don't see what you want, just ask --



Re: what files does dselect/dpkg use to discern choices?

1996-08-07 Thread Kevin M Bealer
On Tue, 6 Aug 1996, David C Winters wrote:

 
   Now, to explain the question, since I can't understand the 
 Subject: line and I wrote it myself...
 
   I've got approximately 50 machines I need to build.  My best 
 option for the initial system build, unless I've missed something, would 
 be to run deselect on one machine, then take a deselect-generated file 
 containing my selections and exporting that file to all the other 
 machines, so I can just start up dselect and choose Install without 
 having to go through Select on each.
   How can I accomplish this?  Which file(s) do I need to export in 
 order to make this happen?  And, is there a better way to achieve the 
 same results?
 
   Now, a meta-issue.  I've been extremely pleased with the Debian 
 distribution, as well as the support I've received from this list.  
 Thanks, all!  
 
 
 David [EMAIL PROTECTED] aka [EMAIL PROTECTED]
 Office: 3503 WeH, x86720

I don't think you can do much in terms of recording input to
dselect.  I would look at something like a tape-backup
technology, or using a null modem to transfer the data.  (I
assume if you have 50 machines you have more advanced networking
than a null modem).  

If you recompile the kernel, there is an option for Root
filesystem on NFS.  If you could get an NFS on one drive to
export, you could boot all the machines with NFS and then copy
stuff en mass from machine to machine.

I'm not sure how to actually send the data, but you could use
something like afio to packages the filesystem up and send it
through the NFS.

A neat idea: look into dbackup... (but it isn't done yet, AFAIK)

[EMAIL PROTECTED]/GNU__1.1___Linux__2.0.11___
We believe that man is essentially good.  It's only his behavior
that lets him down.  This is the fault of society.  Society is
the fault of conditions.  Conditions are the fault of society.
-- Steve Turner, Creed




Re: what files does dselect/dpkg use to discern choices?

1996-08-07 Thread Kevin M Bealer
On Tue, 6 Aug 1996, David C Winters wrote:

 
   Now, to explain the question, since I can't understand the 
 Subject: line and I wrote it myself...
 
   I've got approximately 50 machines I need to build.  My best 
 option for the initial system build, unless I've missed something, would 
 be to run deselect on one machine, then take a deselect-generated file 
 containing my selections and exporting that file to all the other 
 machines, so I can just start up dselect and choose Install without 
 having to go through Select on each.
   How can I accomplish this?  Which file(s) do I need to export in 
 order to make this happen?  And, is there a better way to achieve the 
 same results?
 
   Now, a meta-issue.  I've been extremely pleased with the Debian 
 distribution, as well as the support I've received from this list.  
 Thanks, all!  
 
 
 David [EMAIL PROTECTED] aka [EMAIL PROTECTED]
 Office: 3503 WeH, x86720

Let me suggest (in addition to my last suggestion) the use of
afio (or cpio) with the utility called netcat.

Send the compressed volume through a pipe to netcat, and do the
opposite on the other end.

nc just acts as a pipe between two systems.

Note that afio may do bad things if it overwrites running
programs, so look out for that. -- you may want to create a 15
MB or so partition on each machine to run Debian until you get
it set up minimally (base system + some networking).

When you are done, you can use the bootstrapping partition as an
emergency repair system, or just add it on as more swap space.


[EMAIL PROTECTED]/GNU__1.1___Linux__2.0.11___
We believe that man is essentially good.  It's only his behavior
that lets him down.  This is the fault of society.  Society is
the fault of conditions.  Conditions are the fault of society.
-- Steve Turner, Creed



what files does dselect/dpkg use to discern choices?

1996-08-06 Thread David C Winters

Now, to explain the question, since I can't understand the 
Subject: line and I wrote it myself...

I've got approximately 50 machines I need to build.  My best 
option for the initial system build, unless I've missed something, would 
be to run deselect on one machine, then take a deselect-generated file 
containing my selections and exporting that file to all the other 
machines, so I can just start up dselect and choose Install without 
having to go through Select on each.
How can I accomplish this?  Which file(s) do I need to export in 
order to make this happen?  And, is there a better way to achieve the 
same results?

Now, a meta-issue.  I've been extremely pleased with the Debian 
distribution, as well as the support I've received from this list.  
Thanks, all!  


David [EMAIL PROTECTED] aka [EMAIL PROTECTED]
Office: 3503 WeH, x86720