Bugzilla – Bug 4166
The automated installer hangs on a 1 GB system without swap
Last modified: 2009-02-16 03:45:38 UTC
You need to log in before you can comment on or make changes to this bug.
The automated installer has more than 250 MB available when the installer started. But it is not enough to complete the installation using IPS. When a swap was added to the system, the installation is completed successfully. So a swap is required for systems that has less than 1.5 GB Memory
Workaround: If recommended disk size is dedicated for the installation (which is ~12GiB for AI), swap is automatically created and installation can be finished successfully.
The one possible solution here is to reduce size of AI image, so that it consumes less memory. Since SUNWgui-install package was split (bug 5468) in order to separate GUI installer pieces (now in SUNWgui-install package) from installer libraries (now in SUNWinstall package) which AI consumes, we can take advantage of this and remove all pieces which are not necessary for AI, but are present in AI image just in order to fulfill dependency tree. Dave Miner dig into this problem and created AI image which is about 45% smaller comparing to the original one (300MB -> 165MB). Following packages were identified as candidates to be removed from AI image, since they deliver pieces unused in AI environment: SUNWdbus Simple IPC library based on messages SUNWdbus-bindings Simple IPC library based on messages SUNWgamin Library providing the FAM File Alteration Monitor API SUNWgksu Gksu CLI and libraries SUNWlexpt libexpat - XML parser library SUNWlibC Sun Workshop Compilers Bundled libC SUNWlibanthy libanthy SUNWlibchewing libchewing SUNWlibdaemon Lightweight C library for UNIX daemons SUNWlibexif EXIF tag parsing library for digital cameras SUNWlibgcrypt libgcrypt - cryptographic library SUNWlibgpg-error Common error codes for GnuPG, libgcrypt SUNWlibhangul libhangul SUNWlibm Math & Microtasking Library Headers & Lint Files SUNWlibms Math & Microtasking Libraries SUNWlibpopt Command line parsing library SUNWlibrsvg SVG-format scalable graphics support library SUNWlibsasl SASL v2 SUNWlibsdl libsdl - Simple DirectMedia Layer SUNWlibusb Sun wrapper library for libusb SUNWlibusbugen SUN libusb ugen plugin SUNWltdl libltdl - GNU libtool dlopen wrapper SUNWmkcd CD creation utilities SUNWncft NcFTP - client application implementing FTP SUNWpng Portable Network Graphics library SUNWpolkit PolicyKit SUNWpoold Dynamic Resource Pools SUNWpostrun Delayed execution environment for procedural package scripts SUNWpppd Solaris PPP Device Drivers SUNWpppdt Solaris PPP Tunneling SUNWpppg GNU utilities for PPP SUNWpr Netscape Portable Runtime SUNWrmvolmgr Removable volume manager SUNWrpm Utilities for processing RPM archives SUNWservicetag Service Tags SUNWsmagt System Management Agent files and libraries SUNWsmapi Storage Management APIs SUNWstosreg OpenSolaris Registration SUNWtcpd tcpd - access control facility for internet services SUNWtcsh Tenex C-shell (tcsh) SUNWtexi GNU texinfo - Texinfo utilities (texinfo) SUNWgui-install System install libraries and commands
During generation of reduced AI images, Distribution Constructor /usr/share/distro_const/bootroot_configure script started to complain when trying to set properties for missing SMF services: ... ==== br-config: Boot root configuration svccfg: Pattern 'application/font/fc-cache' doesn't match any instances or services svccfg: Pattern 'system/dbus' doesn't match any instances or services svccfg: Pattern 'application/opengl/ogl-select' doesn't match any instances or services svccfg: Pattern 'application/graphical-login/gdm' doesn't match any instances or services ==== ai-br-config: Auto Install boot root configuration ... Those messages seems to be harmless as they don't prevent Distro Constructor from successfully creating AI images - DC reports 'successful build'. They come from mkrepo script which is used for configuring SMF repository in the image. Among other things, it sets properties for SMF services which are no longer present in reduced AI image - excerpt from mkrepo script shows: ... svccfg -s application/font/fc-cache setprop start/exec=:true # # Increase timeout to avoid error messages. Default # of 30 seconds is not enough for some services when # starting from a slow device like a DVD drive. # svccfg -s system/dbus setprop start/timeout_seconds=90 svccfg -s application/opengl/ogl-select setprop start/timeout_seconds=90 svccfg -s application/graphical-login/gdm setprop start/timeout_seconds=120 ... At time of being, mkrepo script is shared for both AI as well as LiveCD image. There is a bug 5209 filed for enhance mkrepo script and possibly replace it with better solution. Looking at the bug report, it seems that it would also address problem described here when we need to have different steps done when finalizing SMF repository for different type of images.
I helped Jan to test out the fix with the reduced AI image and it works. However, I do notice that there are man pages in the microroot and they do occur some spaces, can these be removed in the AI microroot: root@opensolaris:/usr# more /tmp/man ./gnu/share/man ./has/man ./sfw/man ./sfw/share/man ./share/man root@opensolaris:/usr# du -skh /usr/gnu/share/man 235K /usr/gnu/share/man root@opensolaris:/usr# du -skh /usr/has/man 108K /usr/has/man root@opensolaris:/usr# du -skh /usr/sfw/man 512 /usr/sfw/man root@opensolaris:/usr# du -skh /usr/sfw/share/man 2.8M /usr/sfw/share/man root@opensolaris:/usr# du -skh /usr/share/man 6.1M /usr/share/man root@opensolaris:/usr#
I have taken a closer look at what is present in AI image with respect to man pages and it seems that we can't get easily get rid of them at this moment. The reason is that they are spread across packages which deliver pieces we need in AI image. The good example might be SUNWopenssl package. We utilize only couple of libraries from it but it also delivers bunch of man pages and header files and the final size of that package is more than 10MB. I think that generic solution for this problem would be if we could apply filtering when installing IPS package into DC proto area - taking advantage of so called 'facets' would be the solution - please take a look at following thread, it gives the good introduction about facets/variants and how we could take advantage of them once they are implemented: http://mail.opensolaris.org/pipermail/pkg-discuss/2008-December/009092.html
When testing AI images based on build 106, it was found out that even if reduced, they don't allow to install on x86 machine with 1GB without swap device created. One of the culprits might be project PSARC2007/674 (Dave, thank you for pointing this out) which moved bunch of libraries from /usr/lib and /usr/sfw/lib to /lib directory. That means that as far as AI/LiveCD images are concerned, those libraries now appear in microroot (which is run uncompressed on x86) instead of /usr filesystem compressed in solaris.zlib archive. The difference is ~25MB. In order to address that problem, AI image will take advantage of investigation done when fixing problem tracked by bug 3597. Additional changes will be applied: [1] For x86 systems with less than 1,5 GB, AI will run in 32-bit mode. 1,5GB is chosen as a minimum, since it was verified that AI runs successfully on system with 1GB memory and 0,5GB swap, but failed on system with 1,3 GB of physical memory (tested using Virtual Box). following entry will be added to GRUB menu: min_mem64=1536 [2] ZFS will be tuned to be less memory hungry - the same mechanism will be used as described in bug 3597. Following entries will be added to /etc/system: set zfs:zfs_arc_max=0x4002000 set zfs:zfs_vdev_cache_size=0
(In reply to comment #6) > > [2] ZFS will be tuned to be less memory hungry - the same mechanism will be > used as described in bug 3597. Following entries will be added to /etc/system: > > set zfs:zfs_arc_max=0x4002000 > set zfs:zfs_vdev_cache_size=0 When testing AI installation with and without zfs tuning, it was found out that it actually didn't make visible difference. Testing conditions: * HW: Ultra 20 with 1GB memory * SW: reduced AI image based on build 106 * swap was not created * kernel running in 32bit mode 50MB file was created in /tmp/ directory using mkfile(1M) before AI process was launched in order to make sure there is some reserve during installation as far as available memory is concerned. Installation failed because of insufficient memory in both cases with as well as without ZFS tuning. When 40MB file was created in /tmp/, installation was successful. Based on this observations, ZFS tuning will not be utilized.
fixed in changeset: 11558cdbdbb2a1fc1b40b9c81dfd0202e36f82ef