http://www.phys.ethz.ch/~franklin/Projects/dphys2/INSTALL copyright ETH Zuerich Physics Departement, use under either BSD or GPL license author Neil Franklin, last modification 2004.02.20 To install/config/use dphys2 do the following: Install on Admin System ======================= 1. Download and unpack the distribution archive file from: http://www.phys.ethz.ch/~franklin/Projects/dphys2/dphys2.tar.gz into your preferred compile/work directory. Note1: this directory must be root writable (not an root-squash NFS mount) Note2: this must be on a filesystem with at least 50MB free space more if you are going to compile an own kernel for own resc disk I presently use this command sequence for this: cd /usr/local/tar rm -f dphys2.tar.gz wget http://www.phys.ethz.ch/~franklin/Projects/dphys2/dphys2.tar.gz cd /usr/local/src rm -rf dphys2 tar zxpf ../tar/dphys2.tar.gz cd dphys2 Configuration of Installer ========================== 2. *PERMISSIONS* Switch to being root which is needed for generating the disk images, else loop mounts will not work, and they will get screwed up file owners on them anyway 3. In the dphys2 directory edit the configuration file setup-dphys2 This one file tells dphys2 all it needs to know about your site and subnet specific details (the rest should default to sensible stuff): - which Debian mirror you are using (CONF_DEBSERVER) and the base path on that mirror (CONF_DEBDIR) - which kernel version you want, 2.2.x (= Debian standard 2.2.20) or 2.4.x (= Debian bf24 2.4.18) (CONF_KERNEL_24) - layout of keyboard, filename relative to /usr/share/keymaps/ (CONF_KEYBD) - select what disk to install on: either what HD to install on (CONF_DISK) or leave this empty to auto-select (hda if it exists, else uses sda) - select swap system wanted and amount (CONF_SWAP_FILE or CONF_SWAP_SIZE) chosing file will install an package dphys2-swapfile-*.deb - what network card drivers you want to include (CONF_MODULESNET) - network setup: - if your have DHCP: do nothing - else you want static conf: comment out CONF_DHCP=yes line, set domain specific network stuff, domain name (CONF_DOMAIN) and DNS servers (CONF_NAMESERVER1 to CONF_NAMESERVER4) [comment out not wanted ones] and subnet specific network stuff (CONF_NETMASK, CONF_NETWORK, CONF_GATEWAY, CONF_BROADCAST) - desired passwords (CONF_PASSWORD_LILO, CONF_PASSWORD_ROOT) - your time zone info (CONF_TIMEZOME_AREA, CONF_TIMEZOME_PLACE) - your preference on what packages to use (CONF_USE_CONTRIB, CONF_USE_NON_FREE, CONF_USE_PROPOSED) - your Debian mirror(s) for non-US, security and local packages (CONF_DEBSERVER_NON_US, CONF_DEBDIR_NON_US, CONF_DEBSERVER_SECURITY CONF_DEBDIR_SECURITY, CONF_DEBSERVER_LOCAL, CONF_DEBDIR_LOCAL) 4. If you want an own kernel, select in setup-dphys2: - your kernel archive (CONF_KERNEL_OWN) - your kernel config (CONF_KERNEL_CONFIG) - where to place the generated rescue and drivers.tgz (CONF_UPLOAD_*) - where to find them by the machines being installed (CONF_OWN*_KERNEL) Your kernel config is NOT ALLOWED to have: - devfs (CONFIG_DEVFS_FS), as old style /dev/* names are used and needed Your kernel config MUST HAVE included (= not modules): - floppy device (CONFIG_BLK_DEV_FD), for reading 2nd/root floppy - RAM disk device (CONFIG_BLK_DEV_RAM), for root filesystem while install - loopback devide (CONFIG_BLK_DEV_LOOP), for getting kernel from resc image - FAT filesystem (CONFIG_FAT_FS + CONFIG_MSDOS_FS), for extracting kernel 5. If you want to automagically run an user script at the end of the first install stage (or have this install scripts to run in second stage): - uncomment and possibly set the filename (CONF_ENDFIRSTRUN_SCRIPT) See the sample endfirstrun script for what can be done here. It adds an further script to be run in the second stage, setting up an installer for packages and configs we here regard as indispensable. 6. *SECURITY* Ensure that the dphys2-setup file is protected and remains so. Else you will compromise your LILO (if used) and root (is used) passwords: chmod 600 dphys2-setup 7. *HARDWARE* Get yourself 2 formatted but empty floppy disks. 8. Generate your custom rescue floppy (and its fitting drivers.tgz), or download an standard Debian rescue floppy with: make rescue # generate/download rescue image make installrescue # write rescue image to first floppy 9. Generate the modified root floppy image (possibly using above drivers.tgz) by typing: make # generate root image make install # write root image to second floppy 10. *GOTCHA* If you have not chosen DHCP, you will need to repeat the steps "edit configuration" and "generate root" for each subnet. So you will requires n+1 floppies if you have n subnets. Write on each root floppy which subnet it is for. Confusing them costs an crash-while-install and re-install and such time loss is annoying :-). 11. *FACULTATIVE*: Clean up work directory, and reclaim your 50MBytes with: make clean Actual Installing on Target =========================== 12. *TARGET* Go to your target system, and boot it from the rescue floppy, load the kernel without any options, and wait for it to demand an root floppy. 13. Insert the modified root floppy , press enter, and wait for it to be read in, and the dphys2 banner to be displayed. 14. Eject the root floppy, so that the host can auto-reboot from HD later on. 15. Enter your desired hostname. 16. If you are not using DHCP: Enter your desired IP address. 17. *AUTOMATIC* At end of first stage install (in a few minutes time), the host will automatically reboot into 2nd stage of install and continue with that, until it is finished (in a few more minutes time). 18. You can now log in with root and your password (there is no normal user), and have an fully installed Debian woody base system in front of you. Have fun with apt-get. 19. Only the steps "target" to "login" need to be repeated for each host. This is why hostname (and without DHCP IP address) are typed in, to not have to repeat all the floppy generating stuff before. Thats all folks! Facultative stuff after Install =============================== This section describes what we do after the base install, to also automate the rest of an complete install and the operation/update of our systems. You may be interested in also doing it this way. Central to this is the CONF_ENDFIRSTRUN_SCRIPT variable in setup-dphys2, and the included endfirstrun[1] script, which it installs and runs. This script inserts an additional script into Debians base-config scripts, that runs in the second install stage (after the reboot). [1] http://www.phys.ethz.ch/~franklin/Projects/dphys2/endfirstrun This additional script: - automatically installs oinetd, so the package server can authentificate if root (our installer) or some user is demanding packages from it - automatically installs an package with name dphys-site (we name parts of the dphys2 system with dphys2-*, and site local administration stuff with dphys-*), which fetches a few crucial packages and then dphys-admin - dphys-admin[2] loads (and later updates), using its script dphys-setup.pl, all the packages we want to have, including dphys-* packages which contain all our configuration files [2] in http://debian.ethz.ch/pub/debian-local/dists/woody/local/main/binary-all/admin/ [3] http://www.phys.ethz.ch/~franklin/Projects/dphys2/dphys-setup.pl Our entire site configuration and software has been reengineered and stored in form of quite a few own dphys-* packages[4] and dphys-setup.pl package list files (one site-wide, and 2 pre/post ones host-specific). This gives us near fully automatic system administration, just add file+NIS/LDAP servers with user files/accounts, and of course config packages. [4] in http://debian.ethz.ch/pub/debian-local/dists/woody/local/ public available ones in main, restricted access in non-free The packages are stored here on our CONF_DEBSERVER_LOCAL local packages server, in its CONF_DEBDIR_LOCAL directory. The "main" section is used here by policy for "packages anyone can download from us", while "non-free" is used for "packages restricted to our hosts (containing ssh or license keys or commercial software)", which are only given out to our IP addresses, only with proper MAC address, and only to root user (as checked with oidentd). We use makesourcepackage [5] or the older (obsolete) makepackage [6] to make them and Makefile.debian-local [7] to build the package site. [5] http://www.phys.ethz.ch/~franklin/Projects/dphys2/makesourcepackage [6] http://www.phys.ethz.ch/~franklin/Projects/dphys2/makepackage [7] http://www.phys.ethz.ch/~franklin/Projects/dphys2/Makefile.debian-local Presently only workstations are installed with dphys2. But one could easily also reengineer our servers (except the package server :-)) software and configs into packages, included by the servers host-specific package lists.