Sorcerer Installation Guide (v. 0.1) - based on the 20030103 install/rescue CD - Copyright 2003 by Manolis Tzanidakis All rights reserved. May not be copied, mirrored or modified without permission. Introduction ------------ This guide covers the installation process of Sorcerer. It is written with both newbies and senior level SAs in mind. Please make sure to read it carefully till the end, before proceeding with the actual installation. Boot-up from install/rescue CD-ROM ---------------------------------- First of all make sure your system can boot from CD-ROM (maybe you will need to set this up manually in BIOS). After the CD-ROM boot-up initial you will see the Welcome Screen with a "boot: " prompt waiting for your input. If you don't have any SCSI devices, just press enter here. Else give any options needed for your SCSI equipment to get recognized properly by the Linux kernel. If the InitRD menu doesn't come up after that, press the reset button on your box and specify manually your CD-ROM device on the boot prompt by entering, i.e. "linux root=/dev/hdc". In the InitRD menu you'll be notified if your CD-ROM device is detected, you can also load modules for any SCSI or raid devices you may have from the "Load module" option. Additionally you can open a Shell, useful option for checking information about your devices if you are not sure about it by typing i.e. "$ cat /proc/pci". "Choose root device" lets you specify a root device for the installation instead of the install/rescue CD-ROM, useful in case you booted from a custom floppy disc for example; "Continue booting" does exactly what it says :) Bug fix in the installation script ---------------------------------- The sorcerer.install script on the 20030103 ISO9660 has a tiny bug that causes problems with permissions after the installation. The "quick-and-dirty" process to override that bug is : $ cd /tmp $ cp /usr/sbin/sorcerer.install . $ sed -i "s:-zxvf:-zxvpf:" sorcerer.install $ ./sorcerer.install This will get fixed in the next version of the install/rescue CD-ROM, of course. Menu Options: ------------ Guided Installation (Use the menus instead, unless you prefer a linear installation experience) : Select this if you like to simply answer some questions and have sorcerer installed. However please read the detailed explanations for each option, below, since you must understand what each question is about before answering it :) -* NLS (Select editor, language, keymap and console fonts) i) Font (Select a default console font) : For non-us users make sure to select a proper font for your language in order non-latin characters to get displayed in console. ii) Keymap (Select a default keyboard mapping) : Select a proper keymap for your locale. Note for greek users : The current version of console-tools has a bug which prevents it from properly loading the gzipped gr keymap. However after the initial 'sorcery rebuild' (check post-install section) this is fixed automatically. iii) Language (Select a default language) : Select the default language. All console and X programs will use it for menus and messages. iv) Editor (Select a default editor) : Select your editor of choice between nano (recommended for newbies) and elvis (a light-weight vi clone). v) TimeZone (Select timezone for translating GMT into local time) : This is a very important thing, in order your system to work properly. Select your timezone and next, if linux will be the only OS installed select 'GMT', otherwise select 'Local', in order other OS's installed (mainly windows) to work correctly. -* Disc (Prepare partitions and transfer operating system) i) Partition (Partition disk) : Select between cfdsik (easiest solution, recommended for newbies), fdisk (more powerful, yet more difficult than cfdisk) and parted to re-size existing partitions. You can create just one root partition and one swap (aka monolithic setup). However it's highly recommended to create separate partitions at least for /boot and /home. An ext2 partition of 16 megabytes for boot should be sufficient. Using more tan 64M for boot is a waste of disk space. Also since sorcerer stores sources and archives in /var, sometimes it can easily fill up to even 5gb, so make sure you have enough free space. ii) Mount (Mount partitions) : Create filesystems on the partitions you just made and then mount them. Root filesystem must be selected first, because the other file systems are attached to it. Currently sorcerer supports the 3 - 'officially' supported by the Linux kernel - journaled file systems : Reiserfs and ext3. Reiserfs is generally faster than ext3, but requires at least 100mb, so it's not recommended for /boot or other small partitions. Also some features like Quota and ACL don't work currently with Reiserfs. iii) Transfer (Transfer Sorcerer) : Transfers the minimum required installation on the selected partitions. iv) Edit fstab (Edit /etc/fstab after transferring) : Check that partition entries are correct and also put here any additional local or remote filesystems available. If your memory is less than 256mb it's recommended to put a comment (#) in the beginning of the "/tmp" line here. -* Options : Select sorcery options. i) Compile (Select options that effect compilation and linking) a) Architecture : All PC owners select 'i386' here. I think others know already what to select here :) b) BUILD : For CPU's > Pentium II select 'i686-pc-linux-gnu', Pentium/K6 etc., select i586-pc-linux-gnu. c) Debug : Optionally select any flags for debugging. Not really needed, unless you are a developer. d) Default : Select the default compiler. 'none' is fine for the moment. If you want to install gcc-2.95.3 later make sure to check it again. e) Hardware : Select your CPU type, ie. for Pentium III owners select "-march=pentium3". Note that this includes also your cpu's extensions, ie. "-march=pentium3" already includes "-msse -mmx", so it's not necessary to select them separately. f) Optimization : Select your optimization flags. Note that by selecting things here without knowing *exactly* what they mean, you can easily break your system. "-O2" is recommended for normal usage and "-Os" for systems with limited memory or disk space. Once again, be careful here ! You have be warned :) g) Language : Select which languages to enable when compiling gcc. Unless you are a developer, select only 'c++' here. h) Warning : Optionally select any flags for warning messages during compilation. If your are not a developer skip that step. If you are just curious and like to see lots of messages during compilations, select "-Wall" :) i) CFLAGS : Optionally put here any custom additional flags for C. j) CXXFLAGS : Same as (i) for C++. k) LD_FLAGS : Optionally enter any additional LDFLAGS. ii) Feature : Select sorcery's features. In short : * archive : creates tar.bz2 archives of installed programs so you can re-install them later or install them on another system without having to re-compile. * ccache : save and reuse - when possible - object files for faster compilation of upgrades. After the initial installation do '$ /usr/libexec/ccache/ccache --help' for more details about it. This option is not recommended for systems with limited disc space. * color : Colorizes cast and dispel messages. * cvs : Use cvs for downloading official grimoire instead of downloading the whole tarball. Select this unless your system is behind a strict firewall. * heal : Automatically check for and repair broken programs. Make sure to select this unless you know what you know what you are doing. * mail : Select this to get reports via e-mail in the SA's mail address (set in iv - 'Sorcerer'). This requires a configured mail transport agent in order to work. * news : Select this to have sorcery automatically mail system administrator for news about sorcery and security/mandatory updates. Highly recommended option. * necropolis : Create tar.bz2 archives of dispelled programs. A real time-saver when a newer version is broken. Select this unless you're limited on disk space. * prelink : Prelink ELF executables and libraries to startup faster. Highly experimental, can easily break your system. It's reported to create problems with binary-only distributed software, like the NVIDIA GLX drivers. The md5sum integrity check must be disabled in order to prelink. Using prelink is not recommended. * preserve : Preserve modified configuration files or rename and overwrite with defaults. Highly recommended. Also make sure to create back-ups of your /etc often, in case something bad happens... * reap : Remove files when dispelling. Make sure to have this selected, since turning it off causes problems. * retry : Retry compilation a 2nd time after 1st attempt fails. It is useful in conjunction with ccache for compiling on semi-stable boxes. However you should not run sorcerer on any box which isn't stable. * safe : Decline uninstalling spells that might cause other installed spells to break. Leave this one selected too, if you like to have a stable system. * supreme : Always default yes when questioned for optional requirements. Not selecting this is recommended, since you may compile a program without a feature you need/like. * sustain : Forbid removing software that will cause terrible malfunctions when absent. Again, leave this one selected. * xdelta : Upgrade sources using xdelta instead of downloading full source tarballs. Recommended for everyone, even for broadband connection owners. Bandwidth is like water, not unlimited :D By leaving the default options, you will be fine. However feel free to tune everything to match your needs. ii) Integrity : Select methods for discovering missing files, corrupted and modified files, and dynamic linking problems. Select them all... iii) Rates : Select casting, leeching and archiving rates. In short : * Archive : Maximum size - in MB - for archived software. * Cast : Maximum allowed concurrent casts. Make sure to select at least 1 in order cast to work at all. A value of 2 or 3 is highly recommended here, depending on your cpu's power. * Leech : Maximum allowed concurrent downloads. This depends on your Internet connection. * Necropolis : Maximum MB allowed for dispel spells cache. * Nice : Nice value to run cast under. You select between -20 (highest priority) to 19 (lowest). 10-15 is fine for almost everyone. * Prompt : Time in seconds to wait before selecting the default answer on questions about optional dependencies. * Prune : Maximum allowed old versions of sources and caches to keep. * Uncomp : Maximum MB allowed for the uncompressed sources. Time-saver, but not recommended for limited disc spaces. iv) Sorcerer: The System Administrator's e-mail. For locally managed systems simply select 'root'. -* Kernel : Configure and install a boot loader and Linux. i) Boot Loader (Configure a boot loader like lilo or yaboot) * Select Boot Block [] (Select location where boot loader is installed) : Select the disc you want the boot loader to get installed in and either a partition or MBR. If you want to use lilo as the system's main boot loader then it's safe to install it in the MBR, else select your /boot, or / partition. * Template (Generate a simple configuration file) : Useful, unless you want to create the boot loader configuration file from scratch. * Edit (Edit the current configuration file) : Manually edit the boot loader's configuration file to provide extra options or add other OSes. * Run (Run /sbin/lilo) : Run the boot loader to install itself. Required in order your system to boot. Selecting this is not required if the boot loader configuration file is set up correctly. A kernel image line will be entered and the boot loader automatically run on a successful cast of linux. However if you make changes to the boot loader after a cast linux then you can have it re-install by using this. * Restore (Restore previously saved configuration) : Self-explanatory :) ii) Linux (Compile and install linux). So far the installation was just like a binary-based distro's (like slack or debian). In this step you will compile your own custom kernel. If you haven't previously compiled a kernel by yourself, make sure to check the "Kernel Compile HOWTO" in www.tldp.org. In kernel's configuration make sure to build-in (not modules) support for your IDE/SCSI controller and the filesystem you selected for your root partition, plus support for : "/dev file system" and "Virtual memory file system support" They're both in the Filesystem section and will be required during boot. Also make sure to select support for your NIC or PPP (either built-in or modules) to have network working after the installation. Last, but not least if you intend to use ALSA instead of kernel's OSS drivers for sound support, select only "Sound card support" as module without selecting any sound card in the Sound menu. iii) Locales (create and install glibc i18n translation locale databases) : You can select individually which locales should get built. Highly recommended for non-us SAs is to select *only* their locale and en_US/ISO-8859-1, since it reduces the compilation time during updates. -= Network (Configure PPP or Ethernet TCP/IP networking) : * "What is this box called ?", each box must have its own name whether it's part of a LAN or a home box. If your box is part of a LAN, specify here its domain too, in the form of "foo.foobar.org". If you want to run a mail transport agent (like postfix, exim etc.) enter a virtual domain name in order to work. * "How will this box connect to the Internet?" : Select between Ethernet, ppp-chat, ppp-dial2net, or pppoe. -= Shell : Shell out and exit to return. -= Done. : Exit to manual installation or reboot. Post-Installation ----------------- First of all run sorcery to check if the options you want to set are correct. Then do the following in the specified order : $ augur synch $ augur available gcc; augur version gcc If the two versions are not identical do the following in order to update your gcc and build everything with the new version; if the versions are equal skip this part : $ cast -c gcc $ sorcery (to verify that your compiling options haven't changed or else set them again) $ cast -c bin86 $ cast -c binutils It's time to check if our glibc is current, or else update it too : $ augur available glibc; augur version glibc Again, if the two versions are equal skip this part, else update it with : $ cast -c glibc Now you have current versions of gcc, glibc installed. Now it's time to rebuild everything in order to be optimized for our hardware. So do : $ sorcery rebuild This will take some time so better take a nice nap. Once this is finished your system will be optimized and up-to-date. Now feel free to run sorcerer's tools (cast, augur, dispel, leech) without any options and read the on-screen help to learn more about them and get familiar with. Then install any program you want and customize your system, according to your needs. A nice spell to install first is "useful-profile" which installs perl, db, xinetd, the system-logger, mail-transport-agent, mail-client, and cron daemon of your choice.