INSTALLING ATHEOS Even though it was possible to install previous versions of AtheOS on a FAT partition the current version must be installed on a native (AFS) partition. In the future it will be possible to boot from a native FS that is located inside a file on a FAT FS (and other filesystems if AtheOS drivers are written for them). I am working on an installer that will automate most of the installation but it is not yet finished so to install the current version you must write the "atheos-#.#.#.boot.##" and "atheos-#.#.#.data.##" floppy images on a set of floppies and boot AtheOS from there. After booting from the floppies you will have a shell (BASH) in a terminal emulator. From the shell you can mount existing FAT and AFS partitions, create AFS filesystems, and unpack the install archive with the "tar" and "gzip" tools included on the floppies. Here is a step-by-step description on how to make the partition and install the OS: First you have to write the (currently 3) floppy images to a set of floppy disks. From Linux, BeOS, AtheOS, and most other OS's you can do this with "dd" from a shell. On Windows you will need a special program that can write a raw disk image to a floppy. There is a free utility named "rawwrite" that can be used to create the floppies under Windows. After creating the boot-floppies you should be able to boot AtheOS and continue with the installation. If you don't already have a partition ready for the AFS filesystem you must first create one with the "DiskManager" tool that is included on the boot floppies. Just run "DiskManager &" from the shell. The partition editor has a fairly self-explanatory GUI where you first select the disk to edit and then edit the partitions either graphically by dragging the partition indicators or by explicitly typing start and end positions for each partition. Then you must get access to the archive containing the installation. There are several ways to do this. If possible the best way to achieve this is to put the base-atheos-#.#.#.tgz file on a FAT partition before booting AtheOS and then mount that partition under AtheOS. If you don't have a FAT partition and are not able to create one you must resort to floppy disks. You must then split the archive into files that can fit on a floppy. The simplest way to do this is probably to write the segments to raw floppies, but you can also make a FAT filesystem on the floppy and put each segment as a normal file inside that FS (it will be annoying to mount/copy/unmount all the floppies under AtheOS though). To mount a FAT partition you must first make a mount-point and then mount the right partition. A mount-point is simply a directory and can be made with "mkdir". To mount the partition you must first figure out what the path is for that partition inside the /dev/ directory hierarchy and then mount it with the "mount" command. The /dev/ directory in AtheOS is not flat like for example under Linux but hierarchical, and the disk block-devices are located under /dev/disk/. Currently the only driver available is the BIOS disk-device so all disks are located under /dev/disk/bios/ and are named hda, hdb, hdc, etc etc. These disk-names are themselves directories that contain the actual device nodes. Under each drive you will find at least one node named "raw" that represent the whole disk and if the disk has a valid partition table you will find one node for each partition named "0", "1", etc etc. So to get the second partition on the third drive you will have to write /dev/disk/bios/hdc/1 (partition numbers start at 0). The disks are listed in the order they were reported by the BIOS so drive 0x80 is hda, 0x81 is hdb and so on. In the following example I will assume that the base archive is located at /download/atheos-base-0.3.0.tgz on a FAT partition on the first partition (0) on the first drive (hda) and that we want to install the OS on the second partition (1) on the first drive (still hda :). INSTALLING THE OS FILES First we make a mount-point for the FAT partition and mount it: bash-2.03$ mkdir dos bash-2.03$ mount /dev/disk/bios/hda/0 dos Then we must create and mount the native FS, be 100% sure you select the right partition before formatting it (see the fsprobe and devstat notes below): bash-2.03$ format /dev/disk/bios/hda/1 afs MyAtheOSPartition bash-2.03$ mkdir afs bash-2.03$ mount /dev/disk/bios/hda/1 afs Now we are ready to unpack the base archive to install the FS: bash-2.03$ cd /afs bash-2.03$ tar -xvpzf /dos/download/atheos-base-0.3.0.tgz This should create an "atheos" directory containing well... AtheOS and a "boot" directory containing the GRUB bootloader inside the /afs/ mount-point. CONFIGURING THE BOOTLOADER Next step is to configure and install the bootloader. First you must tell GRUB where to find the kernel and the required disk/FS drivers to load before booting AtheOS. This information is found in "/afs/boot/grub/menu.lst". If you have other OS's installed on the machine you must either configure GRUB as a boot-manager or install another boot-manager that can "chainload" GRUB from the AFS partition. The menu.lst file should look something like this to boot AtheOS from the installation described above: title AtheOS root (hd0,1) kernel /atheos/sys/kernel.so root=/dev/disk/bios/hda/1 module /atheos/sys/drivers/fs/afs module /atheos/sys/drivers/dev/disk/bios This will tell GRUB to boot partition number 2 on the first drive through the "root (hd0,1)" command and where to find the kernel, the boot block-device driver and the boot-FS driver on that partition. The "root=/dev/disk/bios/hda/1" string after the kernel-path is a parameter that is passed to the kernel and tells what partition to mount as /boot/ before continue to boot. The kernel can also take a number of other parameters (listed below) that are given in the same manner after the "root" param. If you install AtheOS on the second partition on the first drive the default config-file is ok. otherwise you must edit the "root (disk,partition) line to fit your setup. If you want to boot other OS's with GRUB you must add them to the config file as well. For example to boot BeOS, or Windows, or most other OS's that have a bootblock you can use the "chainloader" command like this: title BeOS chainloader (hd0,3)+1 This will add a menu entry titled BeOS that will boot the OS found on the fourth partition on the first disk. You can also set a timeout for when to boot the first OS in the list (or the default as set by the "default" command) with the "timeout" command: timeout 5 INSTALLING THE BOOTLOADER When done editing the config file you must reboot the computer by pressing , , and simultanously (DO NOT HIT THE RESET OR POWER BUTTON. THIS WILL CAUSE CACHED DATA THAT HAS NOT YET BEEN WRITTEN TO THE DISK TO BE LOST AND THE INSTALLATION TO BE CORUPTED!) boot from the floppy disk again to install the bootloader. This time you should abort GRUB before it boot AtheOS by hitting and then hit "C" to enter the GRUB shell from which you can finish the install. Now you must decide whether you want to install GRUB in the MBR (Master Boot Record) of the first drive and use it as a boot-manager (or if AtheOS is the only OS on the machine) or if you want to install it on the AFS partition only and use another bootmanager select what OS to boot. In either case you must tell GRUB where to find the config file and the second-stage loader by setting a "root" partition: root (hd0,1) If you did not install AtheOS on the second partition on the first disk you must change the parameters accordingly. Then you must install the boot-loader with the "setup" command. To install on a MBR of the first drive run: setup (hd0) To install it on the AFS partition only run: setup (hd0,1) (again change the parameters according to your setup) Now it should be possible to boot AtheOS off the native partition. NOTE GRUB understands the AFS filesystem and can boot any kernel located on an AFS partition by changing the "kernel" line in the config file or by manually loading the kernel and required modules from the GRUB shell. There is no need to run any tools to update block-lists or anything like that after installing new kernels. Read the GRUB documentation and use the "help" command in the GRUB shell for more information on the bootloader. To edit the config file you can use "jed" which is a easy-to-use text editor included on the boot-floppies. There is a couple of tools on the floppy that can help you find the right partition. To find an existing filesystem you can use "fsprobe". "fsprobe" takes a block-device path as it's only parameter and will ask each filesystem driver if they recognize the partition and, if one of them do, it will print the FS-type, the volume label and some size/usage stats. The other tool is "devstat" that also takes a block-device path and prints the size and geometry of the disk/partition. This can be useful to verify that the partition you are about to format is really the one you intend to nuke. ADDITIONAL KERNEL PARAMETERS You can pass various parameters to the kernel at boot-time through the GRUB "kernel" line. Normally the only required parameter is "root=/dev/disk/" to tell the kernel what FS to boot from. Other parameters can be passed to override autodetected values, disable features, etc etc to aid debugging and help AtheOS run under "unusual" environments. All the kernel parameters and the general rules for passing parameters to the kernel are described in "/atheos/Documentation/kernel-parameters.txt". HOW TO LOG IN, AND HOW TO ADD NEW USERS AtheOS is a multiuser OS. Before you are able to do anything you will have to log in using a user-name and a password. The base-installation comes with two predefined users. "root" with the password "root" is the super-user and has unrestricted access to the system. The other user is "guest" with the password "guest". This is a normal user. Eventually I will write a GUI based tool for adding users and change their attributes. In the meantime you will have to add users by manually editing the password file found in /etc/password. This files contains one line for each user. Each line looks something like this: guest:$1$$ysap7EeB9ODCr:500:100:Guest account:/home/guest:/bin/bash The user description consists of several elements separated by colons (:). The elements are: login_name:password:userid:groupid:Full Name:home_dir:login shell To add a user you copy the line describing the guest account and change the following elements: o The username (first field). o The password (second field). The password is MD5 encrypted and can be created by the "crypt" utility: >crypt mypassword >Password: '$1$$xyAQ/aL.VY49zzXfVYUfK0' The crypt utility takes a string as a parameter and prints the MD5 encrypted hash that you should put in the password file. o User id (third field). Each user must have an unique ID. It should be an integer number between 1 and 2147483648. Remember that this ID will be used to identify the user throughout the system and will be embedded in every file owned by this user. You should be very careful not to change it after the user is created! o Group ID (fourth field). This ID should correspond to one of the user groups defined in /etc/group. You should normally leave this unchanged. o User name (fifth field). This should be the full name of the new user. o Home directory (sixth field). This should be a path pointing to the new user's home directory. This is where user-specific configurations are kept. The home directory should normally be named after the login name. You should copy the guest homedir to get a basic configuration for the new user. (cp -a /home/guest /home/kurt) This example shows a user with the following properties: Login name: kurt Full name: Kurt Skauen Password: mypassword User ID: 501 Group ID: 100 Home directory: /home/kurt Shell: /bin/bash kurt:$1$$xyAQ/aL.VY49zzXfVYUfK0:501:100:Kurt Skauen:/home/kurt:/bin/bash INSTALLING OPTIONAL SOFTWARE PACKAGES When you get the thing to boot, you can start installing the different optional packages. To install a package you simply start a shell, become root (su -l) and go into the /usr/ directory and unpack the tarball with a command like this: >tar -xvpzf /atheos/packages/emacs-19.34.bin.tgz Then you must run "pkgmanager -a /usr/packagedir" to register the package with the system. To register emacs run the following: >pkgmanager -a /usr/emacs This will make a bunch of symlinks in various subdirectories of /atheos/autolnk/ to make it possible for the system to find executables and other files belonging to the package. Voila you should now have the new package installed. If you want to uninstall the package again you should clean out the symbolic links from /atheos/autolnk/ by running: >pkgmanager -r /usr/emacs before deleting the actual package directory itself: rm -R /usr/emacs (BE CAREFUL!). Please note that this way of installing software should ONLY BE USED FOR COMMAND LINE APPLICATIONS AND APPLICATIONs PORTED TO ATHEOS FROM UNIX AND OTHER OS's USING A UNIX LIKE FILESYSTEM. Native applications should use the various mechanism available in AtheOS for making the application "position independent" so it can be installed anywhere on the HD. This mechanism include the option of opening files using paths relative to the location of the executable file (and to obtain the path to the directory where the binary lives) and the ability to embed resources within the executable image itself. Remember that AtheOS is a multiuser OS and that you often must be "root" in order to install new software packages. You become root by typing "su -l" in a shell and then type the "root" password (Default password is "root"). If you want a backdrop image on your desktops you can put a jpeg image at: /system/backdrop.jpg (This will soon be configurable) and restart the desktop manager (kill_all -TERM desktop; desktop &). The image will be tiled if it is smaller than the desktop, and clipped if it is larger. If you have problems with the installation you might want to take a look at the FAQ or subscribe to the mailing-list and/or read the list-archive. Both the FAQ and the mailing-list can be found at http://www.atheos.cx/ Good luck with the installation.