sanos home

Installing sanos

In order to install sanos you first need to make a boot disk. You can either use the compiled version or build sanos from source. If you want to build sanos from source see  Building sanos from source. If you want to use the compiled version download the file from the download page. Unzip the files into a directory (e.g. c:\sanos) and go to the build directory and execute the mkbootdisk batch script:

c:\sanos\build> mkbootdisk

This makes a sanos.flp file in the win\img directory. This file can be written to a blank floppy disk using the mkfloppy utility found in the win\tools directory:

c:\sanos> win\tools\mkfloppy a: win\img\sanos.flp

Boot your computer using the disk. Remember to set Floppy Disk as your first boot device in your BIOS setup. Booting sanos from floppy will not install any files on your hard disk.

If everything goes well you should see something like this:


Loading system
sanos version 1.3.2 Build 1 (Apr 3 2005 15:49:17)
Copyright (c) 2001-2004 Michael Ringgaard. All rights reserved.
cpu: Intel Pentium III (Coppermine) family 6 model 8 stepping 6
speed: 8013599 cycles/tick, 800 MHz processor
hd0: IBM-DTLA-305010 (9641 MB), LBA, UDMA66, read ahead, write cache
hd0a: partition 0 on hd0, 2996MB (type 07)
hd0b: partition 1 on hd0, 2000MB (type 05)
hd0c: partition 2 on hd0, 1024MB (type 01)
fd0: 3 1/2" 1.44M, 1440 KB, THS=80/2/18
mount: root on device fd0
eth0: Accton EN-1207D Fast Ethernet Adapter iobase 0x7800 irq 11 hwaddr 00:10:b5:bf:a7:bb
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 41e1
com1: 16550A iobase 0x3f8 irq 4
mem: 255MB total, 1336KB used, 259336KB free, 448KB reserved
\$ _

The boot disk starts the shell as the initial application. You can use many of the standard Unix shell commands like ls, cp, mv, etc. The help command displays all the supported commands.


Viewing system information from the /proc file system


The /proc file system contains a number of virtual files that can be used for displaying system information, e.g. the following command display a list of all threads in the system:

\$ more /proc/threads
\$ more /proc/thread
tid tcb      hndl state  prio s #h user   kernel ctxtsw stksiz name
--- -------- ---- ------ ---- - -- ------ ------ ------ ------ --------------
  0 90402000    0 ready   0+0 0  0      0  25872   1842     0K idle
  1 92004000    0 taskq   8+1 0  0      0      2   1742     0K systask
  2 92006000    3 wait    8+1 0  1      0      2     32    12K init
  3 92050000    0 wait    7+1 0  0      0      0     26     0K lazywriter
  4 92084000    0 wait    8+1 0  0      0      1      9     0K ethertask
  6 92094000    8 devio   8+0 0  1      0      0      1     8K user
  7 92096000    9 run     8+1 0  2      0      1     56    12K user
\$ _


The following /proc files can be used:


Cofiguring network settings


The default installation is set up to use DHCP to obtain TCP/IP settings from a DHCP server. If you do not have a DHCP server on your network you can either boot without network or manually configure network.

To boot without network remove the following section from os.ini before building the bootdisk:


To configure your network manually change the [netif] section to something like:


You can use the edit program to modify the /etc/os.ini file (i.e. edit /etc/os.ini).


Installing sanos on the hard disk


WARNING: Running the fdisk and setup programs can destroy all files on your hard disk.

The setup utility is configured to install sanos on the hard disk. You can change the setup script in /setup/setup.ini to customize the setup. Before you install sanos on the hard disk you need to make sure that your have at least one partition on the primary hard disk. Also, this partition must be bootable. You can setup the partitions using the fdisk utility on the boot floppy:

If you want to install sanos on the hard disk type:

\$ setup

at the shell prompt after sanos has started. This will install sanos on the first partition of the primary hard disk. After the setup program completes remove the floppy and boot the computer. Now sanos will boot from the hard disk.


Customizing the setup script


When the setup utility is executed it uses the setup script file located in /setup/setup.ini. If you want to use another setup script you can just give its filename as an argument on the command line.

The setup script is an .ini file with a section for each stage of the setup:

# setup.ini

product=Sanos OS