openSUSE 12.1 - PXE Boot / diskless NFSROOT

1,266 views
Skip to first unread message

sven

unread,
Mar 15, 2012, 4:53:54 AM3/15/12
to kiwi, sfrie...@circular.de
Hi everyone,

i'm struggling with the setup on opensuse pxe clients.
Short summary on the involved parts..

* one SLES11SP2 x64 Server
* openSUSE 12.1 x86/x64 diskless Clients via PXE Boot and NFSROOT
* KIWI v5.02.18 (repo: http://download.opensuse.org/repositories/Virtualization:/Appliances/SLE_11/)

I just want to build two read-only NFSROOT directories to boot up
suse-12.1 x86 and x64 clients.
Seperate NFS Shares as overlay filesystem for individual client
configs and runtime files like "/etc", /var" and "/tmp".
Homedir via autofs4.

I'v tried to build the bootstrap NFSROOT directories and installed all
necessary suse-patterns (base, enhanced_base, fonts, kde4...).
A fresh bootstrap installation fails on these packages..

* gio-branding-openSUSE-12.1: rpm preinstall scripts fails, because "/
usr/bin/glib-compile-schemas" (rpm: glib2-tools) was missing.
zypper wants to install gio-branding-openSUSE-12.1 in front of glib2-
tools. just a dependency problem.

* suspend: rpm preinstall scrips fails, because the "sysfs" entry
doesn't exist in "/etc/fstab".

At the end i've installed a minimal bootstrap environment and got it
working with pxe boot and nfsroot.

Next step is to update the bootstrap environment with kernel update
and package updates.

Is it possible to build the pxe kernel and initrd files on these base
without modifications on the nfsroot?

Marcus Schäfer

unread,
Mar 15, 2012, 5:07:32 AM3/15/12
to kiwi-...@googlegroups.com, sfrie...@circular.de
Hi,

> I'v tried to build the bootstrap NFSROOT directories and installed all
> necessary suse-patterns (base, enhanced_base, fonts, kde4...).
> A fresh bootstrap installation fails on these packages..
>
> * gio-branding-openSUSE-12.1: rpm preinstall scripts fails, because "/
> usr/bin/glib-compile-schemas" (rpm: glib2-tools) was missing.
> zypper wants to install gio-branding-openSUSE-12.1 in front of glib2-
> tools. just a dependency problem.
>
> * suspend: rpm preinstall scrips fails, because the "sysfs" entry
> doesn't exist in "/etc/fstab".

Sounds like packaging bugs. I had a similar one for atftp which did
not create the tftp user correctly. I think a package script should
not look into fstab, and if it does it should print only a warning
but not make this a fatal error

> At the end i've installed a minimal bootstrap environment and got it
> working with pxe boot and nfsroot.

ok

> Next step is to update the bootstrap environment with kernel update
> and package updates.
>
> Is it possible to build the pxe kernel and initrd files on these base
> without modifications on the nfsroot?

kiwi builds the initrd and kernel as separate step from the specifed
repo setup. It does not build that from the root source of your
nfs root. So I think the answer is yes. In order to build that you
can call:

kiwi --build /usr/share/kiwi/image/netboot/suse-12.1 -d /some/destdir \
--set-repo ...

If you don't set the repo the default is "obs://12.1/repo/oss"
If you build the initrd and kernel in such a step it is of course
important that your nfs root tree is consistent with the kernel
in the initrd.

Regards,
Marcus
--
Public Key available
gpg --keyserver gpg-keyserver.de --recv-keys 0xCCE3C6A2
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE LINUX Products GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
GF: Jeff Hawn,Jennifer Guild, Felix Imendörffer
HRB: 21284 (AG Nürnberg) Germany
http://www.suse.de
-------------------------------------------------------

sven

unread,
Mar 15, 2012, 5:37:56 AM3/15/12
to kiwi
Okay, let's start from scratch..

First step build bootstrap dir..

# kiwi -p /root/kiwi/netboot/suse-12.1 --root /pxeboot/nfs/
opensuse12.1_x64/root/
Mar-15 10:20:16 <1> : Reading image description [Prepare]...
Mar-15 10:20:16 <1> : Set root log: /pxeboot/nfs/opensuse12.1_x64/
root/.
23986.screenrc.log...
done
Mar-15 10:20:16 <1> : Setting up package manager:
zypper
done
Mar-15 10:20:16 <1> : Creating default template files for new root
system
done
Mar-15 10:20:16 <1> : Importing build
keys...
done
Mar-15 10:20:17 <1> : Adding bootstrap zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
x86_64.iso
done
Mar-15 10:20:17 <1> : --> Set priority to:
95
done
Mar-15 10:20:17 <1> : Adding bootstrap zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
i586.iso
done
Mar-15 10:20:17 <1> : --> Set priority to:
95
done
Mar-15 10:20:17 <1> : Initializing image system on: /pxeboot/nfs/
opensuse12.1_x64/
root/...
done
Mar-15 10:20:37 <1> : Mounting required file
systems
done
Mar-15 10:20:37 <1> : Mounting local channel: tmp_kiwimount-
openSUSE-12.1-DVD-
x86_64.iso
done
Mar-15 10:20:37 <1> : Mounting local channel: tmp_kiwimount-
openSUSE-12.1-DVD-
i586.iso
done
Mar-15 10:20:37 <1> : Updating chroot zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
x86_64.iso
done
Mar-15 10:20:37 <1> : --> Set priority to:
95
done
Mar-15 10:20:37 <1> : Updating chroot zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
i586.iso
done
Mar-15 10:20:37 <1> : --> Set priority to:
95
done
Mar-15 10:20:37 <1> : Installing image
packages...
done
Mar-15 10:20:38 <1> : Copying user defined files to image
tree
done
Mar-15 10:20:38 <1> : Create .profile for package
scripts
done
Mar-15 10:20:38 <1> : Setting up
linuxrc...
done
Mar-15 10:20:38 <1> : Modifying user: root
[root]
done
Mar-15 10:20:38 <1> : Setting owner/group permissions root
[root]
done
Mar-15 10:20:38 <1> : Calling image script:
config.sh
done
Mar-15 10:20:39 <1> : Cleanup temporary copy of
resolv.conf
done
Mar-15 10:20:39 <1> : Cleanup temporary copy of
hosts
done
Mar-15 10:20:39 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-x86_64.iso
Mar-15 10:20:39 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-i586.iso
Mar-15 10:20:40 <1> : KIWI exited
successfully
done
Mar-15 10:20:40 <1> : Complete logfile at: /pxeboot/nfs/
opensuse12.1_x64/
root/.log
done
Mar-15 10:20:40 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-x86_64.iso
Mar-15 10:20:40 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-i586.iso
#

Second step, build kernel/initrd files..

# kiwi --build /root/kiwi/netboot/suse-12.1 -d /pxeboot/nfs/
opensuse12.1_x64/pxe --type pxe
Mar-15 10:28:14 <1> : Reading image description [Prepare]...
Mar-15 10:28:14 <1> : Set root log: /pxeboot/nfs/opensuse12.1_x64/pxe/
build/image-root.
26924.screenrc.log...
done
Mar-15 10:28:14 <1> : Setting up package manager:
zypper
done
Mar-15 10:28:14 <1> : Creating default template files for new root
system
done
Mar-15 10:28:14 <1> : Importing build
keys...
done
Mar-15 10:28:14 <1> : Adding bootstrap zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
x86_64.iso
done
Mar-15 10:28:14 <1> : --> Set priority to:
95
done
Mar-15 10:28:14 <1> : Adding bootstrap zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
i586.iso
done
Mar-15 10:28:14 <1> : --> Set priority to:
95
done
Mar-15 10:28:14 <1> : Initializing image system on: /pxeboot/nfs/
opensuse12.1_x64/pxe/build/image-
root...
done
Mar-15 10:28:35 <1> : Mounting required file
systems
done
Mar-15 10:28:35 <1> : Mounting local channel: tmp_kiwimount-
openSUSE-12.1-DVD-
x86_64.iso
done
Mar-15 10:28:35 <1> : Mounting local channel: tmp_kiwimount-
openSUSE-12.1-DVD-
i586.iso
done
Mar-15 10:28:35 <1> : Updating chroot zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
x86_64.iso
done
Mar-15 10:28:35 <1> : --> Set priority to:
95
done
Mar-15 10:28:35 <1> : Updating chroot zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-
i586.iso
done
Mar-15 10:28:35 <1> : --> Set priority to:
95
done
Mar-15 10:28:35 <1> : Installing image
packages...
done
Mar-15 10:28:36 <1> : Copying user defined files to image
tree
done
Mar-15 10:28:36 <1> : Create .profile for package
scripts
done
Mar-15 10:28:36 <1> : Setting up
linuxrc...
done
Mar-15 10:28:36 <1> : Modifying user: root
[root]
done
Mar-15 10:28:36 <1> : Setting owner/group permissions root
[root]
done
Mar-15 10:28:36 <1> : Calling image script:
config.sh
done
Mar-15 10:28:37 <1> : Cleanup temporary copy of
resolv.conf
done
Mar-15 10:28:37 <1> : Cleanup temporary copy of
hosts
done
Mar-15 10:28:37 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-x86_64.iso
Mar-15 10:28:37 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-i586.iso
Mar-15 10:28:37 <1> : Description provides no MD5 hash, check
Mar-15 10:28:37 <1> : Reading image description [Create]...
Mar-15 10:28:37 <1> : Updating type in .profile
environment
done
Mar-15 10:28:37 <1> : Calling image script:
images.sh
done
Mar-15 10:28:40 <1> : Image requires 291M, got
291M
done
Mar-15 10:28:40 <1> : Suggested Image size:
291M
done
Mar-15 10:28:40 <1> : Copying physical to logical [image-
root]...
done
Mar-15 10:28:41 <1> : Checking file system:
clicfs...
done
Mar-15 10:28:41 <3> : Failed to resize ext3 container: resize2fs
1.41.9 (22-Aug-2009)
resize2fs: No space left on device while trying to resize /pxeboot/nfs/
opensuse12.1_x64/pxe/fsdata.ext3
Please run 'e2fsck -fy /pxeboot/nfs/opensuse12.1_x64/pxe/fsdata.ext3'
to fix the filesystem
after the aborted resize operation.
Resizing the filesystem on /pxeboot/nfs/opensuse12.1_x64/pxe/
fsdata.ext3 to 147549 (1k) blocks.

failed
[*** log excerpt follows, last significant bytes ***]
/.kconfig: line 927: rm: command not found
/.kconfig: line 931: rm: command not found
/.kconfig: line 932: rm: command not found
/.kconfig: line 937: rm: command not found
/.kconfig: line 937: rm: command not found
/.kconfig: line 937: rm: command not found
/.kconfig: line 937: rm: command not found
done
Mar-15 10:28:40 <1> : EXEC [umount /pxeboot/nfs/opensuse12.1_x64/pxe//
proc/sys/fs/binfmt_misc 2>&1]
Mar-15 10:28:40 <1> : EXEC [umount /pxeboot/nfs/opensuse12.1_x64/pxe//
proc 2>&1]
Mar-15 10:28:40 <1> : EXEC [umount /pxeboot/nfs/opensuse12.1_x64/pxe//
dev/pts 2>&1]
Mar-15 10:28:40 <1> : EXEC [umount /pxeboot/nfs/opensuse12.1_x64/pxe//
sys 2>&1]
Mar-15 10:28:40 <1> : EXEC [find /pxeboot/nfs/opensuse12.1_x64/pxe/
build/image-root | wc -l]
Mar-15 10:28:40 <1> : EXEC [du -s --block-size=1 /pxeboot/nfs/
opensuse12.1_x64/pxe/build/image-root | cut -f1]
Mar-15 10:28:40 <1> : getSize: files: 6007
Mar-15 10:28:40 <1> : getSize: usage: 140677120 Bytes
Mar-15 10:28:40 <1> : getSize: inode: 256 Bytes
Mar-15 10:28:40 <1> : getSize: minsz: 304881152 Bytes
Mar-15 10:28:40 <1> : Image requires 291M, got 291M
done
Mar-15 10:28:40 <1> : Suggested Image size: 291M
done
Mar-15 10:28:40 <1> : EXEC [dd if=/dev/zero of=/pxeboot/nfs/
opensuse12.1_x64/pxe/initrd-netboot-suse-12.1.x86_64-2.1.1 bs=1
seek=304087040 count=1 2>&1]
Mar-15 10:28:40 <1> : EXEC [mkfs.ext3 -i 16384 -F -O resize_inode -N
12014 /pxeboot/nfs/opensuse12.1_x64/pxe/initrd-netboot-
suse-12.1.x86_64-2.1.1 2>&1]
Mar-15 10:28:40 <1> : EXEC [cd /pxeboot/nfs/opensuse12.1_x64/pxe &&
ln -vs initrd-netboot-suse-12.1.x86_64-2.1.1 initrd-netboot-
suse-12.1.x86_64-2.1.1.ext3 2>&1]
Mar-15 10:28:40 <1> : `initrd-netboot-suse-12.1.x86_64-2.1.1.ext3' ->
`initrd-netboot-suse-12.1.x86_64-2.1.1'
Mar-15 10:28:40 <1> : EXEC [/sbin/blkid -c /dev/null -s TYPE -o
value /pxeboot/nfs/opensuse12.1_x64/pxe/initrd-netboot-
suse-12.1.x86_64-2.1.1]
Mar-15 10:28:40 <1> : EXEC [mount -o loop /pxeboot/nfs/
opensuse12.1_x64/pxe/initrd-netboot-suse-12.1.x86_64-2.1.1 /pxeboot/
nfs/opensuse12.1_x64/pxe/mnt-26924 2>&1]
Mar-15 10:28:40 <1> : Copying physical to logical [image-root]...
Mar-15 10:28:40 <1> : EXEC [df -h /pxeboot/nfs/opensuse12.1_x64/pxe/
mnt-26924 2>&1]
Mar-15 10:28:40 <1> : getSize: mount: Filesystem Size Used
Avail Use% Mounted on
/dev/loop0 289M 11M 264M 4% /pxeboot/nfs/opensuse12.1_x64/
pxe/mnt-26924

Mar-15 10:28:40 <1> : EXEC [rsync -aHXA --one-file-system /pxeboot/
nfs/opensuse12.1_x64/pxe/build/image-root/ /pxeboot/nfs/
opensuse12.1_x64/pxe/mnt-26924 2>&1]
done
Mar-15 10:28:41 <1> : EXEC [umount /pxeboot/nfs/opensuse12.1_x64/pxe/
mnt-26924 2>&1]
Mar-15 10:28:41 <1> : Checking file system: clicfs...
Mar-15 10:28:41 <1> : EXEC [/sbin/fsck.ext3 -f -y /pxeboot/nfs/
opensuse12.1_x64/pxe/initrd-netboot-suse-12.1.x86_64-2.1.1 2>&1]
Mar-15 10:28:41 <1> : EXEC [/sbin/tune2fs -j /pxeboot/nfs/
opensuse12.1_x64/pxe/initrd-netboot-suse-12.1.x86_64-2.1.1 2>&1]
done
Mar-15 10:28:41 <1> : EXEC [mv /pxeboot/nfs/opensuse12.1_x64/pxe/
initrd-netboot-suse-12.1.x86_64-2.1.1 /pxeboot/nfs/opensuse12.1_x64/
pxe/fsdata.ext3 2>&1]
Mar-15 10:28:41 <1> : EXEC [resize2fs --version 2>&1 | head -n 1 |
cut -f2 -d ' ' | cut -f1-2 -d.]
Mar-15 10:28:41 <1> : Using resize2fs version: 1.41
Mar-15 10:28:41 <1> : EXEC [resize2fs /pxeboot/nfs/opensuse12.1_x64/
pxe/fsdata.ext3 -M 2>&1]
Mar-15 10:28:41 <3> : Failed to resize ext3 container: resize2fs
1.41.9 (22-Aug-2009)
resize2fs: No space left on device while trying to resize /pxeboot/
nfs/opensuse12.1_x64/pxe/fsdata.ext3
Please run 'e2fsck -fy /pxeboot/nfs/opensuse12.1_x64/pxe/fsdata.ext3'
to fix the filesystem
after the aborted resize operation.
Resizing the filesystem on /pxeboot/nfs/opensuse12.1_x64/pxe/
fsdata.ext3 to 147549 (1k) blocks.
failed
[*** end ***]
Mar-15 10:28:42 <3> : KIWI exited with
error(s)
done
Mar-15 10:28:42 <1> : Complete logfile at: /pxeboot/nfs/
opensuse12.1_x64/pxe/build/image-
root.log
done
Mar-15 10:28:42 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-x86_64.iso
Mar-15 10:28:42 <1> : Removing zypper service: tmp_kiwimount-
openSUSE-12.1-DVD-i586.iso
#


Calling /images/images.sh messed up the kernel and removed a lot of
import binaries, e.g. /bin/rm.

So i installed the bootstrap again and started images.sh manuell to
dig into the shell functions.

# chroot /pxeboot/nfs/opensuse12.1_x64/root /image/images.sh -x
(..)
Configure image: [initrd-netboot-suse-12.1]...
+ suseStripKernel
+ local 'ifss=
'
+ local kversion
+ local i
+ local d
+ local mod
+ local stripdir
+ local kdata
+ for kversion in '/lib/modules/*'
+ IFS='
'
+ '[' '!' -d /lib/modules/3.1.0-1.2-default ']'
+ '[' -x /bin/rpm ']'
++ rpm -qf /lib/modules/3.1.0-1.2-default
+ kdata=kernel-default-3.1.0-1.2.1.x86_64
+ for p in '$kdata'
+ '[' '!' 0 = 0 ']'
+ echo kernel-default-3.1.0-1.2.1.x86_64
+ grep -q '\-kmp\-'
+ echo kernel-default-3.1.0-1.2.1.x86_64
+ grep -q '\-source\-'
++ /usr/bin/basename /lib/modules/3.1.0-1.2-default
+ VERSION=3.1.0-1.2-default
+ echo 'Stripping kernel kernel-default-3.1.0-1.2.1.x86_64: Image
[initrd-netboot-suse-12.1]...'
Stripping kernel kernel-default-3.1.0-1.2.1.x86_64: Image [initrd-
netboot-suse-12.1]...
+ '[' '!' -f /boot/System.map-3.1.0-1.2-default ']'
+ /sbin/depmod -F /boot/System.map-3.1.0-1.2-default 3.1.0-1.2-default
+ '[' -f /lib/modules/3.1.0-1.2-default/modules.order ']'
+ mv /lib/modules/3.1.0-1.2-default/modules.order /tmp
+ '[' -d /lib/modules/3.1.0-1.2-default/updates ']'
+ '[' -d /lib/modules/3.1.0-1.2-default/weak-updates ']'
+ stripdir=/tmp/stripped_modules
+ IFS=,
+ IFS='
'
++ find /tmp/stripped_modules -name '*.ko'
find: `/tmp/stripped_modules': No such file or directory
+ rm -rf /lib/modules/3.1.0-1.2-default
+ mv -v /tmp/stripped_modules//lib/modules/3.1.0-1.2-default /lib/
modules/3.1.0-1.2-default
mv: cannot stat `/tmp/stripped_modules//lib/modules/3.1.0-1.2-
default': No such file or directory
+ rm -rf /tmp/stripped_modules
+ '[' -f /tmp/modules.order ']'
+ mv /tmp/modules.order /lib/modules/3.1.0-1.2-default
+ '[' -d /tmp/updates ']'
+ '[' -d /tmp/weak-updates ']'
+ /sbin/depmod -F /boot/System.map-3.1.0-1.2-default 3.1.0-1.2-default
WARNING: Couldn't open directory /lib/modules/3.1.0-1.2-default: Not a
directory
FATAL: Could not open '/lib/modules/3.1.0-1.2-default/modules.order':
Not a directory
+ pushd /boot
/boot /
+ '[' -f uImage-3.1.0-1.2-default ']'
+ '[' -f vmlinux-3.1.0-1.2-default.gz ']'
+ mv vmlinux-3.1.0-1.2-default.gz vmlinux.gz
+ mv vmlinuz-3.1.0-1.2-default vmlinuz
+ popd
/
+ suseStripModules
(..)




My configs...


/root/kiwi/netboot/suse-12.1/config.xml:
<?xml version="1.0" encoding="utf-8"?>
<image schemaversion="5.3" name="initrd-netboot-suse-12.1">
        <description type="boot">
                <author>Marcus Schaefer</author>
                <contact>m...@novell.com</contact>
                <specification>boot/initrd image used for PXE</
specification>
        </description>
        <preferences>
                <type boot="netboot/suse-12.1" image="pxe"
filesystem="clicfs" bootprofile="default" bootkernel="default"/>
                <!--type boot="netboot/suse-12.1" image="cpio"
bootprofile="default" bootkernel="default"/-->
                <version>2.1.1</version>
                <packagemanager>zypper</packagemanager>
                <rpm-check-signatures>false</rpm-check-signatures>
        </preferences>
        <profiles>
                <profile name="default" description="Booting diskless
thin clients"/>
        </profiles>
        <users group="root">
                <user home="/root" name="root" pwd="" />
        </users>
        <drivers type="drivers" profiles="default">
                <file name="crypto/*"/>
                <file name="drivers/block/aoe/aoe.ko"/>
                <file name="drivers/block/brd.ko"/>
                <file name="drivers/block/loop.ko"/>
                <file name="drivers/block/nbd.ko"/>
                <file name="drivers/gpu/drm/i915/i915.ko"/>
                <file name="drivers/gpu/drm/nouveau/nouveau.ko"/>
                <file name="drivers/gpu/drm/radeon/radeon.ko"/>
                <file name="drivers/ide/*"/>
                <file name="drivers/md/*"/>
                <file name="drivers/message/fusion/*"/>
                <file name="drivers/net/3c59x.ko"/>
                <file name="drivers/net/8139cp.ko"/>
                <file name="drivers/net/8139too.ko"/>
                <file name="drivers/net/8390.ko"/>
                <file name="drivers/net/atlx/atl2.ko"/>
                <file name="drivers/net/b44.ko"/>
                <file name="drivers/net/bnx2.ko"/>
                <file name="drivers/net/defxx.ko"/>
                <file name="drivers/net/dl2k.ko"/>
                <file name="drivers/net/e100.ko"/>
                <file name="drivers/net/e1000/*"/>
                <file name="drivers/net/epic100.ko"/>
                <file name="drivers/net/eql.ko"/>
                <file name="drivers/net/fealnx.ko"/>
                <file name="drivers/net/forcedeth.ko"/>
                <file name="drivers/net/hp100.ko"/>
                <file name="drivers/net/mii.ko"/>
                <file name="drivers/net/myri10ge"/>
                <file name="drivers/net/natsemi.ko"/>
                <file name="drivers/net/ne2k-pci.ko"/>
                <file name="drivers/net/netconsole.ko"/>
                <file name="drivers/net/ns83820.ko"/>
                <file name="drivers/net/pcnet32.ko"/>
                <file name="drivers/net/qla3xxx.ko"/>
                <file name="drivers/net/r8169.ko"/>
                <file name="drivers/net/s2io.ko"/>
                <file name="drivers/net/sis900.ko"/>
                <file name="drivers/net/skge.ko"/>
                <file name="drivers/net/slhc.ko"/>
                <file name="drivers/net/starfire.ko"/>
                <file name="drivers/net/sundance.ko"/>
                <file name="drivers/net/sungem.ko"/>
                <file name="drivers/net/sungem_phy.ko"/>
                <file name="drivers/net/sunhme.ko"/>
                <file name="drivers/net/tg3.ko"/>
                <file name="drivers/net/tlan.ko"/>
                <file name="drivers/net/tulip/*"/>
                <file name="drivers/net/via-rhine.ko"/>
                <file name="drivers/net/via-velocity.ko"/>
                <file name="drivers/net/yellowfin.ko"/>
                <file name="drivers/staging/hv/*"/>
                <file name="fs/exportfs/*"/>
                <file name="fs/ext2/*"/>
                <file name="fs/ext3/*"/>
                <file name="fs/fuse/*"/>
                <file name="fs/lockd/*"/>
                <file name="fs/mbcache.ko"/>
                <file name="fs/nfs/*"/>
                <file name="fs/nfs_common/*"/>
                <file name="fs/squashfs/*"/>
                <file name="net/packet/*"/>
                <file name="net/sunrpc/*"/>
        </drivers>
        <!--repository type="yast2" priority="90">
                <source path="http://download.opensuse.org/update/
12.1/"/>
        </repository-->
        <!--repository type="yast2" priority="100">
                <source path="http://download.opensuse.org/
distribution/12.1/repo/non-oss/"/>
        </repository-->
        <!--repository type="yast2" priority="100">
                <source path="opensuse://12.1/repo/oss"/>
        </repository-->
        <repository type="yast2" status="replaceable" priority="95">
                <source path="iso:///ISO_openSUSE/openSUSE-12.1-DVD-
x86_64.iso"/>
        </repository>
        <repository type="yast2" status="replaceable" priority="95">
                <source path="iso:///ISO_openSUSE/openSUSE-12.1-DVD-
i586.iso"/>
        </repository>
        <packages type="image" profiles="default">
                <package name="kernel-default"/>
        </packages>
        <packages type="image">
                <package name="kernel-default"/>
                <package name="atftp"/>
                <package name="bc"/>
                <package name="bootsplash"/>
                <package name="busybox"/>
                <package name="clicfs"/>
                <package name="cyrus-sasl"/>
                <package name="dhcpcd"/>
                <package name="diffutils"/>
                <package name="file"/>
                <package name="fribidi"/>
                <package name="hwinfo"/>
                <package name="iputils"/>
                <package name="kiwi-tools"/>
                <package name="module-init-tools"/>
                <package name="nbd"/>
                <package name="net-tools"/>
                <package name="netcfg"/>
                <package name="nfs-client"/>
                <package name="procps"/>
                <package name="tar"/>
                <package name="util-linux"/>
                <package name="e2fsprogs"/>
                <package name="coreutils"/>
<!--
                <opensusePattern name="enhanced_base"/>
                <opensusePattern name="fonts"/>
                <opensusePattern name="kde4_basis"/>
                <opensusePattern name="kde4"/>
                <opensusePattern name="multimedia"/>
                <opensusePattern name="office"/>
                <opensusePattern name="sw_management"/>
                <opensusePattern name="x11"/>
-->
        </packages>
        <packages type="bootstrap">
<!--
                <opensusePattern name="base"/>
                <opensusePattern name="enhanced_base"/>
                <opensusePattern name="fonts"/>
                <opensusePattern name="kde4_basis"/>
                <opensusePattern name="kde4"/>
                <opensusePattern name="multimedia"/>
                <opensusePattern name="office"/>
                <opensusePattern name="sw_management"/>
                <opensusePattern name="x11"/>
-->
                <package name="atftp"/>
                <package name="bc"/>
                <package name="bootsplash"/>
                <package name="busybox"/>
                <package name="clicfs"/>
                <package name="cyrus-sasl"/>
                <package name="dhcpcd"/>
                <package name="diffutils"/>
                <package name="file"/>
                <package name="fribidi"/>
                <package name="hwinfo"/>
                <package name="iputils"/>
                <package name="kiwi-tools"/>
                <package name="module-init-tools"/>
                <package name="nbd"/>
                <package name="net-tools"/>
                <package name="netcfg"/>
                <package name="nfs-client"/>
                <package name="procps"/>
                <package name="tar"/>
                <package name="util-linux"/>
<!-- -->
                <package name="kernel-default"/>
                <package name="e2fsprogs"/>
                <package name="coreutils"/>
                <package name="busybox"/>
                <package name="dialog"/>
                <package name="fbiterm"/>
                <package name="filesystem"/>
                <package name="gettext-runtime"/>
                <package name="glibc"/>
                <package name="glibc-locale"/>
        </packages>
        <packages type="delete" profiles="default">
                <package name="cpio"/>
                <package name="cracklib-dict-full"/>
                <package name="diffutils"/>
                <package name="fillup"/>
                <package name="gdbm"/>
                <package name="info"/>
                <package name="insserv"/>
                <package name="iproute2"/>
                <package name="logrotate"/>
                <package name="make"/>
                <package name="mingetty"/>
                <package name="openSUSE-release"/>
                <package name="pam"/>
                <package name="pam-modules"/>
                <package name="perl"/>
                <package name="perl-Bootloader"/>
                <package name="permissions"/>
        </packages>
</image>


/root/kiwi/netboot/suse-12.1/config.sh:
#!/bin/bash
#================
# FILE : config.sh
#----------------
# PROJECT : OpenSuSE KIWI Image System
# COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights
reserved
# :
# AUTHOR : Marcus Schaefer <m...@suse.de>
# :
# BELONGS TO : Operating System images
# :
# DESCRIPTION : configuration script for SUSE based
# : operating systems
# :
# :
# STATUS : BETA
#----------------
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile

#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$kiwi_iname]..."

#baseStripDocs
#baseStripInfos
##baseStripLocales
#baseStripMans

# Setup baseproduct link
#suseSetupProduct

# Activate services
#suseActivateDefaultServices
#suseInsertService xdm
#baseSetRunlevel 5

# Remove cached packages
#find /var/cache -iname '*.rpm' -type f -print0 | xargs --null rm --
force

#======================================
# SuSEconfig
#--------------------------------------

# SuSEconfig
#if [ -f /usr/bin/kdm ]
#then
# dm=kdm
#else
# dm=xdm
#fi
#if [ -f /usr/bin/startxfce4 ]
#then
# wm=startxfce4
#elif [ -f /usr/bin/icewm ]
#then
# wm=icewm-session
#else
# wm=twm
#fi

#baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM $wm
#baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER $dm
#baseUpdateSysConfig /etc/sysconfig/displaymanager
DISPLAYMANAGER_ROOT_LOGIN_LOCAL yes
#baseUpdateSysConfig /etc/sysconfig/network/config WAIT_FOR_INTERFACES
""
#baseUpdateSysConfig /etc/sysconfig/network/config NETWORKMANAGER no
#baseUpdateSysConfig /etc/sysconfig/clock HWCLOCK -u
#baseUpdateSysConfig /etc/sysconfig/sysctl ENABLE_SYSRQ 1

suseConfig

#==========================================
# setup gfxboot
#------------------------------------------
suseGFXBoot openSUSE grub

#======================================
# Keep UTF-8 locale
#--------------------------------------
baseStripLocales \
$(for i in $(echo $kiwi_language | tr "," " ");do echo -n
"$i.utf8 ";done)
baseStripTranslations kiwi.mo

#======================================
# Umount kernel filesystems
#--------------------------------------
#suseConfig
baseCleanMount

exit 0
### END ###



kiwi/netboot/suse-12.1/images.sh'
#!/bin/sh
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile

echo "Configure image: [$kiwi_iname]..."

#baseStripDocs
#baseStripInfos
##baseStripLocales
#baseStripMans

#==========================================
# remove unneded kernel files
#------------------------------------------
suseStripKernel

#==========================================
# remove unneeded files
#------------------------------------------
suseStripInitrd

#==========================================
# umount /proc
#------------------------------------------
umount /proc &>/dev/null

exit 0
### END ###

Marcus Schäfer

unread,
Mar 15, 2012, 5:59:44 AM3/15/12
to kiwi-...@googlegroups.com
Hi,

> First step build bootstrap dir..
>

> kiwi -p /root/kiwi/netboot/suse-12.1 \
> --root /pxeboot/nfs/opensuse12.1_x64/root/

So this one should build your root tree later exported via NFS ?
if so the call is correct but what kind of image description is this ?
It doesn't look like a system image description, the name infact
points more to a boot image (initrd) description

> Second step, build kernel/initrd files..
>
> # kiwi --build /root/kiwi/netboot/suse-12.1 -d /pxeboot/nfs/
> opensuse12.1_x64/pxe --type pxe

Sorry that doesn't make sense. initrd and root system from the
same image description ??

Consider the following example:

1) build 12.1 netboot initrd and kernel:
(required kiwi-desc-netboot to be installed)

kiwi -p /usr/share/kiwi/image/netboot/suse-12.1/ --root /tmp/kiwi-netboot
kiwi --create /tmp/kiwi-netboot -d /tmp/mytest-netboot/

Find the kernel and initrd here:

/tmp/mytest-netboot/initrd-netboot-suse-12.1.x86_64-2.1.1.gz
/tmp/mytest-netboot/initrd-netboot-suse-12.1.x86_64-2.1.1.kernel.3.1.0-1.2-default

2) build 12.1 NFSROOT tree:
(we need an image description for it, so let's use a template e.g JeOS
this required the package kiwi-templates to be installed)

kiwi -p suse-12.1-JeOS --root /tmp/kiwi-nfsroot-system

you can call "chroot /tmp/kiwi-nfsroot-system" after the call

3) create client configuration for NFSROOT.
For nfs root this is a one liner, telling the kiwi netboot code
the location of the root tree

NFSROOT=NFS.Server.IP.address;/path/to/root/tree

4) setup all the pxe boot env and paths as kiwi netboot needs it
The package kiwi-pxeboot supports here with the initial structure
I also tried to document this here:

http://isny.homelinux.com/data/kiwi.html#chap.pxe

Hope that helps

Reply all
Reply to author
Forward
0 new messages