Re: [Unattended] Starter Question

2004-02-28 Thread Ryan Nowakowski
On Sat, Feb 28, 2004 at 08:16:53AM -0800, raman singh wrote:
> Question:
> 1. I have to install Linux (Redhat) on some systems and MS OS (all win 98 - Win2k3) 
> on some. I know before hand which system should have what OS. 

Unattended only handles Win2k, WinXP, and Win2003 right now.  With
Win98, you'll have to come up with something else.  However, the latest
release candidate for Unattended v4 uses a Linux boot disk which you can
probably customize to install either Windows or Redhat.

> 2. DO I have any control on pushing an OS on a particular systems? Say, it was 
> running RH9, now I want Win2k, can I do that? 

It's easy to totally wipe a system and install Win2k, however there's
some human interaction needed at the console at the beginning.  It
sounds like you're looking for a push-based mechanism for installing
operating systems.  Unattended is a pull-based system.

> 3. Can I control somehow, that when the system reboot, it does not do a reinstall? 

Yes, unless the guy at the keyboard types "inst" at the boot prompt,
after 30 secs the system will boot from the hard drive normally.


signature.asc
Description: Digital signature


[Unattended] Starter Question

2004-02-28 Thread raman singh

Hi all,
 
I have some basic questions to answer before I start digging unattended Pxe install issues. I have read all the documentation related to unattended/Sysliux/Pxelinux and Microsoft RIS. Now I have the following  questions:
 
I have a network of around 50 similar architecture Intel P3 bases systems with around 4 GB of HDD and PXE (Version 2.2 - I am not sure on this) network Card. I have to manager all the systems remotely. 
 
Question:
1. I have to install Linux (Redhat) on some systems and MS OS (all win 98 - Win2k3) on some. I know before hand which system should have what OS. 
2. DO I have any control on pushing an OS on a particular systems? Say, it was running RH9, now I want Win2k, can I do that? 
3. Can I control somehow, that when the system reboot, it does not do a reinstall? 
 
These are some of the issues I could not understand clearly after going through the docs. I am also trying to setup the Unattended server so to say, to try out my self. But any help suggestion will be highly appreciated. I will save lot of my time.
 
Thanks
 
Raman Singh
 
Do you Yahoo!?
Get better spam protection with Yahoo! Mail

Re: [Unattended] Product Keys from Spreadsheet

2004-02-28 Thread Patrick J. LoPresti
"Aron Mangano" <[EMAIL PROTECTED]> writes:

> Firstly, what has happended to the mailing list. I used to receive
> emails regulary but I haven't received one now for more than 2
> months. I used to receive them almost daily.

Well, you successfully sent this message to the list :-).

Perhaps mail to you was bouncing and you got unsubscribed?  Try using
the Web interface (linked from the home page
http://unattended.sourceforge.net/) to retrieve your subscription
preferences, and resubscribe if necessary.

> Secondly you mentioned once that it is possible to extract the
> correct product key from a spreadsheet when building OEM machines.
> Could you please tell me how to do this. It would be greatly
> appreciated. Many thanks and keep up the great work.

You have to write some Perl.  Below is (most of) the Z:\site\config.pl
that I use.

It assumes you have comma-separated-value (CSV) spreadsheets named
"hardware.csv" and "software.csv" under Z:\lib.  It assumes both are
indexed by an asset tag field named "Tag".  Our asset tags are of the
form "" or "e" (don't ask).

The hardware.csv sheet is only used for setting the host name, which
lives in the "Etc" column of the spreadsheet.

Each software asset has an "Owner" field which is a hardware asset
tag.  (Conceptually, each software license is "owned" by a machine.)
It has a "Type" field which is something like "Microsoft Windows 2000
Professionsal".  It has a "Key" field which is the license key.

When I say "field", I guess I mean "column".

I really should document this better and turn it into a real
example...  If anybody feels like writing this up and submitting a
patch to advanced.html, let me know.

 - Pat


use warnings;
use strict;
use Carp;

# Look up an entry in a hash, bombing out if it does not exist.
sub hash_ref ($$) {
my ($hash, $key) = @_;

my $type = ref $hash;
$type eq 'HASH'
or croak "You blew it: What should be a hash is a $type";

(exists $hash->{$key})
or croak "$key not found in hash -- bailing out";
return $hash->{$key};
}

# Asset tag stuff
require 'csv.pl';

# Routine to canonicalize field names for indexing purposes.
sub canonicalize_field ($) {
my ($val) = @_;
# Convert to lower case.
$val = lc $val;
# Local custom: Comments may appear in parens.  Strip them.
$val =~ s/\s*\(.*?\)//g;
return $val;
}

# Read hardware inventory list, and index it by tag.
my $hard_inv = 'z:\\site\\hardware.csv';
my $hardware = CSV->read_file ($hard_inv);
my $hard_by_tag = $hardware->index_by ('Tag', \&canonicalize_field);

# Read software inventory list, and index it by owner (hardware tag).
my $soft_inv = 'z:\\site\\software.csv';
my $software = CSV->read_file ($soft_inv);
my $soft_by_owner = $software->index_by ('Owner', \&canonicalize_field);

# Create new [_meta]/asset_tag attribute.
$u->{'_meta'}->{'asset_tag'} =
sub {
my $ret = simple_q ('Enter asset tag (default = none): ');
defined $ret
or print "OK, have it your way.\n";
return defined $ret ? lc $ret : undef;
};

# Compute computer name from inventory sheet, if possible.
sub computer_name {
my $tag = $u->{'_meta'}->{'asset_tag'};
defined $tag
or return undef;
my @systems = @{$hard_by_tag->{$tag}};
scalar @systems == 0
and die "Tag $tag not found in $hard_inv -- bailing";
scalar @systems > 1
and die "Tag $tag found more than once in $hard_inv -- bailing";
my $name = hash_ref ($systems[0], 'Etc');
$name =~ /\S/
or undef $name;
my $text = (defined $name
? "Found hostname for tag $tag: $name\n"
: "No hostname found for tag $tag in $hard_inv\n");
print $text;
return $name;
}

$u->push_value ('UserData', 'ComputerName', \&computer_name);

# Compute product key from inventory sheet, if possible.
sub product_key {
my $tag = $u->{'_meta'}->{'asset_tag'};
defined $tag
or return undef;
my $licenses = $soft_by_owner->{$tag} || [ ];
my $key;
foreach my $license (@$licenses) {
my $desc = hash_ref ($license, 'Type');
$desc =~ /^Microsoft Windows/
or next;
$key = hash_ref ($license, 'Key');
$key =~ /\S/
and last;
undef $key;
}

my $text = (defined $key
? "Found product key for tag $tag: $key\n"
: "No product key found for tag $tag in $soft_inv\n");
print $text;

return $key;
}

$u->push_value ('UserData', 'ProductKey', \&product_key);

$u->push_value ('_meta', 'ntp_servers',
sub {
my $tag = $u->{'_meta'}->{'asset_tag'};
defined $tag
or return undef;
my ($tail) = $tag =~ /(\d)\z/;
defined $tail
or return undef;
return ($tail % 2
? 'ntp-1 ntp-0'
: 'ntp-0 ntp-1');
});

1;


---
SF.Net is sponsored by: Speed St

Re: [Unattended] Avoiding IIS instalation during unattended Install

2004-02-28 Thread Patrick J. LoPresti
"DE-LOS-SANTOS,ORIOL (HP-Spain,ex1)" <[EMAIL PROTECTED]> writes:

> Due to a Virus aler, I've found out that IIS are being installed
> during the Win2000sp4 unattended instalation.

The Z:\lib\unattend.txt file installs IIS by default.  Which may sound
stupid, but Z:\scripts\base.bat disables the service by default.  As
long as the service is disabled, IIS just takes up disk space; it does
not consume CPU nor does it represent a security threat.

This makes it easier to configure some systems with IIS and some
without.  It also means we apply the same set of updates without
having to conditionalize everything on IIS.

> I don't need IIS to be instal*led in the user computers. How can I
> avoid IIS from being intalled. I asume there is probably something
> in site/unattended.txt which I have not found yet.

You can edit Z:\lib\unattend.txt and remove the settings from the
[Components] section.  Or you can create Z:\site\unattend.txt with a
[Components] section to explicitly exclude the IIS components.

 - Pat


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
___
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info