head 1.11; access; symbols OPENPKG_CW_FP:1.6; locks; strict; comment @# @; 1.11 date 2005.10.01.18.47.58; author thl; state Exp; branches; next 1.10; 1.10 date 2005.09.16.21.06.58; author thl; state Exp; branches; next 1.9; 1.9 date 2005.09.14.20.12.11; author thl; state Exp; branches; next 1.8; 1.8 date 2005.05.04.12.31.36; author thl; state Exp; branches; next 1.7; 1.7 date 2005.03.24.11.21.30; author rse; state Exp; branches; next 1.6; 1.6 date 2004.10.11.08.45.31; author thl; state Exp; branches; next 1.5; 1.5 date 2004.10.11.08.42.51; author thl; state Exp; branches; next 1.4; 1.4 date 2004.10.08.14.35.16; author thl; state Exp; branches; next 1.3; 1.3 date 2004.10.07.14.40.16; author thl; state Exp; branches; next 1.2; 1.2 date 2004.10.04.13.58.25; author rse; state Exp; branches; next 1.1; 1.1 date 2004.10.04.13.51.48; author rse; state Exp; branches; next ; desc @@ 1.11 log @Mandrake preparation requires adding a source media @ text @ OpenPKG Virtual Machine Setup Guide =================================== ----------------------- vanilla ----------------------- - vmware: It is important that existing VMware GSX virtual machines are (re)used. These machines are preconfigured for our environment (i.e. NIC MAC). Under no circumstances must the "New Virtual Machine" option be used. RAM 1024MB VMDK IDE 0:0 or LSI SCSI (not BusLogic, it is supported on VMware Workstation, not GSX Server) do not allocate space in advance, split disks into 2GB files, size 3.9GB (not 4.0, this creates a small third section file), filename "os-d0-$platform.vmdk" (with minor versions omitted, e.g. freebsd4 not freebsd4.11), platform=`/usr/opkg/bin/shtool platform --type=binary | sed -e 's;^[^-]*-;;'`) NIC (vlance, bridged) Mouse (autodetect) CDROM (optional, IDE 1:0, filename=....img) Floppy (optional, vmX.vmfd) Sound (none) USB (none) Serial (none) Parallel (none) Options: - General: select closest OS type - Snapshots: enable - Permissions: "make this virtual machine private" - locale: Keyboard: US Timezone: UTC or Europe/London "Great Britain", no daylight saving time Clock: UTC Video: generic LCD 800x600x32 Locale: US/english/C (only) Clock: UTC - password: - set root password to "0penPKG!" (first character is a zero) - filesystem: Try to keep the vendor layout, if reasonable. Our recommendations shown below. Do not use swap at all unless the OS or the installer enforces this. Create a small /tmp filesystem if possible. If /var is a filesystem ensure it's size is at least 256MB. / 64MB ... 512MB /boot 64MB ... 128MB /tmp 64MB ... 128MB (try memory disk) /var 256MB ... 512MB /usr >= 3GB (remainder) swap <= 256MB (only if OS/installer enforces swap) - network: IP, SM, DR, DNS: DHCP hostname: DHCP or hard-code to "vmXX" - extend: Packages: minimum with development tools and X11 libraries - packages: - development (make, binutils, gcc with headers) - x11 (client libraries) - /etc/motd: +-----------------------------------------------------------------------+ | Hostname: vmXX.dev.de.cw.net Purpose: Virtual Machine | | Network: 10.0.0.XX Location: svX.openpkg.net | | Platform: VMWare GSX 3.1 Owner: The OpenPKG Project | | Hardware: *MHz/1GB/4GB/10Mbps Contact: hostmaster@@openpkg.net | | System: Debian GNU/Linux 3.0 Updated: xx-Sep-2005 | +-----------------------------------------------------------------------+ - vmtools: # mount /mnt/cdrom # cd /var/tmp # tar xvfz /mnt/cdrom/vmware-linux-tools.tar.gz # cd vmware-tools-distrib # ./vmware-install.pl (all defaults) # cd /var/tmp && rm -rf vmware-tools-distrib - defeat time shift problem on Linux running 2.6 kernel add "clock=pit" to disable tick compensation, see Timekeeping in VMware Virtual Machines http://www.vmware.com/pdf/vmware_timekeeping.pdf VMware Community Discussion Forums, watch thread around 2004-11-15 http://www.vmware.com/community/thread.jspa?threadID=4254&messageID=73938 Tim Mann http://gossamer-threads.com/lists/linux/kernel/494604 - update: pre-configure for OS updates and perform initial update to latest state. NetBSD: $ cd /d1 && ./cvs.sh $ cd /usr/src && cvs up -P -d $ sh build.sh build $ sh build.sh install $ cd /sys/arch/sparc64/conf && config DV3 $ cd /sys/arch/sparc64/compile/DV3 && make depend all && cp netbsd / $ etcupdate FreeBSD: $ cd /usr/adm $ make upgrade $ make etc $ make clean Debian: $ apt-get update $ apt-get upgrade $ cd /usr/src; vi README # for kernel Gentoo: $ emerge sync $ emerge -u world $ etc-update Mandrake: $ vi /etc/urpmi/urpmi.cfg [look for id of "update" entry] $ urpmi.addmedia foo $URL with $SYTHESIS $ urpmi.update foo $ urpmi --auto-select Solaris: $ ... Fedora: $ yum update $ yum upgrade SUSE: $ yast # online update (YOU) - /openpkg: # mkdir /usr/openpkg # ln -s /usr/openpkg /openpkg # cd /var/tmp # ftp ftp://ftp.openpkg.org/release/2.4/UPD/openpkg-2.4.2-2.4.2.src.sh # sh openpkg-*.src.sh \ --tag=openpkg --prefix=/openpkg \ --user=openpkg --group=openpkg \ --muid=42000 --ruid=42001 --nuid=42002 \ --mgid=42000 --rgid=42001 --ngid=42002 # sh openpkg-*-openpkg.sh # /openpkg/bin/openpkg install openpkg-tools # /openpkg/bin/openpkg build \ make m4 binutils gcc perl autoconf bash bison bzip2 patch fsl \ cvs flex gzip libtool openssl ntp zlib openssh rsync screen \ shtool tar vim \ | sh - # rm -rf /openpkg/RPM/TMP/* /openpkg/RPM/SRC/* # /openpkg/bin/vim /openpkg/etc/openssh/sshd_config # /openpkg/bin/shtool subst \ -e 's;^\(ListenAddress *\)[0-9].*$;\10.0.0.0;' \ -e 's;^\(PermitRootLogin *\)[yn].*$;\1yes;' \ /openpkg/etc/openssh/sshd_config Stop system ssh # /openpkg/bin/openpkg rc all start # tail /openpkg/var/openssh/openssh.log - services: - minimum network services (keep rpcbind for enabling NFS later) - no system ssh, ntp, rsync (would conflict with OpenPKG) - check from external device using nmap - cleanup: - move temporary mount dirs (cdrom, floppy, etc) /foo -> /mnt/foo - remove empty top-level directories (/dist) - fstab adjustments: noatime - virgin: - # /openpkg/bin/bash # for i in /tmp /var/tmp \ /openpkg/RPM/SRC /openpkg/RPM/TMP \ /usr/opkg/RPM/SRC /usr/opkg/RPM/TMP; do \ [ -d $i/ ] && rm -rf $i/*; \ done # for i in /var/run/utmp /var/log/wtmp \ /openpkg/var/openssh/openssh.log \ /usr/opkg/var/openssh/openssh.log \ ; do [ -f $i ] && cat $i; done; \ history -c # shutdown -h now # init 0 -------------------- dev.de.cw.net -------------------- - security: - change password from vanilla default - NIS: (settings devlivered via DHCP, too) - domain openpkg.net - broadcast for servers - NFS: - /usr/opkg: # cd /tmp # cp foundation/.../departments/io/obmtool* . # sh obmtool devpolicy # sh obmtool opkg # /usr/opkg/bin/shtool subst \ -e 's;^\(ListenAddress *\)[0-9].*$;\10.0.0.0;' \ /usr/opkg/etc/openssh/sshd_config - /openpkg: # echo >>/openpkg/etc/rc.conf 'openpkg_rc_all="no"' - virgin: ----------------------- openpkg ----------------------- - add additional disk - vmware: IDE 0:1, 4GB - fdisk, mkfs, /etc/fstab, mount /d1 # rm -rf /ltmp; mkdir /d1/ltmp; chmod 1777 /d1/ltmp; ln -s /d1/ltmp /ltmp # /openpkg/bin/openpkg rpm -e `/openpkg/bin/openpkg rpm -qa` # rm -rf /usr/openpkg; rm /openpkg # for i in openpkg-dev openpkg-21 openpkg-20 openpkg; do \ mkdir /d1/$i; ln -s /d1/$i /$i; done # cd /ltmp # ftp ftp://ftp.openpkg.org/release/2.1/UPD/openpkg-2.1.2-2.1.2.src.sh # sh openpkg-*.src.sh \ --tag=openpkg --prefix=/openpkg \ --user=openpkg --group=openpkg \ --muid=42000 --ruid=42001 --nuid=42002 \ --mgid=42000 --rgid=42001 --ngid=42002 # sh openpkg-*-openpkg.sh # echo >>/openpkg/etc/rc.conf 'openpkg_rc_all="no"' OpenPKG VM with Fedora Core 2 ============================= ----------------------- vanilla ----------------------- - vmware: - locale: - password: - filesystem: autopartition, deleting all partitions with review yields /boot=100 (ext3), /=3G (ext3), /swap=1G delete /swap, automatically enlarges /=4G ignore "You have not specified a swap partition ..." warning - network: - extend: custom, minimum - packages: # yum install \ make binutils gcc gcc-c++ flex ncurses-devel xorg-x11-devel expat \ fontconfig fontconfig-devel freetype freetype-devel pkgconfig \ zlib-devel xorg-x11 pam-devel - /etc/motd: - vmtools: - update: # yum update # yum upgrade # /usr/bin/vmware-config-tools.pl - /openpkg: # /etc/rc0.d/K*sshd stop - services: # chkconfig sshd off - cleanup: # shtool subst -i -e 's;^\(HWADDR=\).*;\1;' /etc/sysconfig/network-scripts/ifcfg-eth0 - virgin: -------------------- dev.de.cw.net -------------------- - security: - NIS: # echo >>/etc/sysconfig/network 'NISDOMAIN=dev.de.cw.net' # echo >>/etc/yp.conf 'domain dev.de.cw.net broadcast' #FIXME this is probably not necessary # for i in passwd shadow group; do \ /openpkg/bin/shtool subst -e "s;^\($i:\) *.*$;\1 files nis;" /etc/nsswitch.conf; \ done # chkconfig --add ypbind # chkconfig --level 2345 ypbind on - NFS: - /usr/opkg: - /openpkg: - virgin: OpenPKG VM with Gentoo ====================== ----------------------- vanilla ----------------------- - vmware: - locale: - password: - filesystem: / = 4G (reiser) - network: - extend: deselect everything except mandatory base - packages: # echo >>/etc/conf.d/net 'dhcpd_eth0="-H"' # emerge \ make binutils gcc autoconf automake bc bison flex gettext install \ libtool m4 patch xorg-x11 # emerge portmap ypbind yp-tools; etc-update - /etc/motd: - vmware: pre # emerge /pciutils # for i in 0 1 2 3 4 5 6; do mkdir /etc/rc$i.d; done post # rm /etc/rc3.d/S06vmware-tools /etc/rc6.d/K08vmware-tools # for i in 0 1 2 3 4 5 6; do rmdir /etc/rc$i.d; done # ( echo '#!/sbin/runscript'; \ for i in start stop; do \ echo "$i() {"; echo " /etc/init.d/vmware-tools $i"; echo "}"; \ done \ ) >/etc/init.d/vmware-tools-gentoo # chmod 755 /etc/init.d/vmware-tools-gentoo # rc-update add vmware-tools-gentoo default - update: # emerge sync # emerge -u world; etc-update - /openpkg: # /etc/init.d/sshd stop - services: # rc-update del sshd - cleanup: - virgin: -------------------- dev.de.cw.net -------------------- - security: - NIS: # echo >>/etc/nisdomainname dev.de.cw.net # for i in passwd shadow group; do \ /openpkg/bin/shtool subst -e "s;^\($i:\) *.*$;\1 files nis;" /etc/nsswitch.conf; \ done # rc-update add ypbind default - NFS: - /usr/opkg: - /openpkg: - virgin: @ 1.10 log @minor updates and corrections for post-C&W era @ text @d139 2 a140 1 $ urpmi.update ftp1u @ 1.9 log @Timekeeping in VMware Virtual Machines @ text @d14 5 a18 4 RAM 512MB VMDK 4GB, virtual disk, IDE 0:0, size 4.0, NOT allocate space in advance, split disks into 2GB files, filename "os-$platform.vmdk"; d36 1 a36 1 Timezone: GMT a39 1 Timezone: Europe/London "Great Britain", no daiylight saving time d63 1 a63 1 hostname: DHCP or hard-code to "vmX" d76 2 a77 2 | Hostname: vmX.dev.de.cw.net Purpose: Virtual Machine | | Network: 141.1.23.1xx Location: svX.dev.de.cw.net | d79 2 a80 2 | Hardware: *MHz/512MB/4GB/10Mbps Contact: openpkg-dev@@openpkg.org | | System: Debian GNU/Linux 3.0 Updated: xx-Oct-2004 | d149 3 d157 1 a157 1 # ftp ftp://ftp.openpkg.org/release/2.1/UPD/openpkg-2.1.2-2.1.2.src.sh d216 2 a217 2 - NIS: - domain dev.de.cw.net d221 1 d225 1 a225 1 # scp FIXME@@dv1.dev.de.cw.net:/u/thl/work/development-team/com/obmtool* . @ 1.8 log @log solution to defeat time shift problem on Linux running 2.6 kernel in VMware @ text @d97 3 @ 1.7 log @Adjust the copyright declaration in this (RSE's) copy of the OpenPKG source code now that the fork point for C&W was established (CVS tag OPENPKG_CW_FP), the shared copyright agreement between RSE and C&W is no longer active (as C&W no longer officially sponsors OpenPKG) and the new shared copyright from RSE can be taken over by the newly established juristic entity OpenPKG Foundation e.V. (instead of the non-juristic entity OpenPKG Project). @ text @d93 10 @ 1.6 log @build farm calls for PAM headers @ text @d101 2 a102 1 $ sh build.sh @ 1.5 log @build farm calls for mkfontdir and mkdirhier @ text @d266 1 a266 1 zlib-devel xorg-x11 @ 1.4 log @more details and more automation setting up virtual machines @ text @d266 1 a266 1 zlib-devel @ 1.3 log @log generic details and specifics for fedora and gentoo @ text @d83 1 a83 1 - vmware: d85 7 a91 2 tools: VM, install VMware tools ... d153 1 d155 4 a158 3 ListenAddress 0.0.0.0 PermitRootLogin yes PermitEmptyPasswords yes a160 1 # /etc/rc0.d/K*sshd stop d167 3 a169 1 - no network services (at least not ssh, ntp) at all (check nmap) d175 1 a175 2 - fstab adjustments: noatime for fs, reorder for /, swap, rest, /mnt/xxx) - remove temporary data # rm -rf /tmp/* /var/tmp/* d179 7 a185 3 - # exec /openpkg/bin/bash # for i in \ /var/run/utmp /var/log/wtmp \ d189 3 a191 1 history -c; shutdown -h now d195 4 d210 3 a212 2 # /openpkg/bin/vim /usr/opkg/etc/openssh/sshd_config ListenAddress 0.0.0.0 d220 1 a220 1 --------------------- openpkg-dev --------------------- d222 1 a222 6 - add additional IDE 0:1 (4GB), fdisk, mkfs, /etc/fstab, mount /d1 - /openpkg-dev -> /d1/openpkg-dev - /openpkg-20 -> /d1/openpkg-20 - /openpkg-21 -> /d1/openpkg-21 - /openpkg -> /d1/openpkg - /ltmp -> /d1/ltmp d224 2 a226 1 # cp /openpkg/RPM/PKG/openpkg-*-openpkg.sh /ltmp/ d232 6 d269 1 a269 10 - vmware: # mount /mnt/cdrom # cd /var/tmp # tar xvfz /mnt/cdrom/vmware* # cd vmware* # ./vmware-installer.pl (all defaults) # rm -rf /var/tmp/vmware* a277 1 Stop system ssh a281 1 # chkconfig portmap off a289 1 d292 1 d294 5 a298 3 # echo >>/openpkg/bin/vim /etc/yp.conf 'domain dev.de.cw.net broadcast' # /openpkg/bin/vim /etc/nsswitch.conf # prepend passwd, shadow and group with "nis" before "files" # chkconfig portmap on a300 1 # echo >>/etc/sysconfig/network 'NISDOMAIN=dev.de.cw.net' d310 2 d330 1 d335 14 a348 1 N/A d353 1 a353 2 # emerge -u world # etc-update d356 3 d360 3 d366 15 @ 1.2 log @information about how to upgrade various operating systems @ text @d5 2 d8 12 a19 4 512MB RAM 4GB HD (virtual disk, IDE 0:0, size 4.0, NOT allocate space in advance, split disks into 2GB files, filename "os-$platform.vmdk" platform=`/usr/opkg/bin/shtool platform --type=binary | sed -e 's;^[^-]*-;;'`) Ethernet (vlance, bridged) d29 1 a29 1 - Snapshots: disable snapshots d32 27 a58 6 - general filesystem layout (as close as possible): / 64MB - 512MB swap 128MB - 256MB /var 256MB - 512MB /usr rest (3GB) /tmp RAM (64MB-128MB) d60 1 a60 1 - OS extend: minimum (at least: cc/ld/make/tar, X11 headers/libraries/clients) d62 2 a63 1 - network setup: DHCP (maximum: hostname "vmX" locally hard-coded) d65 22 a86 4 - cleanup filesystem: - move temporary mount dirs (cdrom, floppy, etc) /foo -> /mnt/foo - remove empty top-level directories (/dist) - fstab adjustments: noatime for fs, reorder for /, swap, rest, /mnt/xxx) d88 1 a88 8 - Edited /etc/motd by adding: +-----------------------------------------------------------------------+ | Hostname: vmX.dev.de.cw.net Purpose: Virtual Machine | | Network: 141.1.23.1xx Location: svX.dev.de.cw.net | | Platform: VMWare GSX 3.1 Owner: The OpenPKG Project | | Hardware: *MHz/512MB/4GB/10Mbps Contact: openpkg-dev@@openpkg.org | | System: Debian GNU/Linux 3.0 Updated: xx-Oct-2004 | +-----------------------------------------------------------------------+ d90 2 a91 1 - pre-configure for OS updates and perform initial update to latest state d130 25 a154 1 - optionally install still missing packages d156 4 a159 16 - /openpkg with OpenPKG 2.1 (located on /usr/openpkg with symlink /openpkg) start with binaries and proceed from source $ sh openpkg-*.src.sh --tag=openpkg --prefix=/openpkg --user=openpkg --group=openpkg \ --muid=42000 --ruid=42001 --nuid=42002 --mgid=42000 --rgid=42001 --ngid=42002 $ /openpkg/bin/openpkg install openpkg-tools $ /openpkg/bin/openpkg build make m4 binutils gcc perl autoconf bash bison bzip2 \ patch fsl cvs flex gzip libtool openssl ntp zlib openssh rsync screen shtool tar vim | sh - - configure /openpkg: /openpkg/etc/openssh/sshd_config: - ListenAddress 127.0.0.1 + ListenAddress 0.0.0.0 - PermitRootLogin no + PermitRootLogin yes - PermitEmptyPasswords no + PermitEmptyPasswords yes a160 1 - adjust OS services: d163 67 a229 2 - set root password: "0penPKG!" (O is a Null!) d231 90 a320 1 - make system maiden/vanilla/clean again by removing .bash_history d322 1 a322 1 ----------------------------------------------------------------------------------- d324 1 a324 1 dev.de.cw.net: d326 8 a333 16 - dev.de.cw.net User Environment: - NIS (broadcast for domain dev.de.cw.net) - NFS client - /openpkg deactivation - /usr/opkg (located physically there) - Automounter (/usr/opkg!) ----------------------------------------------------------------------------------- - add additional IDE 0:1 (4GB) and mount to /d1 - "openpkg dev" Environment: - /openpkg-dev -> /d1/openpkg-dev - /openpkg-20 -> /d1/openpkg-20 - /openpkg-21 -> /d1/openpkg-21 - /openpkg -> /d1/openpkg - /ltmp -> /d1/ltmp @ 1.1 log @initial cut for vm setup information @ text @d48 38 @