Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at Tue Jan 25 13:13:42 CET 2011. -------- --- kiwi/kiwi.changes 2011-01-23 21:34:38.000000000 +0100 +++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2011-01-25 11:14:58.000000000 +0100 @@ -1,0 +2,30 @@ +Tue Jan 25 10:02:40 CET 2011 - ms@suse.de + +- reverted the following commits: + + eeecf05d029e7e75abfc44a5c2c600263838c50e + 438e83976cbd12dde20511ea5d000620082fa066 + + They broke the yast autoyast and firstboot setup. The provided + config-yast-autoyast.xml or config-yast-firstboot.xml were not + handled anymore + +------------------------------------------------------------------- +Mon Jan 24 17:31:23 CET 2011 - ms@suse.de + +- removed fdisk support entirely except for changing the + partition table created by the isohybrid tool. parted can't + handle that table and therefore we use fdisk inside the + function createHybridPersistent() but nowhere else anymore + +------------------------------------------------------------------- +Mon Jan 24 17:25:38 CET 2011 - ms@suse.de + +- update schema and kiwi documentation + +------------------------------------------------------------------- +Mon Jan 24 12:49:57 CET 2011 - ms@suse.de + +- fixed mdadm --stop call for pxe raid(1) boot + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.jkx7XG/_old 2011-01-25 13:12:59.000000000 +0100 +++ /var/tmp/diff_new_pack.jkx7XG/_new 2011-01-25 13:12:59.000000000 +0100 @@ -66,7 +66,7 @@ %endif Summary: OpenSuSE - KIWI Image System Version: 4.71 -Release: 1 +Release: 2 Group: System/Management License: GPLv2 Source: %{name}.tar.bz2 ++++++ kiwi-docu.tar.bz2 ++++++ kiwi/kiwi-docu.tar.bz2 /mounts/work_src_done/STABLE/kiwi/kiwi-docu.tar.bz2 differ: char 11, line 1 ++++++ kiwi.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision --- old/kiwi/.revision 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/.revision 2011-01-25 11:11:07.000000000 +0100 @@ -1 +1 @@ -696f4fee72f6539219d2b6f6028de61641b665a9 +d3846132b7353b1c93229c87447a6085c7ead466 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/kiwi.pl 2011-01-25 11:11:07.000000000 +0100 @@ -1512,11 +1512,10 @@ } if (defined $Partitioner) { if ( - ($Partitioner ne "fdisk") && ($Partitioner ne "parted") && ($Partitioner ne "fdasd") ) { - $kiwi -> error ("Invalid partitioner, expected fdisk|parted"); + $kiwi -> error ("Invalid partitioner, expected parted|fdasd"); $kiwi -> failed (); my $code = kiwiExit (1); return $code; } @@ -1716,9 +1715,9 @@ print " Set the maximal time between two filesystem checks for ext[234].\n"; print " Set to 0 to disable time-dependent checks.\n"; print "\n"; - print " [ --partitioner <fdisk|parted> ]\n"; + print " [ --partitioner <parted|fdasd> ]\n"; print " Select the tool to create partition tables. Supported are\n"; - print " fdisk (sfdisk) and parted. By default fdisk is used\n"; + print " parted and fdasd (s390). By default parted is used\n"; print "\n"; print " [ --check-kernel ]\n"; print " Activates check for matching kernels between boot and\n"; @@ -1785,6 +1784,9 @@ my $validator = new KIWIXMLValidator ( $kiwi,$CheckConfig,$Revision,$Schema,$SchemaCVT ); + if (! $validator) { + exit 1; + } my $isValid = $validator -> validate(); if (! defined $isValid) { $kiwi -> error ('Validation failed'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIBoot.pm new/kiwi/modules/KIWIBoot.pm --- old/kiwi/modules/KIWIBoot.pm 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/modules/KIWIBoot.pm 2011-01-25 11:11:07.000000000 +0100 @@ -3984,7 +3984,7 @@ my $ignore; my $action; if (! defined $tool) { - $tool = "fdisk"; + $tool = "parted"; } SWITCH: for ($tool) { #========================================== @@ -4046,94 +4046,6 @@ last SWITCH; }; #========================================== - # fdisk - #------------------------------------------ - /^fdisk/ && do { - $status = qxx ("dd if=/dev/zero of=$device bs=512 count=1 2>&1"); - $result = $? >> 8; - if ($result != 0) { - $kiwi -> loginfo ($status); - return undef; - } - my $palign = $xml -> getOEMAlignPartition(); - if (($palign) && ("$palign" eq "true")) { - #========================================== - # create aligned table - #------------------------------------------ - my @commands_first = (); - my @commands_next = (); - for (my $count=0;$count<@commands;$count++) { - if ($commands[$count] eq "n") { - if (($commands[$count+2] eq "1") && - ($commands[$count+3] eq ".") - ) { - $commands[$count+3] = "64"; - last; - } - } - } - for (my $count=0;$count<=4;$count++) { - push @commands_first, $commands[$count]; - } - push @commands_first, "w"; - push @commands_first, "q"; - for (my $count=5;$count<@commands;$count++) { - push @commands_next, $commands[$count]; - } - $kiwi -> loginfo ( - "FDISK input aligned: $device [@commands]" - ); - if (! open (FD,"|/sbin/fdisk -u $device &>$tmpdir/fdisk.log")) { - return undef; - } - foreach my $cmd (@commands_first) { - if ($cmd eq ".") { - print FD "\n"; - } else { - print FD "$cmd\n"; - } - } - close FD; - if (! open (FD,"|/sbin/fdisk $device &>$tmpdir/fdisk.log")) { - return undef; - } - foreach my $cmd (@commands_next) { - if ($cmd eq ".") { - print FD "\n"; - } else { - print FD "$cmd\n"; - } - } - close FD; - } else { - #========================================== - # standard call without alignment - #------------------------------------------ - $kiwi -> loginfo ( - "FDISK input: $device [@commands]" - ); - if (! open (FD,"|/sbin/fdisk $device &>$tmpdir/fdisk.log")) { - return undef; - } - foreach my $cmd (@commands) { - if ($cmd eq ".") { - print FD "\n"; - } else { - print FD "$cmd\n"; - } - } - close FD; - } - $result = $? >> 8; - my $flog; - if (open (FD,"$tmpdir/fdisk.log")) { - my @flog = <FD>; close FD; - $flog = join ("\n",@flog); - $kiwi -> loginfo ("FDISK: $flog"); - } - last SWITCH; - }; - #========================================== # parted #------------------------------------------ /^parted/ && do { @@ -4196,31 +4108,10 @@ my $result; my $status; if (! defined $tool) { - $tool = "fdisk"; + $tool = "parted"; } SWITCH: for ($tool) { #========================================== - # fdisk - #------------------------------------------ - /^fdisk/ && do { - my $disk; - my $devnr= -1; - if ($pdev =~ /mapper/) { - if ($pdev =~ /mapper\/(.*)p(\d+)/) { - $disk = "/dev/".$1; - $devnr= $2; - } - } else { - if ($pdev =~ /(.*)(\d+)/) { - $disk = $1; - $devnr= $2; - } - } - $status = qxx ("/sbin/sfdisk -c $disk $devnr 2>&1"); - $result = $? >> 8; - last SWITCH; - }; - #========================================== # parted #------------------------------------------ /^parted/ && do { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIConfig.sh new/kiwi/modules/KIWIConfig.sh --- old/kiwi/modules/KIWIConfig.sh 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/modules/KIWIConfig.sh 2011-01-25 11:11:07.000000000 +0100 @@ -956,10 +956,10 @@ # remove unneeded tools #------------------------------------------ local tools=" - tune2fs swapon swapoff shutdown sfdisk resize_reiserfs + tune2fs swapon swapoff shutdown resize_reiserfs reiserfsck reboot halt pivot_root modprobe modinfo rmmod mkswap mkinitrd mkreiserfs mkfs.cramfs mkfs.btrfs btrfsctl - losetup ldconfig insmod init ifconfig fdisk e2fsck fsck.ext2 + losetup ldconfig insmod init ifconfig e2fsck fsck.ext2 fsck.ext3 fsck.ext4 dhcpcd mkfs.ext2 mkfs.ext3 mkfs.ext4 depmod atftpd klogconsole hwinfo xargs wc tail tac readlink mkfifo md5sum head expr file free find env du dirname cut @@ -979,7 +979,7 @@ dmsetup dialog awk gawk clicfs cryptsetup clear blkid fbiterm gettext diff bc utimer cmp busybox kexec pam_console_apply setterm kpartx vgcfgbackup vgcfgrestore lsdasd dasd_configure - qeth_configure fdasd mkdosfs egrep mkfs.xfs mdadm yes + qeth_configure fdasd mkdosfs egrep mkfs.xfs mdadm yes fdisk " tools="$tools $@" for path in /sbin /usr/sbin /usr/bin /bin;do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIConfigure.pm new/kiwi/modules/KIWIConfigure.pm --- old/kiwi/modules/KIWIConfigure.pm 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/modules/KIWIConfigure.pm 2011-01-25 11:11:07.000000000 +0100 @@ -329,26 +329,21 @@ my $kiwi = $this->{kiwi}; my $root = $this->{root}; my $imageDesc = $this->{imageDesc}; - my $autodir = "var/lib/autoinstall/autoconf"; - my $autocnf = "autoconf.xml"; - my $autosetup = "$root/$autodir/$autocnf"; - if ((! -f "$imageDesc/config-yast-autoyast.xml") && (! -f $autosetup)) { + if (! -f "$imageDesc/config-yast-autoyast.xml") { return "skipped"; } $kiwi -> info ("Setting up AutoYaST..."); + my $autodir = "var/lib/autoinstall/autoconf"; + my $autocnf = "autoconf.xml"; if (! -d "$root/$autodir") { $kiwi -> failed (); $kiwi -> error ("AutoYaST seems not to be installed"); $kiwi -> failed (); return "failed"; } - if ( -f $autosetup ) { - $kiwi -> info ("$autocnf file already exists, won't overwrite"); - } else { - qxx ( - "cp $imageDesc/config-yast-autoyast.xml $autosetup 2>&1" - ); - } + qxx ( + "cp $imageDesc/config-yast-autoyast.xml $root/$autodir/$autocnf 2>&1" + ); if ( ! open (FD,">$root/etc/install.inf")) { $kiwi -> failed (); $kiwi -> error ("Failed to create install.inf: $!"); @@ -383,8 +378,7 @@ my $kiwi = $this->{kiwi}; my $root = $this->{root}; my $imageDesc = $this->{imageDesc}; - my $firstboot = "$root/etc/YaST2/firstboot.xml"; - if ((! -f "$imageDesc/config-yast-firstboot.xml") && (! -f $firstboot)) { + if (! -f "$imageDesc/config-yast-firstboot.xml") { return "skipped"; } $kiwi -> info ("Setting up YaST firstboot service..."); @@ -397,19 +391,14 @@ $kiwi -> failed (); return "failed"; } - if ( -f $firstboot ) { - $kiwi -> info ("firstboot.xml file already exists, won't overwrite"); - } else { - my $data = qxx ( - "cp $imageDesc/config-yast-firstboot.xml $firstboot 2>&1" - ); - my $code = $? >> 8; - if ($code != 0) { - $kiwi -> failed (); - $kiwi -> error ("Failed to copy config-yast-firstboot.xml: $data"); - $kiwi -> failed (); - return "failed"; - } + my $firstboot = "$root/etc/YaST2/firstboot.xml"; + my $data = qxx ("cp $imageDesc/config-yast-firstboot.xml $firstboot 2>&1"); + my $code = $? >> 8; + if ($code != 0) { + $kiwi -> failed (); + $kiwi -> error ("Failed to copy config-yast-firstboot.xml: $data"); + $kiwi -> failed (); + return "failed"; } # /.../ # keep an existing /etc/sysconfig/firstboot or copy the template @@ -466,10 +455,10 @@ if (! -e "$root/etc/init.d/$service") { next; } - my $data = qxx ( + $data = qxx ( "chroot $root /sbin/insserv /etc/init.d/$service 2>&1" ); - my $code = $? >> 8; + $code = $? >> 8; if ($code != 0) { $kiwi -> failed (); $kiwi -> error ("Failed to activate service(s): $data"); @@ -482,8 +471,8 @@ # current firstboot service works like yast second stage and # is activated by touching /var/lib/YaST2/reconfig_system # ---- - my $data = qxx ("touch $root/var/lib/YaST2/reconfig_system 2>&1"); - my $code = $? >> 8; + $data = qxx ("touch $root/var/lib/YaST2/reconfig_system 2>&1"); + $code = $? >> 8; if ($code != 0) { $kiwi -> failed (); $kiwi -> error ("Failed to activate firstboot: $data"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIIsoLinux.pm new/kiwi/modules/KIWIIsoLinux.pm --- old/kiwi/modules/KIWIIsoLinux.pm 2010-03-18 11:42:51.000000000 +0100 +++ new/kiwi/modules/KIWIIsoLinux.pm 2011-01-25 11:11:07.000000000 +0100 @@ -678,7 +678,7 @@ my $ldir = $this -> {tmpdir}; my $prog = $this -> {tool}; my $cmdln= "$prog $para -o $dest $ldir $src 2>&1"; - $kiwi -> info ( "Calling: $cmdln\n" ); + $kiwi -> loginfo ( "Calling: $cmdln\n" ); my $data = qxx ( $cmdln ); my $code = $? >> 8; if ($code != 0) { @@ -758,38 +758,6 @@ $kiwi -> failed (); return undef; } - #========================================== - # Make it DOS compatible - #------------------------------------------ - # /.../ - # Doing this will break the hybrid, the partition - # can't be mounted after that call. I'm pretty sure - # this is a bug in isohybrid not creating a compatible - # partition table - # ---- - #my @commands = ("d","n","p","1",".",".","a","1","w","q"); - #$loop = qxx ("/sbin/losetup -s -f $iso 2>&1"); chomp $loop; - #$code = $? >> 8; - #if ($code != 0) { - # $kiwi -> error ("Failed to loop bind iso file: $loop"); - # $kiwi -> failed (); - # return undef; - #} - #if (! open ($FD,"|/sbin/fdisk $loop &> /dev/null")) { - # $kiwi -> error ("Failed to call fdisk"); - # $kiwi -> failed (); - # qxx ("losetup -d $loop"); - # return undef; - #} - #foreach my $cmd (@commands) { - # if ($cmd eq ".") { - # print $FD "\n"; - # } else { - # print $FD "$cmd\n"; - # } - #} - #close $FD; - #qxx ("losetup -d $loop"); return $this; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWILinuxRC.sh new/kiwi/modules/KIWILinuxRC.sh --- old/kiwi/modules/KIWILinuxRC.sh 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/modules/KIWILinuxRC.sh 2011-01-25 11:11:07.000000000 +0100 @@ -23,6 +23,7 @@ export UFONT=/usr/share/fbiterm/fonts/b16.pcf.gz export HYBRID_PERSISTENT_FS=ext3 export HYBRID_PERSISTENT_ID=83 +export HYBRID_PERSISTENT_PART=4 export HYBRID_PERSISTENT_DIR=/read-write export UTIMER_INFO=/dev/utimer export bootLoaderOK=0 @@ -58,7 +59,7 @@ export PARTED_HAVE_MACHINE=1 fi if [ $PARTED_HAVE_MACHINE -eq 0 ];then - export PARTITIONER=sfdisk + export PARTITIONER=unsupported fi if dhcpcd -p 2>&1 | grep -q 'Usage';then export DHCPCD_HAVE_PERSIST=0 @@ -2970,13 +2971,7 @@ #====================================== # search for hybrid device #-------------------------------------- - # /.../ - # we have to use fdisk here for partition manipulation - # because parted doesn't accept the partition table written - # by the isohybrid tool :( - # ---- - PARTITIONER=sfdisk - if [ "x$kiwi_hybridpersistent" = "xyes" ];then + if [ "$kiwi_hybridpersistent" = "yes" ];then protectedDevice=$(echo $biosBootDevice | sed -e s@/dev/@@) protectedDisk=$(cat /sys/block/$protectedDevice/ro) if [ $protectedDisk = "0" ];then @@ -3000,20 +2995,12 @@ #====================================== # search hybrid for a write partition #-------------------------------------- - for disknr in 2 3 4;do - id=`partitionID $biosBootDevice $disknr` - if [ "$id" = "83" ];then - export HYBRID_RW=$biosBootDevice$disknr - break - fi - done + export HYBRID_RW=$(ddn $biosBootDevice $HYBRID_PERSISTENT_PART) #====================================== - # device found go with it + # LIVECD_CONFIG found go with it #-------------------------------------- - PARTITIONER=parted return fi - PARTITIONER=parted umount $cddev &>/dev/null fi echo @@ -3534,15 +3521,6 @@ dd if=/dev/zero of=$diskDevice bs=32M >/dev/null } #====================================== -# sfdiskGetPartitionID -#-------------------------------------- -function sfdiskGetPartitionID { - # /.../ - # prints the partition ID for the given device and number - # ---- - sfdisk -c $1 $2 -} -#====================================== # fdasdGetPartitionID #-------------------------------------- function fdasdGetPartitionID { @@ -3578,9 +3556,7 @@ function partitionID { local diskDevice=$1 local diskNumber=$2 - if [ $PARTITIONER = "sfdisk" ];then - sfdiskGetPartitionID $diskDevice $diskNumber - elif [ $PARTITIONER = "fdasd" ];then + if [ $PARTITIONER = "fdasd" ];then fdasdGetPartitionID $diskDevice $diskNumber else partedGetPartitionID $diskDevice $diskNumber @@ -4022,6 +3998,7 @@ local roDevice=`echo $UNIONFS_CONFIG | cut -d , -f 2` local clic_cmd=clicfs local resetReadWrite=0 + local ramOnly=0 local haveBytes local haveKByte local haveMByte @@ -4050,8 +4027,12 @@ #====================================== # check read/write device location #-------------------------------------- - getDiskDevice $rwDevice | grep -q ram - if [ $? = 0 ];then + if [ ! -e $rwDevice ];then + ramOnly=1 + elif getDiskDevice $rwDevice | grep -q ram;then + ramOnly=1 + fi + if [ $ramOnly = 1 ];then haveKByte=`cat /proc/meminfo | grep MemFree | cut -f2 -d:| cut -f1 -dk` haveMByte=`expr $haveKByte / 1024` haveMByte=`expr $haveMByte \* 7 / 10` @@ -4061,8 +4042,8 @@ haveMByte=`expr $haveBytes / 1024 / 1024` wantCowFS=0 if \ - [ "x$kiwi_hybrid" = "xyes" ] && - [ "x$kiwi_hybridpersistent" = "xyes" ] + [ "$kiwi_hybrid" = "yes" ] && + [ "$kiwi_hybridpersistent" = "yes" ] then # write into a cow file on a filesystem, for hybrid iso's wantCowFS=1 @@ -5626,7 +5607,7 @@ echo $part_new } #====================================== -# ndd +# nd #-------------------------------------- function nd { # /.../ @@ -5670,82 +5651,71 @@ # createHybridPersistent #-------------------------------------- function createHybridPersistent { - local dev=$1; - local relativeDevName=`basename $dev` + # /.../ + # create a new partition to handle the copy-on-write actions + # by the clicfs live mount. A new partition with a filesystem + # inside labeled as 'hybrid' is created for this purpose + # ---- + local device=$1 local input=/part.input - local id=0 - for disknr in 2 3 4; do - id=`partitionID $dev $disknr` - if [ $id = $HYBRID_PERSISTENT_ID ]; then - Echo "Existing persistent hybrid partition found $dev$disknr" - return - else - Echo "Creating hybrid persistent partition for COW data: " - Echo "$dev$disknr id=$HYBRID_PERSISTENT_ID fs=$HYBRID_PERSISTENT_FS" - if [ $disknr -lt 4 ];then - createPartitionerInput \ - n p $disknr . . t $disknr $HYBRID_PERSISTENT_ID w - else - createPartitionerInput \ - n p . . t 4 $HYBRID_PERSISTENT_ID w - fi - imageDiskDevice=$dev - callPartitioner $input - if ! waitForStorageDevice $dev$disknr;then - Echo "Partition $dev$disknr doesn't appear... fatal !" - Echo "Persistent writing deactivated" - unset kiwi_hybridpersistent - elif ! mkfs.$HYBRID_PERSISTENT_FS $dev$disknr;then - Echo "Failed to create hybrid persistent filesystem" - Echo "Persistent writing deactivated" - unset kiwi_hybridpersistent - fi - return + local disknr=$HYBRID_PERSISTENT_PART + mkdir -p /cow + rm -f $input + #====================================== + # check persistent write partition + #-------------------------------------- + if mount -L hybrid /cow;then + Echo "Existing persistent hybrid partition found" + umount /cow + rmdir /cow + return + fi + #====================================== + # create persistent write partition + #-------------------------------------- + # /.../ + # we have to use fdisk here because parted can't work + # with the partition table created by isohybrid + # ---- + Echo "Creating hybrid persistent partition for COW data" + for cmd in n p $disknr . . t $disknr $HYBRID_PERSISTENT_ID w q;do + if [ $cmd = "." ];then + echo >> $input + continue fi + echo $cmd >> $input done + fdisk $device < $input 1>&2 + if test $? != 0; then + Echo "Failed to create persistent write partition" + Echo "Persistent writing deactivated" + unset kiwi_hybridpersistent + return + fi + #====================================== + # check partition device node + #-------------------------------------- + if ! waitForStorageDevice $(ddn $device $disknr);then + Echo "Partition $disknr on $device doesn't appear... fatal !" + Echo "Persistent writing deactivated" + unset kiwi_hybridpersistent + return + fi + #====================================== + # create filesystem on write partition + #-------------------------------------- + if ! mkfs.$HYBRID_PERSISTENT_FS -L hybrid $(ddn $device $disknr);then + Echo "Failed to create hybrid persistent filesystem" + Echo "Persistent writing deactivated" + unset kiwi_hybridpersistent + fi } #====================================== # callPartitioner #-------------------------------------- function callPartitioner { local input=$1 - if [ $PARTITIONER = "sfdisk" ];then - Echo "Repartition the disk according to real geometry [ fdisk ]" - local pstart=$(checkFDiskFirstSector $imageDiskDevice) - echo "w" >> $input - echo "q" >> $input - fdisk $imageDiskDevice < $input 1>&2 - if test $? != 0; then - systemException "Failed to create partition table" "reboot" - fi - local pstopp_new=$(checkFDiskEndSector $imageDiskDevice) - local pstart_new=$(checkFDiskFirstSector $imageDiskDevice) - if [ $pstart_new -ne $pstart ];then - local fixpart=/part.input-fixupStartSector - local numpdevs=$(fdisk -ul $imageDiskDevice | grep '^/dev/' | wc -l) - echo "d" > $fixpart - if [ $numpdevs -gt 1 ];then - echo "1" >> $fixpart - fi - echo "n" >> $fixpart - echo "p" >> $fixpart - echo "1" >> $fixpart - echo $pstart >> $fixpart - echo $pstopp_new >> $fixpart - echo "w" >> $fixpart - echo "q" >> $fixpart - fdisk -u $imageDiskDevice < $fixpart 1>&2 - if test $? != 0; then - systemException "Failed to fix partition table" "reboot" - fi - fi - if [ ! -z "$OEM_ALIGN" ];then - if [ ! -z "$haveLVM" ];then - vgchange -an - fi - fixupFDiskSectors $input $pstart - fi - elif [ $PARTITIONER = "fdasd" ];then + if [ $PARTITIONER = "fdasd" ];then Echo "Repartition the disk according to real geometry [ fdasd ]" echo "w" >> $input echo "q" >> $input @@ -5757,7 +5727,7 @@ # /.../ # nothing to do for parted here as we write # imediately with parted and don't create a - # command input file as for fdisk but we re-read + # command input file as for fdasd but we re-read # the disk so that the new table will be used # ---- udevPending @@ -5771,9 +5741,7 @@ if echo $imageDiskDevice | grep -q 'dev\/dasd';then PARTITIONER=fdasd fi - if [ $PARTITIONER = "sfdisk" ];then - createFDiskInput $@ - elif [ $PARTITIONER = "fdasd" ];then + if [ $PARTITIONER = "fdasd" ];then createFDasdInput $@ else Echo "Repartition the disk according to real geometry [ parted ]" @@ -5822,98 +5790,6 @@ done } #====================================== -# checkFDiskFirstSector -#-------------------------------------- -function checkFDiskFirstSector { - # /.../ - # check number of start sector for first partition - # ---- - local dev=$1 - local p1=$(ddn $dev 1) - fdisk -ul ${dev} | grep '^'$p1 | \ - sed -e's@'$p1'[ \*]*\([0-9]\+\) .*$@\1@' -} - -#====================================== -# checkFDiskEndSector -#-------------------------------------- -function checkFDiskEndSector { - # /.../ - # check number of end sector for first partition - # ---- - local dev=$1 - local p1=$(ddn $dev 1) - fdisk -ul ${dev} | grep '^'$p1 | \ - sed -e's@'$p1'[ \*]*\([0-9]\+\)[ \*]*\([0-9]\+\) .*$@\2@' -} -#====================================== -# fixupFDiskSectors -#-------------------------------------- -function fixupFDiskSectors { - # /.../ - # align the first partition start sector using fdisk - # ---- - local input=$1 - local palign=$2 - local pstart pend act psize ptype rest - case "$palign" in - 64) palign=8;; - 2048) palign=2048;; - *) return;; - esac - local numpdevs=$(fdisk -ul $imageDiskDevice | grep '^/dev/' | wc -l) - rm -f $input - fdisk -ul $imageDiskDevice | grep '^/dev/' | \ - while read pdev act pstart pend psize ptype rest; do - pdev=${pdev#$imageDiskDevice} - if [ "$act" != '*' ]; then - ptype="$psize" - pend="$pstart" - pstart="$act" - fi - local aligned=$(( ( $pstart + $palign - 1 ) / $palign * $palign )) - if [ "$aligned" -ne "$pstart" ]; then - echo "d" >> $input - test $numpdevs -gt 1 && echo "$pdev" >> $input - echo "n" >> $input - echo "p" >> $input - test $numpdevs -lt 4 && echo "$pdev" >> $input - echo "$aligned" >> $input - echo "$pend" >> $input - echo "t" >> $input - test $numpdevs -gt 1 && echo "$pdev" >> $input - echo "$ptype" >> $input - if [ "$act" = '*' ]; then - echo "a" >> $input - echo "$pdev" >> $input - fi - fi - # handle only the first partition - break - done - if [ -s $input ]; then - echo "w" >> $input - echo "q" >> $input - fdisk -u $imageDiskDevice < $input 1>&2 - if test $? != 0; then - systemException "Failed to fix up partition table" "reboot" - fi - fi -} -#====================================== -# createFDiskInput -#-------------------------------------- -function createFDiskInput { - local input=/part.input - for cmd in $*;do - if [ $cmd = "." ];then - echo >> $input - continue - fi - echo $cmd >> $input - done -} -#====================================== # partedInit #-------------------------------------- function partedInit { @@ -6890,6 +6766,14 @@ #-------------------------------------- function initialize { #====================================== + # Check partitioner capabilities + #-------------------------------------- + if [ $PARTITIONER = "unsupported" ];then + systemException \ + "Installed parted version is too old" \ + "reboot" + fi + #====================================== # Check for hotfix kernel #-------------------------------------- reloadKernel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rnc new/kiwi/modules/KIWISchema.rnc --- old/kiwi/modules/KIWISchema.rnc 2010-12-03 16:08:51.000000000 +0100 +++ new/kiwi/modules/KIWISchema.rnc 2011-01-25 11:11:07.000000000 +0100 @@ -684,7 +684,7 @@ # div { k.partition.type.attribute = - ## Partition Type identifier, see fdisk for details + ## Partition Type identifier, see parted for details attribute type { text } k.partition.number.attribute = ## Partition ID @@ -877,14 +877,12 @@ k.oem-align-partition.content = xsd:boolean k.oem-align-partition.attlist = empty k.oem-align-partition = - ## For oemboot driven images: align start sectors. This is only - ## done when fdisk is used. For parted the option -a is passed in - ## in any case + ## For oemboot driven images: align start sectors. + ## For parted the option -a is passed [ db:para [ - "For oemboot driven images: align start sectors. This is only\x{a}"~ - "done when fdisk is used. For parted the option -a is passed\x{a}"~ - "in any case" + "For oemboot driven images: align start sectors.\x{a}"~ + "For parted the option -a is passed." ] ] element oem-align-partition { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rng new/kiwi/modules/KIWISchema.rng --- old/kiwi/modules/KIWISchema.rng 2010-12-03 16:08:51.000000000 +0100 +++ new/kiwi/modules/KIWISchema.rng 2011-01-25 11:11:07.000000000 +0100 @@ -1023,7 +1023,7 @@ <div> <define name="k.partition.type.attribute"> <attribute name="type"> - <a:documentation>Partition Type identifier, see fdisk for details</a:documentation> + <a:documentation>Partition Type identifier, see parted for details</a:documentation> </attribute> </define> <define name="k.partition.number.attribute"> @@ -1301,12 +1301,10 @@ </define> <define name="k.oem-align-partition"> <element name="oem-align-partition"> - <a:documentation>For oemboot driven images: align start sectors. This is only -done when fdisk is used. For parted the option -a is passed in -in any case</a:documentation> - <db:para>For oemboot driven images: align start sectors. This is only -done when fdisk is used. For parted the option -a is passed -in any case</db:para> + <a:documentation>For oemboot driven images: align start sectors. +For parted the option -a is passed</a:documentation> + <db:para>For oemboot driven images: align start sectors. +For parted the option -a is passed.</db:para> <ref name="k.oem-align-partition.attlist"/> <ref name="k.oem-align-partition.content"/> </element> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/netboot/suse-linuxrc new/kiwi/system/boot/ix86/netboot/suse-linuxrc --- old/kiwi/system/boot/ix86/netboot/suse-linuxrc 2011-01-20 09:19:55.000000000 +0100 +++ new/kiwi/system/boot/ix86/netboot/suse-linuxrc 2011-01-25 11:11:07.000000000 +0100 @@ -325,10 +325,11 @@ umountSystem RELOAD_IMAGE="yes" systemIntegrity="clean" - mdadm --stop $imageDevice fi else systemIntegrity="clean" + fi + if [ $systemIntegrity = "fine" ] && [ ! -z "$RAID" ];then mdadm --stop $imageDevice fi done ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org