Avoid automatic partitioning in autoyast?
Hello, since suse10.1 (with its signed files, sigh) its quite hard to include additional RPMs in the installation process eg for doing postinstall tasks. Thats where I started trying autoyast for a basically standard installation with an additional postinstall script for each host I have. Basically this works fine. However I have one problem: The partitioning. I cloned an installed system and used this autoyast file (slightly modified) for installation. So it has sections for the partitions to be created. I also included a confirmation tag so that I have a way to change installation settings if I like before the installation begins. Since the cloned system was a IDE based one, the xml file has entries to create partions eg hda etc. 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. Is there a way to tell autoyast not to take care of the partitioning because I am going to do this manually? This way I could use the same autoyast file for IDE and SATA and SCSI based systems. Else the only way I see is to use two autoyast files one for systems with hda devices and one for systems with sda devices. I tried an empy <partitioning config:type="list"></partitioning> section but this does not work either. autoyast still complains that partitioning did not work. Any other way? 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? Thanks Rainer -- --------------------------------------------------------------------------- Rainer Krienke, Universitaet Koblenz, Rechenzentrum, Raum A022 Universitaetsstrasse 1, 56070 Koblenz, Tel: +49 261287 -1312, Fax: -1001312 Mail: krienke@uni-koblenz.de, Web: http://www.uni-koblenz.de/~krienke Get my public PGP key: http://www.uni-koblenz.de/~krienke/mypgp.html ---------------------------------------------------------------------------
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> <match_type>greater</match_type> </disksize> <result> <profile>rule-has_ide_partitions.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> <rule> <disksize> <match>/dev/sda 10000</match> <match_type>greater</match_type> </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
On Thursday 01 June 2006 12:25, Simon Crute 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
Two ways. Either use rules, and create two partitioning sections. Something like, ... Or, use a pre script
that's right. Both ways work. There often is a third way of just dropping the <device>...</device> line from the profile. Autoyast starts guessing then which often works too (depends a bit on the hardware and bios). -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
On Thursday 01 June 2006 11:29, Uwe Gansert wrote:
that's right. Both ways work. There often is a third way of just dropping the <device>...</device> line from the profile. Autoyast starts guessing then which often works too (depends a bit on the hardware and bios).
Doh. Whish I knew that 18 months ago ! -- Simon Crute IS&T Bracknell Novell UK Ltd
On Thu, Jun 01, 2006 at 12:29:22PM +0200, Uwe Gansert wrote:
that's right. Both ways work. There often is a third way of just dropping the <device>...</device> line from the profile. Autoyast starts guessing then which often works too (depends a bit on the hardware and bios).
That's the way I'm doing it here with our 10.0 autoinstalls - too many machines with either hda or sda or (sic!) only hdb... Cheerio, Thomas
Am Donnerstag, 1. Juni 2006 12:29 schrieb Uwe Gansert:
that's right. Both ways work. There often is a third way of just dropping the <device>...</device> line from the profile. Autoyast starts guessing then which often works too (depends a bit on the hardware and bios).
This method worked. However there are still some strange issues. First of all. If I include a <use>all</use> directive everything works except for the fact that the bootloader config is of course created for the proposed partitioning scheme, the one I actually do not want to use. Next I tried <use>linux</use> this worked on one host but on another (IBM laptop) the installtion failed again when the partitioning plan was set up. However the laptop had a linux boot, root and swap partiton on it, but it seems autoyast failed to reuse it. There were two additional windows and a hidden IBM service partition on the disk as well. Perhaps this caused the problem. Even if the reuse works, the bootloader config is still wrong (wrong root partition in grub config). I completely removed the bootloader section from the autoyast file, thinking that in this cast yast would propose a default one fitting the partitioning scheme, but this did not work as expected. I could however remove the proposed (wrong) grub config in yast and have yast create a new proposal which was correct then. Are there any know problems with this? Thnaks Rainer -- --------------------------------------------------------------------------- Rainer Krienke, Universitaet Koblenz, Rechenzentrum, Raum A022 Universitaetsstrasse 1, 56070 Koblenz, Tel: +49 261287 -1312, Fax: -1001312 Mail: krienke@uni-koblenz.de, Web: http://www.uni-koblenz.de/~krienke Get my public PGP key: http://www.uni-koblenz.de/~krienke/mypgp.html ---------------------------------------------------------------------------
participants (4)
-
Rainer Krienke
-
Simon Crute
-
T. Ribbrock
-
Uwe Gansert