Hello community,
here is the log from the commit of package kiwi
checked in at Thu Apr 26 01:08:33 CEST 2007.
--------
--- arch/i386/kiwi/kiwi.changes 2007-04-20 15:53:40.000000000 +0200
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2007-04-25 17:18:50.869291000 +0200
@@ -1,0 +2,12 @@
+Mon Apr 23 09:35:32 CEST 2007 - ms(a)suse.de
+
+- v1.29
+- added nfs root support to kiwi's netboot image
+- added --logfile terminal option which causes all data from kiwi
+ and its screen sessions to be logged on the calling terminal
+- don't create a 10GB default virtual disk in case of vmware and qemu
+ images. kiwi now calculates the size and provides the information
+ to the user. Overriding the calucaltion can still be done by using
+ the --bootvm-disksize option
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.a18591/_old 2007-04-26 01:05:21.000000000 +0200
+++ /var/tmp/diff_new_pack.a18591/_new 2007-04-26 01:05:21.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kiwi (Version 1.28)
+# spec file for package kiwi (Version 1.29)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -15,7 +15,7 @@
BuildRequires: module-init-tools perl perl-XML-LibXML perl-libwww-perl screen smart syslinux
Requires: perl perl-XML-LibXML perl-libwww-perl screen
Summary: OpenSuSE - KIWI Image System
-Version: 1.28
+Version: 1.29
Release: 1
Group: System/Management
License: GNU General Public License (GPL)
@@ -288,6 +288,15 @@
%{_datadir}/kiwi/image/xenboot
%changelog
+* Mon Apr 23 2007 - ms(a)suse.de
+- v1.29
+- added nfs root support to kiwi's netboot image
+- added --logfile terminal option which causes all data from kiwi
+ and its screen sessions to be logged on the calling terminal
+- don't create a 10GB default virtual disk in case of vmware and qemu
+ images. kiwi now calculates the size and provides the information
+ to the user. Overriding the calucaltion can still be done by using
+ the --bootvm-disksize option
* Fri Apr 20 2007 - ms(a)suse.de
- v1.28
- fixed depmod call, call it from within the chroot
++++++ kiwi.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/activate.tex new/kiwi/doc/activate.tex
--- old/kiwi/doc/activate.tex 2007-03-22 12:01:35.000000000 +0100
+++ new/kiwi/doc/activate.tex 2007-04-25 12:34:52.000000000 +0200
@@ -339,6 +339,25 @@
the tftpserver do a chroot into the tftp server path you need
to specify the initrd file as the following example shows:
\textbf{KIWI\_INITRD=/boot/<name-of-initrd-file>}
+ \item \textbf{UNIONFS\_CONFIG}\\
+ For netboot and usbboot images there is the possibility to
+ use unionfs or aufs as container filesystem in combination
+ with a compressed system image. The recommended compressed
+ filesystem type for the system image is \textbf{squashfs}.
+ In case of a usb-stick system the usbboot image will
+ automatically setup the unionfs/aufs filesystem. In case of
+ a PXE network image the netboot image requires a config.<MAC>
+ setup like the following example shows:
+ \textbf{UNIONFS\_CONFIG=/dev/sda3,/dev/sda2,aufs}. In this
+ example the first device /dev/sda3 represents the read/write
+ filesystem and the second device /dev/sda2 represents the
+ compressed system image filesystem. The container filesystem
+ aufs is then used to cover the read/write layer with the
+ read-only device to one read/write filesystem. If a file on
+ the read-only device is going to be written the changes inodes
+ are part of the read/write filesystem. Please note the device
+ specifications in UNIONFS\_CONFIG must correspond with
+ the partition information in PART.
\end{itemize}
%\newpage
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/deploy.tex new/kiwi/doc/deploy.tex
--- old/kiwi/doc/deploy.tex 2007-04-19 14:10:16.000000000 +0200
+++ new/kiwi/doc/deploy.tex 2007-04-25 12:38:19.000000000 +0200
@@ -41,7 +41,7 @@
to create it are as follows:
\begin{Command}{13cm}
- cd /usr/share/kiwi/image
+ cd /usr/share/kiwi/image\\
kiwi --prepare netboot/suse-10.2 --root /tmp/myroot\\
kiwi --create /tmp/myroot -d /tmp
\end{Command}
@@ -136,6 +136,31 @@
the user has to type the device name which hopefully increases the
chance not to do something thoughtlessly.
+\section{Installation on client via CD}
+If there is no network infrastructure available a client can only receive
+the system image from a storage media like a CD or an USB stick. This section
+explains how to create a CD with kiwi which supports system image
+installation to the storage device of the client. The following steps
+needs to be processed:
+\begin{enumerate}
+\item Create the boot image which takes over the task of installing the
+ system image. For that purpose kiwi provides the \textbf{isoinstboot}
+ boot image type.
+\item Next step is creating the system image which should make it on the
+ client. The boot and the system image package source should be the same.
+ The system image description requires a \textbf{deploy} section within
+ the config.xml file. The deploy section describes how the clients
+ storage device should be partitioned and which device is the root
+ device for the later image.
+\item Last step is to create an .iso file together with the boot- and
+ system image. Therefore call kiwi like the following example:
+ \textbf{kiwi --installcd bootImageName --installcd-system systemImageName}
+\end{enumerate}
+
+\section{Installation on client via USB stick}
+*** not yet implemented ***
+%TODO ..
+
\section{Split image system via PXE}
kiwi supports system images to be splitted into two parts, a read-only
part and a read-write part. This allows to put data on different
@@ -189,6 +214,37 @@
COMBINED_IMAGE=yes
\end{verbatim}
+\section{Via network using NFS mounted root system}
+In principal kiwi was designed to upload an image onto a client in different
+ways but out there you will find diskless machines as well. Those devices
+doesn't provide permanent storage and rely on the network. The most oft used
+process to activate such terminals is to NFS mount the system image via
+the network. kiwi supports that as well but it additionally requires a
+terminal server configuration which needs to export the system image using
+a NFS server. The following steps needs to be performed in order to activate
+a diskless station:
+\begin{enumerate}
+\item Prepare the system image using\\
+ \textbf{kiwi --root /tmp/kiwi.nfsroot --prepare ...}
+\item Setup a NFS server which exports the /tmp/kiwi.nfsroot path. The
+ following export options in /etc/exports are recommended:\\
+ \textbf{/tmp/kiwi.nfsroot *(rw,no\_root\_squash,sync,no\_subtree\_check)}
+\item Create an appropriate netboot boot image (initrd) with kiwi. Appropriate
+ means the package repository for the system image and the netboot image
+ must be the same
+\item Copy the boot image/kernel to the PXE server in /var/lib/tftpboot/boot
+ The package kiwi-pxeboot helps you in setting up the PXE/TFTP server
+\item Create a config.<MAC> file in /var/lib/tftpboot/KIWI with the following
+ contents:
+\begin{verbatim}
+NFSROOT=129.168.100.7;/tmp/kiwi.nfsroot
+\end{verbatim}
+\item Boot the client. If everything works the client will receive the boot
+ image and kernel via PXE/TFTP. The boot image NFS mounts the system image
+ according to the data in config.<MAC>. After that the mounted root filesystem
+ will be activated
+\end{enumerate}
+
\section{USB stick system}
A very popular method is storing complete operating systems on an USB
stick. This means not only the boot image and the kernel is stored on
Files old/kiwi/doc/kiwi.pdf and new/kiwi/doc/kiwi.pdf differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/Revision.txt new/kiwi/doc/Revision.txt
--- old/kiwi/doc/Revision.txt 2007-04-19 14:10:16.000000000 +0200
+++ new/kiwi/doc/Revision.txt 2007-04-25 12:34:52.000000000 +0200
@@ -1 +1 @@
-3.2
+3.3
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/kiwi.pl new/kiwi/kiwi.pl
--- old/kiwi/kiwi.pl 2007-04-19 16:32:45.000000000 +0200
+++ new/kiwi/kiwi.pl 2007-04-25 10:50:25.000000000 +0200
@@ -27,7 +27,7 @@
use KIWIImage;
use KIWIBoot;
-our $Version = "1.27";
+our $Version = "1.29";
our $System = "/usr/share/kiwi/image";
our $Scheme = "/usr/share/kiwi/modules/KIWIScheme.xsd";
our $KConfig = "/usr/share/kiwi/modules/KIWIConfig.sh";
@@ -87,6 +87,9 @@
# Setup logging location
#------------------------------------------
if (defined $LogFile) {
+ if ($LogFile eq "terminal") {
+ $LogFile = qx ( tty ); chomp $LogFile;
+ }
$kiwi -> info ("Setting log file to: $LogFile\n");
if (! $kiwi -> setLogFile ( $LogFile )) {
my $code = kiwiExit (1); return $code;
@@ -475,7 +478,7 @@
print " Strip shared objects and executables\n";
print " makes only sense in combination with --create\n";
print "\n";
- print " [ --logfile <filename> ]\n";
+ print " [ --logfile <filename> | terminal ]\n";
print " Write to the log file \`<filename>' instead of\n";
print " the terminal.\n";
print "--\n";
@@ -522,14 +525,16 @@
}
return $code;
}
- my $rootLog = $kiwi -> getRootLog();
- if (( -f $rootLog) && ($rootLog =~ /(.*)\/.*/)) {
- my $logfile = $1;
- $logfile =~ s/\/$//;
- $logfile = "$logfile.log";
- $kiwi -> info ("Logfile available at: $logfile");
- $kiwi -> done ();
- qx (mv $rootLog $logfile 2>&1);
+ if (! defined $LogFile) {
+ my $rootLog = $kiwi -> getRootLog();
+ if (( -f $rootLog) && ($rootLog =~ /(.*)\/.*/)) {
+ my $logfile = $1;
+ $logfile =~ s/\/$//;
+ $logfile = "$logfile.log";
+ $kiwi -> info ("Logfile available at: $logfile");
+ $kiwi -> done ();
+ qx (mv $rootLog $logfile 2>&1);
+ }
}
if ($code != 0) {
$kiwi -> error ("KIWI exited with error(s)");
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-04-19 14:10:16.000000000 +0200
+++ new/kiwi/modules/KIWIBoot.pm 2007-04-25 10:50:25.000000000 +0200
@@ -93,8 +93,20 @@
return undef;
}
if (! defined $vmsize) {
- $vmsize = "10G";
+ 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.1 * $vmsize; # and 10% free space
+ $vmsize = $vmsize + $sparesSize;
+ $vmsize = $vmsize / 1024 / 1024;
+ $vmsize = int $vmsize;
+ $vmsize = $vmsize."M";
+ $kiwi -> info ("Using computed virtual disk size of: $vmsize");
+ } else {
+ $kiwi -> info ("Using given virtual disk size of: $vmsize");
}
+ $kiwi -> done ();
chomp $tmpdir;
return $this;
}
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 2007-04-19 14:10:16.000000000 +0200
+++ new/kiwi/modules/KIWIConfigure.pm 2007-04-25 10:50:25.000000000 +0200
@@ -179,6 +179,7 @@
my $screenLogs = $kiwi -> getRootLog();
my $data;
my $code;
+ my $logs;
#==========================================
# Initiate screen call file
#------------------------------------------
@@ -225,15 +226,21 @@
$data = qx ( chmod 755 $screenCall );
$data = qx ( screen -L -D -m -c $screenCtrl chroot $root $file );
$code = $? >> 8;
- if (open (FD,$screenLogs)) {
- local $/; $data = <FD>; close FD;
+ $logs = 1;
+ if ($main::LogFile =~ /\/dev\//) {
+ $logs = 0;
}
- if ($code == 0) {
- if (! open (FD,"$screenCall.exit")) {
- $code = 1;
- } else {
- $code = <FD>; chomp $code;
- close FD;
+ if ($logs) {
+ if (open (FD,$screenLogs)) {
+ local $/; $data = <FD>; close FD;
+ }
+ if ($code == 0) {
+ if (! open (FD,"$screenCall.exit")) {
+ $code = 1;
+ } else {
+ $code = <FD>; chomp $code;
+ close FD;
+ }
}
}
qx ( rm -f $screenCall* );
@@ -243,7 +250,9 @@
#------------------------------------------
if ($code != 0) {
$kiwi -> failed ();
- $kiwi -> error ($data);
+ if ($logs) {
+ $kiwi -> error ($data);
+ }
return undef;
}
$kiwi -> done();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIImage.pm new/kiwi/modules/KIWIImage.pm
--- old/kiwi/modules/KIWIImage.pm 2007-04-20 15:48:45.000000000 +0200
+++ new/kiwi/modules/KIWIImage.pm 2007-04-25 10:50:25.000000000 +0200
@@ -76,7 +76,9 @@
$kiwi -> failed ();
return undef;
}
- $kiwi -> setRootLog ($imageTree."/screenrc.log");
+ if (! defined $main::LogFile) {
+ $kiwi -> setRootLog ($imageTree."/screenrc.log");
+ }
$arch = qx ( arch ); chomp ( $arch );
$arch = ".$arch";
return $this;
@@ -424,7 +426,6 @@
#------------------------------------------
$main::BootVMDisk = $main::Destination."/".$name->{bootImage}.".gz";
$main::BootVMSystem = $main::Destination."/".$name->{systemImage};
- $main::BootVMSize = $main::BootVMSize;
if (! defined main::main()) {
$main::Survive = "default";
return undef;
@@ -1343,7 +1344,7 @@
# Call depmod
#------------------------------------------
my $depmod = "/sbin/depmod";
- my @systemMaps = qx ( chroot $imageTree bash -c "ls -1 /boot/System.map*" );
+ my @systemMaps = qx ( chroot $imageTree bash -c "ls -1 /boot/System.map* 2>/dev/null" );
if ( @systemMaps ) {
$kiwi -> info ("Calculating kernel module dependencies...");
foreach my $systemMap (@systemMaps) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWILog.pm new/kiwi/modules/KIWILog.pm
--- old/kiwi/modules/KIWILog.pm 2007-04-19 14:10:16.000000000 +0200
+++ new/kiwi/modules/KIWILog.pm 2007-04-25 11:11:01.000000000 +0200
@@ -27,6 +27,7 @@
my @showLevel = (0,1,2,3,4,5);
my $channel = \*STDOUT;
my $errorOk = 0;
+my $fileLog;
my $rootLog;
my $logfile;
@@ -95,11 +96,15 @@
# ...
# This is the green "done" flag
# ---
- doStat();
- setOutputChannel();
- print "\033[1;32mdone\n";
- resetOutputChannel();
- doNorm();
+ if (! defined $fileLog) {
+ doStat();
+ setOutputChannel();
+ print "\033[1;32mdone\n";
+ resetOutputChannel();
+ doNorm();
+ } else {
+ print " done\n";
+ }
}
#==========================================
@@ -109,11 +114,15 @@
# ...
# This is the red "failed" flag
# ---
- doStat();
- setOutputChannel();
- print "\033[1;31mfailed\n";
- resetOutputChannel();
- doNorm();
+ if (! defined $fileLog) {
+ doStat();
+ setOutputChannel();
+ print "\033[1;31mfailed\n";
+ resetOutputChannel();
+ doNorm();
+ } else {
+ print " failed\n";
+ }
}
#==========================================
@@ -123,11 +132,15 @@
# ...
# This is the yellow "skipped" flag
# ---
- doStat();
- setOutputChannel();
- print "\033[1;33mskipped\n";
- resetOutputChannel();
- doNorm();
+ if (! defined $fileLog) {
+ doStat();
+ setOutputChannel();
+ print "\033[1;33mskipped\n";
+ resetOutputChannel();
+ doNorm();
+ } else {
+ print " skipped\n";
+ }
}
#==========================================
@@ -267,6 +280,9 @@
warning ( $this,"Couldn't open log channel: $!\n" );
return undef;
}
+ binmode(FD,':unix');
+ $fileLog = 1;
+ $rootLog = $file;
$logfile = \*FD;
$channel = \*FD;
return $this;
@@ -292,6 +308,7 @@
warning ( $this,"Couldn't open root log channel: $!\n" );
$errorOk = 0;
}
+ binmode(EFD,':unix');
done ();
$rootLog = $file;
$errorOk = 1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIManager.pm new/kiwi/modules/KIWIManager.pm
--- old/kiwi/modules/KIWIManager.pm 2007-04-19 14:10:16.000000000 +0200
+++ new/kiwi/modules/KIWIManager.pm 2007-04-25 10:50:25.000000000 +0200
@@ -371,6 +371,7 @@
my $screenLogs;
my $data;
my $code;
+ my $logs;
#==========================================
# screen files
#------------------------------------------
@@ -421,15 +422,21 @@
$data = qx ( chmod 755 $screenCall );
$data = qx ( screen -L -D -m -c $screenCtrl $screenCall );
$code = $? >> 8;
- if (open (FD,$screenLogs)) {
- local $/; $data = <FD>; close FD;
- }
- if ($code == 0) {
- if (! open (FD,"$screenCall.exit")) {
- $code = 1;
- } else {
- $code = <FD>; chomp $code;
- close FD;
+ $logs = 1;
+ if ($main::LogFile =~ /\/dev\//) {
+ $logs = 0;
+ }
+ if ($logs) {
+ if (open (FD,$screenLogs)) {
+ local $/; $data = <FD>; close FD;
+ }
+ if ($code == 0) {
+ if (! open (FD,"$screenCall.exit")) {
+ $code = 1;
+ } else {
+ $code = <FD>; chomp $code;
+ close FD;
+ }
}
}
qx ( rm -f $screenCall* );
@@ -439,7 +446,9 @@
#------------------------------------------
if ($code != 0) {
$kiwi -> failed ();
- $kiwi -> error ($data);
+ if ($logs) {
+ $kiwi -> error ($data);
+ }
return undef;
}
$kiwi -> done ();
@@ -461,6 +470,7 @@
my $screenLogs;
my $data;
my $code;
+ my $logs;
#==========================================
# screen files
#------------------------------------------
@@ -576,15 +586,21 @@
$data = qx ( chmod 755 $screenCall );
$data = qx ( screen -L -D -m -c $screenCtrl $screenCall );
$code = $? >> 8;
- if (open (FD,$screenLogs)) {
- local $/; $data = <FD>; close FD;
- }
- if ($code == 0) {
- if (! open (FD,"$screenCall.exit")) {
- $code = 1;
- } else {
- $code = <FD>; chomp $code;
- close FD;
+ $logs = 1;
+ if ($main::LogFile =~ /\/dev\//) {
+ $logs = 0;
+ }
+ if ($logs) {
+ if (open (FD,$screenLogs)) {
+ local $/; $data = <FD>; close FD;
+ }
+ if ($code == 0) {
+ if (! open (FD,"$screenCall.exit")) {
+ $code = 1;
+ } else {
+ $code = <FD>; chomp $code;
+ close FD;
+ }
}
}
qx ( rm -f $screenCall* );
@@ -594,7 +610,9 @@
#------------------------------------------
if ($code != 0) {
$kiwi -> failed ();
- $kiwi -> error ($data);
+ if ($logs) {
+ $kiwi -> error ($data);
+ }
resetInstallationSource();
return undef;
}
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-04-19 14:10:16.000000000 +0200
+++ new/kiwi/modules/KIWIRoot.pm 2007-04-25 10:50:25.000000000 +0200
@@ -162,8 +162,9 @@
#==========================================
# Set root log file
#------------------------------------------
- $kiwi -> setRootLog ($root."/screenrc.log");
-
+ if (! defined $main::LogFile) {
+ $kiwi -> setRootLog ($root."/screenrc.log");
+ }
#==========================================
# Get configured name of package manager
#------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.1/config.xml new/kiwi/system/boot/netboot/suse-10.1/config.xml
--- old/kiwi/system/boot/netboot/suse-10.1/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.1/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/scsi/*"/>
<file name="drivers/message/fusion/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.1-smp/config.xml new/kiwi/system/boot/netboot/suse-10.1-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-10.1-smp/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.1-smp/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/scsi/*"/>
<file name="drivers/message/fusion/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.2/config.xml new/kiwi/system/boot/netboot/suse-10.2/config.xml
--- old/kiwi/system/boot/netboot/suse-10.2/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.2/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/ata/*"/>
<file name="drivers/scsi/*"/>
@@ -34,7 +38,7 @@
</drivers>
<repository type="yast2" status="replaceable">
<source path="opensuse://10.2"/>
- <!--<source path="/image/dist/full-10.2-i386"/>-->
+ <!--<source path="/image/dist/full-10.2-i386"/>-->
</repository>
<packages type="image">
<package name="atftp"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.2-smp/config.xml new/kiwi/system/boot/netboot/suse-10.2-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-10.2-smp/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.2-smp/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/ata/*"/>
<file name="drivers/scsi/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.3/config.xml new/kiwi/system/boot/netboot/suse-10.3/config.xml
--- old/kiwi/system/boot/netboot/suse-10.3/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.3/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -30,6 +30,10 @@
<file name="fs/squashfs.ko"/>
<file name="fs/unionfs.ko"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/ata/*"/>
<file name="drivers/scsi/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.3-smp/config.xml new/kiwi/system/boot/netboot/suse-10.3-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-10.3-smp/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.3-smp/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -30,6 +30,10 @@
<file name="fs/squashfs.ko"/>
<file name="fs/unionfs.ko"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/ata/*"/>
<file name="drivers/scsi/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-linuxrc new/kiwi/system/boot/netboot/suse-linuxrc
--- old/kiwi/system/boot/netboot/suse-linuxrc 2007-04-05 16:01:51.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-linuxrc 2007-04-25 10:50:24.000000000 +0200
@@ -218,7 +218,7 @@
# 9) Is this a diskful station
#--------------------------------------
if [ $LOCAL_BOOT = "no" ];then
-if [ ! -z $PART ];then
+if [ ! -z "$PART" ] && [ -z "$NFSROOT" ];then
#======================================
# Check for installed system
#--------------------------------------
@@ -276,174 +276,190 @@
#======================================
# 10) Download network client image
#--------------------------------------
-count=0
-IFS="," ; for i in $IMAGE;do
- imageZipped="uncompressed"
- count=$(($count + 1))
- field=0
- IFS=";" ; for n in $i;do
- case $field in
- 0) imageDevice=$n ; field=1 ;;
- 1) imageName=$n ; field=2 ;;
- 2) imageVersion=$n; field=3 ;;
- 3) imageServer=$n ; field=4 ;;
- 4) imageBlkSize=$n; field=5 ;;
- 5) imageZipped=$n ;
- esac
- done
- if [ $count = 1 ];then
- imageRootDevice=$imageDevice
- imageRootName=$imageName
- fi
- if [ $count = 2 ];then
- imageNextRootDevice=$imageDevice
- fi
- if [ $LOCAL_BOOT = "yes" ];then
- continue
- fi
- if test `getSystemIntegrity $count` = "fine";then
- continue
- fi
- imageName="image/$imageName-$imageVersion"
- imageMD5s="$imageName.md5"
- [ -z "$imageServer" ] && imageServer=$TSERVER
- [ -z "$imageBlkSize" ] && imageBlkSize=8192
- while true;do
- # /.../
- # get image md5sum to be able to check for the size
- # requirements if we are loading into RAM
- # ---
- loadStatus=`atftp -g \
- -r $imageMD5s -l /etc/image.md5 $imageServer 2>&1`
- if ! loadOK "$loadStatus";then
- systemException \
- "Failed to load image MD5: $imageName -> no such image MD5" \
- "reboot"
- fi
- IFS=" "
- read sum1 blocks blocksize < /etc/image.md5
- if test -z $DISK;then
- if ! validateRAM;then
+if [ -z "$NFSROOT" ];then
+ count=0
+ IFS="," ; for i in $IMAGE;do
+ imageZipped="uncompressed"
+ count=$(($count + 1))
+ field=0
+ IFS=";" ; for n in $i;do
+ case $field in
+ 0) imageDevice=$n ; field=1 ;;
+ 1) imageName=$n ; field=2 ;;
+ 2) imageVersion=$n; field=3 ;;
+ 3) imageServer=$n ; field=4 ;;
+ 4) imageBlkSize=$n; field=5 ;;
+ 5) imageZipped=$n ;
+ esac
+ done
+ if [ $count = 1 ];then
+ imageRootDevice=$imageDevice
+ imageRootName=$imageName
+ fi
+ if [ $count = 2 ];then
+ imageNextRootDevice=$imageDevice
+ fi
+ if [ $LOCAL_BOOT = "yes" ];then
+ continue
+ fi
+ if test `getSystemIntegrity $count` = "fine";then
+ continue
+ fi
+ imageName="image/$imageName-$imageVersion"
+ imageMD5s="$imageName.md5"
+ [ -z "$imageServer" ] && imageServer=$TSERVER
+ [ -z "$imageBlkSize" ] && imageBlkSize=8192
+ while true;do
+ # /.../
+ # get image md5sum to be able to check for the size
+ # requirements if we are loading into RAM
+ # ---
+ loadStatus=`atftp -g \
+ -r $imageMD5s -l /etc/image.md5 $imageServer 2>&1`
+ if ! loadOK "$loadStatus";then
systemException \
- "Not enough RAM available for this image" \
+ "Failed to load image MD5: $imageName -> no such image MD5" \
"reboot"
fi
- else
- if ! validateSize;then
+ IFS=" "
+ read sum1 blocks blocksize < /etc/image.md5
+ if test -z $DISK;then
+ if ! validateRAM;then
+ systemException \
+ "Not enough RAM available for this image" \
+ "reboot"
+ fi
+ else
+ if ! validateSize;then
+ systemException \
+ "Not enough space available for this image" \
+ "reboot"
+ fi
+ fi
+ validateBlockSize
+ # /.../
+ # now load the image into the imageDevice
+ # ---
+ multicast="-m"
+ if test "$imageZipped" = "compressed"; then
+ Echo "Compressed image found: Disable multicast download"
+ multicast=""
+ test ! -p /dev/compressed_image && mkfifo /dev/compressed_image
+ cat /dev/compressed_image | gzip -d > $imageDevice 2>/dev/null &
+ imageDevice_orig=$imageDevice
+ imageName_orig=$imageName
+ imageDevice="/dev/compressed_image"
+ imageName="$imageName.gz"
+ fi
+ Echo "Loading $imageName [$imageDevice BS:$imageBlkSize Byte]..."
+ loadStatus=`atftp $multicast --option "blksize $imageBlkSize" -g \
+ -r $imageName -l $imageDevice $imageServer 2>&1`
+ if ! loadOK "$loadStatus";then
systemException \
- "Not enough space available for this image" \
+ "Failed to load image: $imageName -> no such image" \
"reboot"
fi
+ if test "$imageZipped" = "compressed"; then
+ imageDevice=$imageDevice_orig
+ imageName=$imageName_orig
+ fi
+ # /.../
+ # check the md5sum of the downloaded data records
+ # ----
+ Echo "Download complete, checking data..."
+ dd if=$imageDevice count=$blocks bs=$blocksize 2>/dev/null |\
+ md5sum - > /etc/ireal.md5
+ read sum2 dumy < /etc/ireal.md5
+ if test $sum1 = $sum2;then
+ Echo "Image checksum test: fine :-)"
+ break
+ fi
+ Echo "Image checksum test failed:"
+ Echo "Possible reasons:"
+ echo
+ Echo -b "1) Physical ethernet connection lost:"
+ Echo -b " please check cable"
+ echo
+ Echo -b "2) Data corruption while loading the image:"
+ Echo -b " will give it a new try..."
+ echo
+ Echo -b "3) wrong checksum file created for the image:"
+ Echo -b " check with the md5sum command if the image on the"
+ Echo -b " TFTP server provides the same md5 sum as included"
+ Echo -b " within the appropriate .md5 file for this image"
+ echo
+ if test -z $DISK;then
+ Echo -b "4) ramdisk size is too small for the image:"
+ Echo -b " check the ramdisk_size parameter of the PXE"
+ Echo -b " configuration file on the TFTP server"
+ else
+ Echo -b "4) partition size is too small for the image:"
+ Echo -b " check the PART line in the image config file on the"
+ Echo -b " TFTP server"
+ fi
+ echo
+ Echo "Retry to load image..."
+ sleep 15
+ done
+ echo $imageDevice | grep -q ram
+ haveDataInRam=$?
+ if test ! -z $DISK && test $haveDataInRam != 0;then
+ mountSystem $imageRootDevice
+ readFileSystem /mnt/image/config.xml
+ umountSystem
+ if test "$FSTYPE" = "reiserfs";then
+ Echo "Resize Reiser filesystem to full partition space..."
+ resize_reiserfs $imageDevice
+ INITRD_MODULES="$INITRD_MODULES reiserfs"
+ fi
+ if test "$FSTYPE" = "ext2";then
+ Echo "Checking EXT2 filesystem..."
+ e2fsck -f $imageDevice -y
+ Echo "Resize EXT2 filesystem to full partition space..."
+ resize2fs -F -p $imageDevice
+ Echo "Checking EXT2 filesystem..."
+ e2fsck -f $imageDevice -y
+ INITRD_MODULES="$INITRD_MODULES ext2"
+ fi
+ if test "$FSTYPE" = "ext3";then
+ Echo "Checking EXT3 filesystem..."
+ e2fsck -f $imageDevice -y
+ Echo "Resize EXT3 filesystem to full partition space..."
+ resize2fs -F -p $imageDevice
+ Echo "Adding EXT3 journal..."
+ tune2fs -j $imageDevice
+ Echo "Checking EXT3 filesystem..."
+ e2fsck -f $imageDevice -y
+ INITRD_MODULES="$INITRD_MODULES ext3"
+ fi
fi
- validateBlockSize
- # /.../
- # now load the image into the imageDevice
- # ---
- multicast="-m"
- if test "$imageZipped" = "compressed"; then
- Echo "Compressed image found: Disable multicast download"
- multicast=""
- test ! -p /dev/compressed_image && mkfifo /dev/compressed_image
- cat /dev/compressed_image | gzip -d > $imageDevice 2>/dev/null &
- imageDevice_orig=$imageDevice
- imageName_orig=$imageName
- imageDevice="/dev/compressed_image"
- imageName="$imageName.gz"
- fi
- Echo "Loading $imageName [$imageDevice BS:$imageBlkSize Byte]..."
- loadStatus=`atftp $multicast --option "blksize $imageBlkSize" -g \
- -r $imageName -l $imageDevice $imageServer 2>&1`
- if ! loadOK "$loadStatus";then
- systemException \
- "Failed to load image: $imageName -> no such image" \
- "reboot"
- fi
- if test "$imageZipped" = "compressed"; then
- imageDevice=$imageDevice_orig
- imageName=$imageName_orig
+ if test ! -z $DISK && test $haveDataInRam = 0;then
+ Echo "Including RAM device data to disk..."
+ RELOAD_CONFIG="yes"
+ mkdir -p /config
+ mountSystem
+ rm -rf /mnt/lost+found
+ cp -a /mnt/* /config && rm -f /mnt/*
+ umountSystem
fi
- # /.../
- # check the md5sum of the downloaded data records
- # ----
- Echo "Download complete, checking data..."
- dd if=$imageDevice count=$blocks bs=$blocksize 2>/dev/null |\
- md5sum - > /etc/ireal.md5
- read sum2 dumy < /etc/ireal.md5
- if test $sum1 = $sum2;then
- Echo "Image checksum test: fine :-)"
- break
- fi
- Echo "Image checksum test failed:"
- Echo "Possible reasons:"
- echo
- Echo -b "1) Physical ethernet connection lost:"
- Echo -b " please check cable"
- echo
- Echo -b "2) Data corruption while loading the image:"
- Echo -b " will give it a new try..."
- echo
- Echo -b "3) wrong checksum file created for the image:"
- Echo -b " check with the md5sum command if the image on the"
- Echo -b " TFTP server provides the same md5 sum as included"
- Echo -b " within the appropriate .md5 file for this image"
- echo
- if test -z $DISK;then
- Echo -b "4) ramdisk size is too small for the image:"
- Echo -b " check the ramdisk_size parameter of the PXE"
- Echo -b " configuration file on the TFTP server"
- else
- Echo -b "4) partition size is too small for the image:"
- Echo -b " check the PART line in the image config file on the"
- Echo -b " TFTP server"
- fi
- echo
- Echo "Retry to load image..."
- sleep 15
+ rm -f /etc/ireal.md5
+ rm -f /etc/image.md5
done
- echo $imageDevice | grep -q ram
- haveDataInRam=$?
- if test ! -z $DISK && test $haveDataInRam != 0;then
- mountSystem $imageRootDevice
- readFileSystem /mnt/image/config.xml
- umountSystem
- if test "$FSTYPE" = "reiserfs";then
- Echo "Resize Reiser filesystem to full partition space..."
- resize_reiserfs $imageDevice
- INITRD_MODULES="$INITRD_MODULES reiserfs"
- fi
- if test "$FSTYPE" = "ext2";then
- Echo "Checking EXT2 filesystem..."
- e2fsck -f $imageDevice -y
- Echo "Resize EXT2 filesystem to full partition space..."
- resize2fs -F -p $imageDevice
- Echo "Checking EXT2 filesystem..."
- e2fsck -f $imageDevice -y
- INITRD_MODULES="$INITRD_MODULES ext2"
- fi
- if test "$FSTYPE" = "ext3";then
- Echo "Checking EXT3 filesystem..."
- e2fsck -f $imageDevice -y
- Echo "Resize EXT3 filesystem to full partition space..."
- resize2fs -F -p $imageDevice
- Echo "Adding EXT3 journal..."
- tune2fs -j $imageDevice
- Echo "Checking EXT3 filesystem..."
- e2fsck -f $imageDevice -y
- INITRD_MODULES="$INITRD_MODULES ext3"
- fi
- fi
- if test ! -z $DISK && test $haveDataInRam = 0;then
- Echo "Including RAM device data to disk..."
- RELOAD_CONFIG="yes"
- mkdir -p /config
- mountSystem
- rm -rf /mnt/lost+found
- cp -a /mnt/* /config && rm -f /mnt/*
- umountSystem
- fi
- rm -f /etc/ireal.md5
- rm -f /etc/image.md5
-done
+else
+ IFS="," ; for i in $NFSROOT;do
+ field=0
+ IFS=";" ; for n in $i;do
+ case $field in
+ 0) nfsRootServer=$n ; field=1 ;;
+ 1) nfsRootDevice=$n ; field=2
+ esac
+ done
+ Echo "Mounting NFS root system: $nfsRootServer:$nfsRootDevice..."
+ imageRootDevice="-o nolock,rw $nfsRootServer:$nfsRootDevice"
+ imageRootName="NFSRoot-System"
+ systemIntegrity="clean"
+ done
+fi
#======================================
# 11) Check for RELOAD_CONFIG
@@ -515,7 +531,7 @@
#======================================
# 14) send DHCP_RELEASE, reset cache
#--------------------------------------
-if [ $LOCAL_BOOT = "no" ];then
+if [ $LOCAL_BOOT = "no" ] && [ -z "$NFSROOT" ];then
if test $systemIntegrity = "clean";then
dhcpcd -k
fi
@@ -524,7 +540,7 @@
#======================================
# 15) Check if this is a split image
#--------------------------------------
-if test ! -z $COMBINED_IMAGE; then
+if [ ! -z "$COMBINED_IMAGE" ] && [ -z "$NFSROOT" ]; then
READ_ONLY_SYSTEM=system
mkdir -p /mnt/$READ_ONLY_SYSTEM && \
mount $imageNextRootDevice /mnt/$READ_ONLY_SYSTEM
@@ -546,7 +562,7 @@
fi
#======================================
-# 17) make kernel/initrd available on unionfs
+# 17) make initrd available on unionfs
#--------------------------------------
if [ $LOCAL_BOOT = "no" ];then
if test ! -z "$UNIONFS_CONFIG" && test $systemIntegrity = "clean";then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-preinit new/kiwi/system/boot/netboot/suse-preinit
--- old/kiwi/system/boot/netboot/suse-preinit 2007-03-21 16:34:02.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-preinit 2007-04-25 12:34:52.000000000 +0200
@@ -109,3 +109,13 @@
fi
done
fi
+
+#======================================
+# 7) setup network for nfs boot
+#--------------------------------------
+if test ! -z $NFSROOT;then
+ mount -o nolock -t proc proc /proc
+ mount -o nolock -t sysfs sysfs /sys
+ mount -o nolock -t devpts devpts /dev/pts
+ /etc/init.d/portmap start
+fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-SLED10/config.xml new/kiwi/system/boot/netboot/suse-SLED10/config.xml
--- old/kiwi/system/boot/netboot/suse-SLED10/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-SLED10/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/scsi/*"/>
<file name="drivers/message/fusion/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml new/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml
--- old/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml 2007-04-19 14:10:15.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/ata/*"/>
<file name="drivers/scsi/*"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml new/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml 2007-04-19 14:10:14.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml 2007-04-25 10:50:24.000000000 +0200
@@ -26,6 +26,10 @@
<file name="fs/fat/*"/>
<file name="fs/vfat/*"/>
<file name="fs/reiserfs/*"/>
+ <file name="fs/nfs/*"/>
+ <file name="net/sunrpc/*"/>
+ <file name="fs/lockd/*"/>
+ <file name="fs/nfs_common/*"/>
<file name="net/ipv6/*"/>
<file name="drivers/ata/*"/>
<file name="drivers/scsi/*"/>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org