On Thursday 01 June 2006 10:50, Rainer Krienke wrote:
Now when I start an autoyast installation on an IDE based system this
works fine. But if I do the same on a SATA system the installation fails
when creating the partioning plan because of the fact that there is no hda
device but instead a sda. Actually I do not care about this failure since I
would like to do this manually, but I cannot because of this error the
complete installtion is stopped and I do not get to the point in yast where
I could correct the partitioning and other installation parameters.
Two ways. Either use rules, and create two partitioning sections. Something
like,
<rule>
<disksize>
<match>/dev/hda 10000</match>
greater
</disksize>
<result>
<profile>rule-has_ide_partitions.xml</profile>
<continue config:type="boolean">true</continue>
</result>
</rule>
<rule>
<disksize>
<match>/dev/sda 10000</match>
greater
</disksize>
<result>
<profile>rule-has_sata_partitions.xml</profile>
<continue config:type="boolean">true</continue>
</result>
</rule>
See the rules section in the docs for more details,
Or, use a pre script to re-write your config. (this one does several mods to
the file)
[warning, ugly, inelegant perl follows, there's much better ways to write
this]
<scripts>
<pre-scripts config:type="list">
<script>
<filename>mod-configfile</filename>
<interpreter>perl</interpreter>
<location></location>
<source><![CDATA[#!/usr/bin/perl -w
#script to rewrite the autoyast config file.
# some changes are easier to do this way than with autoyast profiles.
#
my $infile = "/tmp/profile/autoinst.xml";
my $outfile = "/tmp/profile/modified.xml";
my $resolv = "/etc/resolv.conf";
my $domain;
my $disk="";
print "test script to modify the autoyast config file\n";
#read the command line;
open CMD, "/proc/cmdline" or die "can't open cmdline";
my $line = <CMD>;
my @line = split ' ', $line;
my %line;
foreach (@line) {
/(.*)=(.*)/;
$line{$1} = $2;
print "$1 = $2\n";
}
#read resolv.conf and find the domain.
open RES, $resolv ;
while (<RES>) {
next unless /^search/;
/^search (.*.novell.com)/;
$domain=$1;
}
#a domain specified on the command line will overwrite that in the resolv.conf
if ($line{domain}) {
$domain=$line{domain}
};
#see if we have scsi or IDE disks. If we have both, assume IDE is bood disk.
if (`/sbin/fdisk -l |grep -c sda` > 0) { $disk="sda" };
if (`/sbin/fdisk -l |grep -c hda` > 0) { $disk="hda" };
#if hostname not set, set a default
#
if (! $line{host}) {
$line{host} = "nohostname";
}
#rewrite config file
open IN, $infile;
open OUT, ">$outfile";
while (<IN>) {
if ( /<domain>(.*)<\/domain>/ ) {
print "found it\n$_\n";
print OUT "<domain>$domain</domain>\n";
}
elsif ( /<hostname>(.*)<\/hostname>/ ) {
print "found hostname too\n";
print OUT "<hostname>",$line{host},"</hostname>\n";
}
elsif (/(.*)\/dev\/hda(.*)/) {
print "found disk Identifier too\n";
print OUT "$1/dev/$disk$2";
}
else {print OUT $_;}
}
close IN;
close OUT;
]]></source>
</script>
</pre-scripts>
</scripts>
A second question is if there is a way to pause autoyast after the initial
reboot, when in a standard yast installation the user is asked to do the
printer, network, soundcard etc configuration. It would be nice (but not
vital) if I could change things manually at this point too in the standard
yast way. Any way to do this?
That's covered in the docs I think. section 4.1, page 27 of
file:///usr/share/doc/packages/autoyast2/autoyast.pdf
Change starting from SUSE Linux 10.1/SLES10
[snip]
Since now you can use the second_stage property, which can turn off autoyast
after the
first reboot. So the complete second stage is a manual installation (default
is true,
which means that autoyast is doing a complete installation).
--
Simon Crute
IS&T
Bracknell
Novell UK Ltd