[plug] Debian V Redhat for server

Anthony J. Breeds-Taurima tony at cantech.net.au
Wed Oct 20 16:32:58 WST 1999


On Wed, 20 Oct 1999, Tony Clark wrote:

> I have never looked at this, but is there a way to do a complete upgrade
> on RH without having to boot the system off an install disk.  Normally I
> just use a boot disk to get it all going, but that can be a problem
> sometimes.  Like the one I'm going to do next weekend..

No offical way BUT in the past I've done something like

rpm -qa --queryformat "%{NAME}\n" > /tmp/installedpackages
telinit S
mount /mnt/cdrom
cd /mnt/cdrom/RedHat/RPMS
</tmp/installedpackages while read rpm ; do \
  rpm -i --force --nodeps ${rpm}\*.rpm; done
lilo -v
telint 6

BUT I don't REALLY recomend doing that as it will cause problems :(

You could write a perl script to do the interrogation for you and build a
dependncies list basically something like:

----
@installedRPMS = `/bin/rpm -qa`;
system '/bin/mount', '/mnt/cdrom';
$newRPMPath = '/mnt/cdrom/RedHat/RPMS';

foreach $currentRPM (@installedRPMS) {
	$currentRPM =~ /^(.*)-(.*?)-(.*)?$/;
    @{$newRPMS{$1}} = `/bin/rpm -qRp $newRPMPath/$1-*.rpm`;
}

$,="\n\t";
foreach $key (sort (keys %newRPMS)) {
	print "$key = \n@{$newRPMS{$key}}";
	print "\n";
}
----

should give you a list of rpm's to install and the dependencies for said RPM.
from there you should be able to sort things out so you install things in the
correct order.

Yours Tony.



More information about the plug mailing list