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 sanos-bin-x.x.x.zip 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:

[netif]
eth0

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

[netif]
eth0:ip=192.168.123.5,gw=192.168.123.1,mask=255.255.255.0

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.
DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING !!!

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
#

[setup]
product=Sanos OS

[actions]
format
sysprep
mount
kernel
mkdirs
copy
unmount

[format]
device=hd0a
blocksize=4096
cache=1024
quick=0

[sysprep]
device=hd0a
bootstrap=/setup/boot
loader=/setup/osldr.dll

[mount]
mntfrom=hd0a
mntto=/mnt
fstype=dfs

[kernel]
kernel=/bin/krnl.dll
target=/mnt/bin

[mkdirs]
/mnt/dev
/mnt/proc
/mnt/tmp
/mnt/mnt
/mnt/etc
/mnt/usr

[copy]
/mnt/bin/os.dll=/bin/os.dll
/mnt/bin/sh.exe=/bin/sh.exe
/mnt/bin/edit.exe=/bin/edit.exe
/mnt/bin/httpd.dll=/bin/httpd.dll
/mnt/bin/ftpd.exe=/bin/ftpd.exe
/mnt/bin/telnetd.exe=/bin/telnetd.exe
/mnt/bin/login.exe=/bin/login.exe
/mnt/bin/3c905c.sys=/bin/3c905c.sys
/mnt/bin/pcnet32.sys=/bin/pcnet32.sys
/mnt/bin/ne2000.sys=/bin/ne2000.sys
/mnt/bin/rtl8139.sys=/bin/rtl8139.sys
/mnt/bin/eepro100.sys=/bin/eepro100.sys
/mnt/bin/sis900.sys=/bin/sis900.sys
/mnt/bin/msvcrt.dll=/bin/msvcrt.dll
/mnt/bin/kernel32.dll=/bin/kernel32.dll
/mnt/bin/user32.dll=/bin/user32.dll
/mnt/bin/advapi32.dll=/bin/advapi32.dll
/mnt/bin/wsock32.dll=/bin/wsock32.dll
/mnt/bin/winmm.dll=/bin/winmm.dll
/mnt/bin/jinit.exe=/bin/jinit.exe
/mnt/etc/krnl.ini=/setup/krnl.ini
/mnt/etc/os.ini=/setup/os.ini

[unmount]
path=/mnt