Hello community, here is the log from the commit of package kiwi checked in at Thu Sep 20 01:30:29 CEST 2007. -------- --- arch/i386/kiwi/kiwi.changes 2007-09-18 14:16:26.000000000 +0200 +++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2007-09-19 18:51:19.865689000 +0200 @@ -1,0 +2,18 @@ +Tue Sep 18 20:01:01 CEST 2007 - ms@suse.de + +- reread partition table after oemboot installation +- fixed repartition code for squasfs/aufs based system images + installed by oemboot +- fixed virtual disk size calculation if squashfs is used +- don't throw a reboot exception in mountSystem but return + with code 1 to allow caller to check the return value +- added support for $HOME/.kiwirc file. It's perl syntax and + allows to set the variables $BasePath and $System. By default + /usr/share/kiwi is used for $BasePath and /usr/share/kiwi/image + is used for $System (#308597) +- use correct passwd and group template file of the + distribution. image descriptions should _not_ provide + a passwd or group file within the image description root/ + path anymore (#297610) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.Z29091/_old 2007-09-20 01:30:00.000000000 +0200 +++ /var/tmp/diff_new_pack.Z29091/_new 2007-09-20 01:30:00.000000000 +0200 @@ -16,7 +16,7 @@ Requires: perl perl-XML-LibXML perl-libwww-perl screen Summary: OpenSuSE - KIWI Image System Version: 1.64 -Release: 11 +Release: 13 Group: System/Management License: GPL v2 or later Source: kiwi.tar.bz2 @@ -325,9 +325,23 @@ %dir %{_datadir}/kiwi/image/oemboot %doc %{_datadir}/kiwi/image/oemboot/README %{_datadir}/kiwi/image/oemboot/suse* - %changelog * Tue Sep 18 2007 - ms@suse.de +- reread partition table after oemboot installation +- fixed repartition code for squasfs/aufs based system images + installed by oemboot +- fixed virtual disk size calculation if squashfs is used +- don't throw a reboot exception in mountSystem but return + with code 1 to allow caller to check the return value +- added support for $HOME/.kiwirc file. It's perl syntax and + allows to set the variables $BasePath and $System. By default + /usr/share/kiwi is used for $BasePath and /usr/share/kiwi/image + is used for $System (#308597) +- use correct passwd and group template file of the + distribution. image descriptions should _not_ provide + a passwd or group file within the image description root/ + path anymore (#297610) +* Tue Sep 18 2007 - ms@suse.de - fixed missing message file for vmx type - added usage information for --add-profile option - added baseGetProfilesUsed() function to get information ++++++ kiwi.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2007-09-18 11:59:00.000000000 +0200 +++ new/kiwi/kiwi.pl 2007-09-19 18:46:01.000000000 +0200 @@ -33,16 +33,37 @@ # Globals (Version) #-------------------------------------------- our $Version = "1.64"; -our $Revision = "/usr/share/kiwi/.revision"; our $openSUSE = "http://software.opensuse.org/download/"; +our $ConfigFile = "$ENV{'HOME'}/.kiwirc"; +#============================================ +# Read $HOME/.kiwirc +#-------------------------------------------- +if ( -f $ConfigFile) { + my $kiwi = new KIWILog(); + if (! do $ConfigFile) { + $kiwi -> warning ("Invalid $ConfigFile file..."); + $kiwi -> skipped (); + } else { + $kiwi -> info ("Using $ConfigFile"); + $kiwi -> done (); + } +} #============================================ # Globals #-------------------------------------------- -our $System = "/usr/share/kiwi/image"; -our $Tools = "/usr/share/kiwi/tools"; -our $Scheme = "/usr/share/kiwi/modules/KIWIScheme.xsd"; -our $KConfig = "/usr/share/kiwi/modules/KIWIConfig.sh"; -our $KMigrate= "/usr/share/kiwi/modules/KIWIMigrate.txt"; +our $BasePath; # configurable base kiwi path +our $System; # configurable baes kiwi image desc. path +if ( ! defined $BasePath ) { + $BasePath = "/usr/share/kiwi"; +} +if ( ! defined $System ) { + $System = $BasePath."/image"; +} +our $Tools = $BasePath."/tools"; +our $Scheme = $BasePath."/modules/KIWIScheme.xsd"; +our $KConfig = $BasePath."/modules/KIWIConfig.sh"; +our $KMigrate= $BasePath."/modules/KIWIMigrate.txt"; +our $Revision= $BasePath."/.revision"; #============================================ # Globals #-------------------------------------------- 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 2007-09-18 11:44:16.000000000 +0200 +++ new/kiwi/modules/KIWIBoot.pm 2007-09-19 18:46:00.000000000 +0200 @@ -75,8 +75,7 @@ my $result = $? >> 8; if ($result == 0) { $syszip = -s $system; - $syszip /= 1024 * 1024; - $syszip = int $syszip + 70; + $syszip+= 70 * 1024 * 1024; } else { $syszip = 0; } @@ -96,7 +95,7 @@ $kiwi -> failed (); return undef; } - $tmpdir = qx ( mktemp -q -d /tmp/kiwiboot.XXXXXX ); + $tmpdir = qx ( mktemp -q -d /tmp/kiwiboot.XXXXXX ); chomp $tmpdir; $result = $? >> 8; if ($result != 0) { $kiwi -> error ("Couldn't create tmp dir: $tmpdir: $!"); @@ -107,8 +106,12 @@ my $kernelSize = -s $kernel; # the kernel my $initrdSize = -s $initrd; # the boot image my $systemSize = -s $system; # the system image - $vmsize = $kernelSize + $initrdSize + $systemSize; - my $sparesSize = 0.2 * $vmsize; # and 20% free space + if ($syszip) { + $vmsize = $kernelSize + $initrdSize + $syszip; + } else { + $vmsize = $kernelSize + $initrdSize + $systemSize; + } + my $sparesSize = 0.3 * $vmsize; # and 30% free space $vmsize = $vmsize + $sparesSize; $vmsize = $vmsize / 1024 / 1024; $vmsize = int $vmsize; @@ -118,7 +121,10 @@ #$kiwi -> info ("Using given virtual disk size of: $vmsize"); } #$kiwi -> done (); - chomp $tmpdir; + if ($syszip) { + $syszip = $syszip / 1024 / 1024; + $syszip = int $syszip; + } #========================================== # Store object data #------------------------------------------ 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 2007-09-18 13:58:26.000000000 +0200 +++ new/kiwi/modules/KIWIConfig.sh 2007-09-19 18:46:00.000000000 +0200 @@ -320,6 +320,7 @@ usleep parted mke2fs pvcreate vgcreate lvm resize2fs ln hdparm dmesg splash fbmngplay portmap start-statd sm-notify rpc.statd rpc.idmapd nbd-client mount.nfs mount.nfs4 eject + blockdev " for path in /sbin /usr/sbin /usr/bin /bin;do baseStripTools "$path" "$tools" 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 2007-09-17 10:51:13.000000000 +0200 +++ new/kiwi/modules/KIWILinuxRC.sh 2007-09-19 18:46:00.000000000 +0200 @@ -1080,7 +1080,34 @@ TSERVER=$kiwitftp fi } - +#====================================== +# umountSystem +#-------------------------------------- +function umountSystem () { + retval=0 + OLDIFS=$IFS + IFS=$IFS_ORIG + mountPath=/mnt + if test ! -z $UNIONFS_CONFIG;then + roDir=/ro_branch + rwDir=/rw_branch + xiDir=/xino + if ! umount $mountPath >/dev/null 2>&1;then + retval=1 + fi + for dir in $roDir $rwDir $xiDir;do + if ! umount $dir >/dev/null 2>&1;then + retval=1 + fi + done + else + if ! umount $mountPath >/dev/null 2>&1;then + retval=1 + fi + fi + IFS=$OLDIFS + return $retval +} #====================================== # mountSystem #-------------------------------------- @@ -1124,9 +1151,8 @@ if ! mount $rwDevice $rwDir >/dev/null 2>&1;then Echo "Creating filesystem for RW data on $rwDevice..." if ! mke2fs $rwDevice >/dev/null 2>&1;then - systemException \ - "Failed to create ext2 filesystem" \ - "reboot" + Echo "Failed to create ext2 filesystem" + retval=1; return $retval fi Echo "Checking EXT2 write extend..." e2fsck -y -f $rwDevice >/dev/null 2>&1 @@ -1164,19 +1190,6 @@ IFS=$OLDIFS return $retval } - -#====================================== -# umountSystem -#-------------------------------------- -function umountSystem () { - umount /mnt >/dev/null 2>&1 - if test ! -z "$UNIONFS_CONFIG";then - umount /ro_branch >/dev/null 2>&1 - umount /rw_branch >/dev/null 2>&1 - umount /xino >/dev/null 2>&1 - fi -} - #====================================== # cleanDirectory #-------------------------------------- @@ -1193,7 +1206,6 @@ mv $tmpdir/* $directory rm -rf $tmpdir } - #====================================== # cleanInitrd #-------------------------------------- @@ -1215,7 +1227,6 @@ # mount opens fstab so we give them one touch /etc/fstab } - #====================================== # searchAlternativeConfig #-------------------------------------- diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIRoot.pm new/kiwi/modules/KIWIRoot.pm --- old/kiwi/modules/KIWIRoot.pm 2007-09-17 10:51:13.000000000 +0200 +++ new/kiwi/modules/KIWIRoot.pm 2007-09-19 18:46:00.000000000 +0200 @@ -255,8 +255,27 @@ qx ( touch $root/etc/mtab ); qx ( touch $root/etc/sysconfig/bootloader ); # need user/group files as template - qx ( cp /etc/group $root/etc 2>&1 ); - qx ( cp /etc/passwd $root/etc 2>&1 ); + my $groupTemplate = "/etc/group"; + my $paswdTemplate = "/etc/passwd"; + # search for template files, add paths for different distros here + my @searchPWD = ( + "/var/adm/fillup-templates/passwd.aaa_base" + ); + my @searchGRP = ( + "/var/adm/fillup-templates/group.aaa_base" + ); + foreach my $group (@searchGRP) { + if ( -f $group ) { + $groupTemplate = $group; last; + } + } + foreach my $paswd (@searchPWD) { + if ( -f $paswd ) { + $paswdTemplate = $paswd; last; + } + } + qx ( cp $groupTemplate $root/etc/group 2>&1 ); + qx ( cp $paswdTemplate $root/etc/passwd 2>&1 ); # need resolv.conf for internal chroot name resolution qx ( cp /etc/resolv.conf $root/etc 2>&1 ); qx ( cp $main::KConfig $root/.kconfig 2>&1 ); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/.revision new/kiwi/.revision --- old/kiwi/.revision 2007-09-18 14:16:03.000000000 +0200 +++ new/kiwi/.revision 2007-09-19 18:50:41.000000000 +0200 @@ -1 +1 @@ -626 \ No newline at end of file +627 \ No newline at end of file diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/oemboot/suse-linuxrc new/kiwi/system/boot/oemboot/suse-linuxrc --- old/kiwi/system/boot/oemboot/suse-linuxrc 2007-09-14 15:18:08.000000000 +0200 +++ new/kiwi/system/boot/oemboot/suse-linuxrc 2007-09-19 18:45:58.000000000 +0200 @@ -35,6 +35,7 @@ # Exports (Configuration) #-------------------------------------- export VMX_SYSTEM="/config.vmxsystem" +export LIVECD_CONFIG=$VMX_SYSTEM #====================================== # Functions... @@ -72,7 +73,7 @@ # it comes from the cmdline data which means we are not booting # from CD/DVD USB stick but want to boot the local system # ---- - LOCAL_BOOT="yes" + export LOCAL_BOOT="yes" fi #====================================== @@ -96,9 +97,13 @@ # initrd is going to be replaced by a later mkinitrd call # for unified systems the kiwi initrd is used and the # kernel parameters of this initrd defines the missing - # information + # information. Additionally the partition table is different + # for unified systems. Therefore we check if the second + # partition is a squashfs partition and change the root + # partition name accordingly # ---- if [ $LOCAL_BOOT = "no" ];then + Echo "Searching for disk and root partition" USBStickDevice if [ $stickFound = 0 ];then deviceFound=0 @@ -114,28 +119,39 @@ "Couldn't find any disk device... abort" \ "reboot" fi - deviceDisk=`echo $deviceRoot | tr -d [0-9]` - deviceSwap="$deviceDisk"2 - deviceHome="$deviceDisk"3 + export deviceDisk=`echo $deviceRoot | tr -d [0-9]` + export deviceSwap="$deviceDisk"2 + export deviceHome="$deviceDisk"3 else - deviceDisk=$stickRoot - deviceSwap="$deviceDisk"2 - deviceHome="$deviceDisk"3 + Echo "USB stick found, prefer root on stick" + export deviceDisk=$stickRoot + export deviceSwap="$deviceDisk"2 + export deviceHome="$deviceDisk"3 fi + probeFileSystem "$deviceDisk"2 + if test "$FSTYPE" = "squashfs";then + Echo "Unified system detected, adapting root partition" + export UNIONFS_CONFIG="$deviceDisk"3,"$deviceDisk"2,aufs + export deviceRoot="$deviceDisk"2 + export deviceSwap="$deviceDisk"4 + fi + Echo "Using root partition $deviceRoot on disk $deviceDisk" fi else # /.../ # installation mode: find a usable disk to install the image # on. The image is a virtual disk with one partition # ---- + Echo "Searching harddrive for installation" hwinfo="/usr/sbin/hwinfo --disk" - deviceDisk=`$hwinfo | grep "Device File:" | head -n 1 | cut -f2 -d:` - deviceDisk=`echo $deviceDisk` + export deviceDisk=`$hwinfo | grep "Device File:" | head -n 1 | cut -f2 -d:` + export deviceDisk=`echo $deviceDisk` if [ -z $deviceDisk ];then systemException \ "No hard disk found... abort" \ "reboot" fi + Echo "Entering installation mode for disk: $deviceDisk" fi #====================================== @@ -158,8 +174,9 @@ if test "$FSTYPE" = "squashfs";then export UNIONFS_CONFIG="$deviceDisk"3,"$deviceDisk"2,aufs fi + Echo "Try mounting installed system to check version" mountSystem $deviceRoot; updateNeeded - umount /mnt >/dev/null 2>&1 + umountSystem if test `getSystemIntegrity 1` = "fine";then Echo "Base system is up to date... reboot" /sbin/reboot -f -i >/dev/null 2>&1 @@ -223,7 +240,11 @@ #-------------------------------------- umount /cdrom #====================================== - # 6.6) find new root partition + # 6.6) reread partition table + #-------------------------------------- + blockdev --rereadpt $deviceDisk + #====================================== + # 6.7) find new root partition #-------------------------------------- deviceRoot="$deviceDisk"2 probeFileSystem $deviceRoot @@ -231,11 +252,12 @@ deviceRoot="$deviceDisk"1 probeFileSystem $deviceRoot fi + Echo "Filesystem of root system is: $FSTYPE -> $deviceRoot" if test "$FSTYPE" = "squashfs";then export UNIONFS_CONFIG="$deviceDisk"3,"$deviceDisk"2,aufs fi #====================================== - # 6.7) Create md5 version info file + # 6.8) Create md5 version info file #-------------------------------------- if ! mountSystem $deviceRoot;then systemException \ @@ -255,9 +277,9 @@ versionFile="/mnt/etc/ImageVersion-$atversion" md5sum=`getSystemMD5Status 1` echo "$atversion $md5sum" > $versionFile - umount /mnt + umountSystem #====================================== - # 6.8) reboot system + # 6.9) reboot system #-------------------------------------- if [ $stickFound = 0 ];then Echo "NOTE: Please remove the installation CD before reboot !" @@ -290,6 +312,7 @@ #-------------------------------------- mem_size=`grep MemTotal: /proc/meminfo | tr -dc '[0-9]'` swapsize=$(( $mem_size *2 / 1024 )) + Echo "Filesystem of root system is: $FSTYPE -> $deviceRoot" if ! test "$FSTYPE" = "squashfs";then #====================================== # 8.2 write new partition table @@ -336,9 +359,9 @@ #====================================== # 8.3 Update new device names #-------------------------------------- - deviceRoot="$deviceDisk"2 - deviceSwap="$deviceDisk"1 - deviceHome="$deviceDisk"3 + export deviceRoot="$deviceDisk"2 + export deviceSwap="$deviceDisk"1 + export deviceHome="$deviceDisk"3 #====================================== # 8.4 Activate swap space @@ -358,9 +381,15 @@ #====================================== # 8.2 calculate end block - swapspace #-------------------------------------- - swapblocks=$(( $swapsize * 1024 )) - diskblocks=`sfdisk -s $deviceDisk` - diskblocks=$(( $diskblocks - $swapblocks )) + swapXMBytes=$swapsize + diskXMBytes=`sfdisk -s $deviceDisk` + diskXMBytes=`expr $diskXMBytes / 1024` + disk1MBytes=`sfdisk -s "$deviceDisk"1` + disk1MBytes=`expr $disk1MBytes / 1024` + disk2MBytes=`sfdisk -s "$deviceDisk"2` + disk2MBytes=`expr $disk2MBytes / 1024` + disk3MBytes=`expr $diskXMBytes - $disk1MBytes - $disk2MBytes` + disk3MBytes=`expr $disk3MBytes - $swapXMBytes` #====================================== # 8.3 write new partition table #-------------------------------------- @@ -368,26 +397,26 @@ # Explanation of the fdisk commands used within the # here document below: # ---- - # d # delete xda partition - # 3 # [ 3 ] - # n # create xda partition at same place than xda3 - # p # primary - # 3 # [ 3 ] - # # accept old xda3 start block - # $diskblocks # accept new RW device size of disk blocks - swap - # n # create xda swap partition - # p # primary - # 4 # [ 4 ] - # # accept start block - # # accept end block - # t # change swap system id - # 4 # [ 4 ] - # 82 # Linux Swap - # w # write partition table + # d # delete xda partition + # 3 # [ 3 ] + # n # create xda partition at same place than xda3 + # p # primary + # 3 # [ 3 ] + # # accept old xda3 start block + # +"disk3MBytes"M # accept new RW device size of disk blocks - swap + # n # create xda swap partition + # p # primary + # 4 # [ 4 ] + # # accept start block + # # accept end block + # t # change swap system id + # 4 # [ 4 ] + # 82 # Linux Swap + # w # write partition table # ---- input=/part.input rm -f $input - for cmd in d 3 n p 3 . $diskblocks n p 4 . . t 4 82 w;do + for cmd in d 3 n p 3 . +"$disk3MBytes"M n p 4 . . t 4 82 w;do if [ $cmd = "." ];then echo >> $input continue @@ -401,8 +430,17 @@ #====================================== # 8.4 Update new device names #-------------------------------------- - deviceRoot="$deviceDisk"2 - deviceSwap="$deviceDisk"4 + export deviceBoot="$deviceDisk"1 + export deviceRoot="$deviceDisk"2 + export deviceSwap="$deviceDisk"4 + + #====================================== + # 8.5 Activate swap space + #-------------------------------------- + Echo "Activating swap space on $deviceSwap" + if ! mkswap $deviceSwap >/dev/null 2>&1;then + systemException "Failed to create swap signature" "reboot" + fi fi fi @@ -410,11 +448,11 @@ # 9) Resize filesystem to full space #-------------------------------------- if [ $LOCAL_BOOT = "no" ];then - Echo "Filesystem of root system is: $FSTYPE -> $deviceRoot" if test "$FSTYPE" = "squashfs";then - UNIONFS_CONFIG="$deviceDisk"3,"$deviceDisk"2,aufs + export UNIONFS_CONFIG="$deviceDisk"3,"$deviceDisk"2,aufs KIWI_INITRD_PARAMS="UNIONFS_CONFIG=\"$UNIONFS_CONFIG\"" KIWI_INITRD_PARAMS="$KIWI_INITRD_PARAMS deviceRoot=\"$deviceRoot\"" + export KIWI_INITRD_PARAMS else if test "$FSTYPE" = "reiserfs";then Echo "Resize Reiser filesystem to full partition space..." @@ -458,12 +496,16 @@ # 12) Create system dependant files #-------------------------------------- if [ $LOCAL_BOOT = "no" ];then - # a) /etc/fstab + # a) /etc/fstab... + #----------------- mkdir -p /config/etc cat > /config/etc/fstab < /dev/null if [ -z "$UNIONFS_CONFIG" ]; then - echo "$deviceRoot / $FSTYPE defaults 0 0" > /config/etc/fstab + echo "$deviceRoot / $FSTYPE defaults 0 0" > /config/etc/fstab echo "$deviceHome /home ext3 defaults 0 0" >> /config/etc/fstab + else + mkdir -p /config/kiwiboot + echo "$deviceBoot /kiwiboot ext2 defaults 0 0" >> /config/etc/fstab fi echo "$deviceSwap swap swap pri=42 0 0" >> /config/etc/fstab echo "devpts /dev/pts devpts mode=0620,gid=5 0 0" >> /config/etc/fstab @@ -472,43 +514,36 @@ echo "tmpfs /dev/shm tmpfs defaults 0 0" >> /config/etc/fstab # b) /boot/grub/menu.lst - console="" - gdev="(hd0,1)" - if [ ! -z "$UNIONFS_CONFIG" ]; then - gnum=`echo $deviceRoot | sed -e "s/\/dev.*\([0-9]\)/\\1/"` - gdev="(hd0,$gnum)" - fi - menu=/config/boot/grub/menu.lst - mkdir -p /config/boot/grub - echo "timeout 10" > $menu - if [ -f /image/loader/message ];then - echo "gfxmenu $gdev/boot/message" >> $menu - fi - IFS="," ; for i in $KERNEL_LIST;do - if test ! -z "$i";then - kernel=`echo $i | cut -f1 -d:` - initrd=`echo $i | cut -f2 -d:` - if [ ! -z "$UNIONFS_CONFIG" ]; then - kernel=linux.vmx - initrd=initrd.vmx - fi - echo "title SUSE Linux OEM ($kernel)" >> $menu - echo -n " kernel $gdev/boot/$kernel" >> $menu - if [ -z "$UNIONFS_CONFIG" ]; then + # ---------------------- + if [ -z "$UNIONFS_CONFIG" ]; then + console="" + gdev="(hd0,1)" + menu=/config/boot/grub/menu.lst + mkdir -p /config/boot/grub + echo "timeout 10" > $menu + if [ -f /image/loader/message ];then + echo "gfxmenu $gdev/boot/message" >> $menu + fi + IFS="," ; for i in $KERNEL_LIST;do + if test ! -z "$i";then + kernel=`echo $i | cut -f1 -d:` + initrd=`echo $i | cut -f2 -d:` + echo "title SUSE Linux OEM ($kernel)" >> $menu + echo -n " kernel $gdev/boot/$kernel" >> $menu echo -n " root=${deviceDisk}2 $console" >> $menu - else - echo -n " root=${deviceDisk}1 $console" >> $menu + echo " vga=0x314" >> $menu + echo " initrd $gdev/boot/$initrd" >> $menu fi - echo -n " vga=0x314" >> $menu - echo " $KIWI_INITRD_PARAMS" >> $menu - echo " initrd $gdev/boot/$initrd" >> $menu - fi - done + done + fi # c) /etc/grub.conf... - # ------------------------- + # -------------------- mkdir -p /config/etc gconf=/config/etc/grub.conf + if [ ! -z "$UNIONFS_CONFIG" ]; then + gdev="(hd0,0)" + fi echo -en "root $gdev\ninstall" > $gconf echo -n " --stage2=/boot/grub/stage2" >> $gconf echo -n " /boot/grub/stage1 d (hd0)" >> $gconf @@ -550,13 +585,11 @@ #====================================== # 16) copy initrd files to image #-------------------------------------- -if [ $LOCAL_BOOT = "no" ];then - if [ -f /image/loader/message ];then - mv /image/loader/message /mnt/boot - fi - cp /preinit /mnt - cp /include /mnt +if [ -f /image/loader/message ];then + mv /image/loader/message /mnt/boot fi +cp /preinit /mnt +cp /include /mnt #====================================== # 17) Start YaST when booting final sys diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/oemboot/suse-preinit new/kiwi/system/boot/oemboot/suse-preinit --- old/kiwi/system/boot/oemboot/suse-preinit 2007-09-14 15:17:36.000000000 +0200 +++ new/kiwi/system/boot/oemboot/suse-preinit 2007-09-19 18:45:59.000000000 +0200 @@ -29,7 +29,7 @@ #====================================== # 2) create initrd on diskful #-------------------------------------- -if test -z $KIWI_INITRD_PARAMS;then +if [ -z "$UNIONFS_CONFIG" ]; then if test -L /boot/boot;then mount -t proc proc /proc mount -t sysfs sysfs /sys @@ -40,6 +40,25 @@ Echo "Image doesn't provide kernel system map" Echo "Can't create initrd" fi +else + if mount $deviceBoot /kiwiboot;then + rm -rf /boot && ln -s /kiwiboot/boot /boot + console="" + gdev="(hd0,0)" + menu=/boot/grub/menu.lst + echo "timeout 10" > $menu + if [ -f /boot/message ];then + echo "gfxmenu $gdev/boot/message" >> $menu + fi + echo "title KIWI VM boot" >> $menu + echo -n " kernel $gdev/boot/linux.vmx" >> $menu + echo -n " root=${deviceDisk}1 $console" >> $menu + echo " $KIWI_INITRD_PARAMS vga=0x314" >> $menu + echo " initrd $gdev/boot/initrd.vmx" >> $menu + else + Echo "Failed to mount boot partition" + Echo "Local grub installation will fail !" + fi fi #====================================== ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org