On Tue, 1 Jul 2003, Anas Nashif wrote:
On June 29, 2003 12:29 pm, Lars Stavholm wrote:
Hi all,
does anyone know of a way to make autoyast reread the partition table(s) after (or at the end of) a pre-script execution?
I'm trying to remove the current partitions, if any, using "parted", which succeeds. However, I'm guessing that autoyast already has a pretty good idea of the current partition plan based on a partition table(s) read prior to my usage of "parted"?
Why not use autoyast to remove the partitions? You can also initialize the partition table using partitioning/drive/initialize{boolean}
Well, I've tried it before, didn't work to well, got sidetracked, just
tried it again, still doesn't work as expected.
Unfortenatly we're using autoyast-installation 2.7.18-1 from the distro, I
don't know wether we should update to 2.7.19-0 or not (advice?).
Below you'll find the complete xml file we're using. Every second
installation (on the same system) reports an error:
LVM Error
vgcreate -A n -s 4096k vg00 /dev/md0
vgcreate -- volume group "vg00" already exists
The installation stops of course, I hit the reset button, and next time
around it works perfectly fine. Why?
The pre-script "wipe.sh" is an attempt to clean out lvm and raid info and
then even the partition tables.
BTW, are the dtd's really up to date. The below xml file will not pass an
xmllint --valid --noout quietly. If I change the xml to fit the dtd'd it
doesn't work (can't remeber the fault I got when testing it).
My question is: should I trust the dtd's or not?
R/Lars S
---
<?xml version="1.0"?>
<!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd">
<profile xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<configure>
<scripts>
<pre-scripts config:type="list">
<script>
<filename>wipe.sh</filename>
<interpreter>shell</interpreter>
<source>
<![CDATA[
mds=`lsraid -A -p | grep md | cut -d\ -f8`
for md in $mds; do
mdadm -S $md
done
vgscan
vgs=`echo /dev/vg*`
for vg in $vgs; do
if [ -d $vg ]; then
vgchange -a y $vg
lvs=`ls $vg`
for lv in $lvs; do
i=`basename $lv`
if [ $lv != "group" ]; then
lvremove -f $vg/$lv
fi
done
vgchange -a n $vg
vgremove $vg
fi
done
hds=`fdisk -l | grep Disk | cut -d\ -f2 | cut -d: -f1`
for hd in $hds; do
ps=`parted $hd print | grep '^[1-9]' | cut -d\ -f1`
for p in $ps; do
mdadm --zero-superblock $hd$p
parted $hd rm $p
done
done
]]>
</source>
</script>
</pre-scripts>
</scripts>
</configure>
<install>
<partitioning config:type="list">
<drive>
<device>/dev/hda</device>
<initialize config:type="boolean">true</initialize>
<partitions config:type="list">
<partition>