AROS ​​Vision

Modern and free Amiga-Compatible Experience on Amiga and PC

S:Startup-Sequence explained

The file S:Startup-Sequence is one of the most important boot scripts in AROS OS. It is executed after the kernel and basic system components are running, but before the full desktop environment is ready for normal use. Its job is to prepare the operating system so that commands, libraries, devices, preferences, and the Wanderer desktop can work correctly. 

What Startup-Sequence does 

A typical Startup-Sequence prepares the system step by step. It may set up assigns, create the temporary RAM disk structure, load preferences, mount devices, start background services, and finally start the graphical desktop. Without this script, AROS may boot only partly or may not reach Wanderer at all. 

prepares important system paths such as C:, S:, Libs:, Devs:, and Prefs:
sets up temporary locations such as RAM: and ENV:
loads saved preferences from ENVARC:
mounts devices from DEVS:DOSDrivers
starts system services and helper programs
runs S:User-Startup for user-specific additions
starts the graphical desktop, usually Wanderer 

Where the file is located 

The file is normally stored in the script drawer: 
S:Startup-Sequence 

The assign S: usually points to the system script directory, often SYS:S. This means the physical file may be located in the system partition, but programs refer to it using the logical name S:. 

Simple boot flow involving 

Startup-Sequence Bootloader starts AROS

Kernel initializes basic system

System volume becomes available as SYS:

S:Startup-Sequence is executed

Assigns, devices, preferences, and services are prepared

S:User-Startup is executed if present

Wanderer desktop starts 

Typical commands and parts 

A Startup-Sequence can differ between AROS distributions, but the following parts are common in Amiga-like systems. 

Assigns 
Assigns create logical names for important drawers. For example, C: points to command programs, Libs: points to libraries, and Devs: points to device files. This allows programs to find important files without knowing the exact physical path. 

Assign C: SYS:C
Assign Libs: SYS:Libs
Assign Devs: SYS:Devs
Assign Prefs: SYS:Prefs 

Path 
The path tells the Shell where to search for commands. If C: is in the path, the user can type dir instead of the full command path. Path 

C: Add 

Environment variables 

AROS uses ENV: for current temporary environment settings and ENVARC: for permanent saved settings. During startup, saved settings may be copied or made available so programs can read them. 

MakeDir RAM:ENV
Assign ENV: RAM:ENV
Copy ENVARC: ENV: ALL QUIET 

Mounting devices 
Devices described in DEVS:DOSDrivers may be mounted during startup. This can make devices such as CD drives, removable media, or additional volumes available automatically. 

Mount DEVS:DOSDrivers/~(#?.info) 

This example means that mount definitions are taken from DEVS:DOSDrivers, while icon files ending in .info are ignored. 

Starting services and background programs 
Some commands start services or helper programs in the background. These may prepare networking, input handling, commodities, or other system features. The exact commands depend on the installed AROS distribution. 

User-Startup 
The main Startup-Sequence should normally stay clean and system-controlled. User-specific additions are often placed in S:User-Startup. This file can contain additional assigns, paths, or startup commands for installed software. 

If Exists S:User-Startup
    Execute S:User-Startup
EndIf 

Safe editing advice·        

Before editing S:Startup-Sequence, make a copy such as Startup-Sequence.backup. ·        
Prefer putting custom additions into S:User-Startup
Change only one thing at a time, then reboot and test
If AROS no longer reaches the desktop, boot from an ISO or rescue environment and restore the backup
In a virtual machine, create a snapshot before experimenting. 

In short, S:Startup-Sequence is the script that turns a partly booted AROS system into a usable desktop system. It prepares assigns, paths, temporary directories, environment settings, devices, user startup commands, and finally the graphical desktop. Beginners should understand it, but normally edit S:User-Startup instead of changing the main startup script directly. 

Below is a detailed line-by-line explanation of Startup-Sequence file. 

Overall purpose This startup file prepares AROS after the kernel has already started. It creates temporary RAM drawers, sets important assigns such as ENV:, T:, FONTS:, LOCALE:, WANDERER:, loads preferences, mounts devices, prepares themes and fonts, starts helper services such as clipboard, USB, datatypes, ARexx master, and finally starts Wanderer.
      
Line-by-line explanation 

SetClock LOAD 

Loads the system clock from the hardware clock into the running AROS session. This makes the correct date and time available early during startup. 

FailAt 21 

Sets the error tolerance level for the script. Commands may return warning or error codes; FailAt 21 means the script should only stop at serious failures. This helps startup continue even if non-critical commands return warnings. 

If NOT EXISTS "RAM:Clipboards"    
MakeDir "RAM:Clipboards"EndIf 

Checks whether the temporary clipboard drawer exists in RAM:. If not, it creates it. This gives the system a place for clipboard-related temporary data. 

If NOT EXISTS "RAM:T"    
MakeDir "RAM:T"
EndIf 

Checks whether the temporary drawer RAM:T exists. If not, it creates it. T: is normally used by programs for temporary files. 

If NOT EXISTS "RAM:ENV"    
MakeDir "RAM:ENV"    
Assign "ENV:" "RAM:ENV"
EndIf 

Creates the active environment drawer in RAM if it does not exist, and assigns ENV: to it. ENV: contains environment variables for the running session. 

Assign "T:"       "RAM:T" 

Assigns T: to RAM:T. Programs can now use T: for temporary files without needing to know the real path. 

Assign "CLIPS:"   "RAM:Clipboards" 

Assigns CLIPS: to the clipboard drawer. Clipboard-related tools can use this logical path. 

Assign "KEYMAPS:" "DEVS:Keymaps" 

Assigns KEYMAPS: to the keymap drawer. This is where keyboard layout files are located. 

Assign "LOCALE:"  "SYS:Locale" 

Assigns LOCALE: to the system locale drawer. Locale files control language, regional settings, catalogs, and localized help resources. 

Assign "LIBS:"    "SYS:Classes" ADD 

Adds SYS:Classes to the LIBS: assign. This means AROS can search SYS:Classes when looking for library-like components. The ADD option appends this path instead of replacing existing LIBS: locations. 

Assign "FONTS:"   "SYS:Fonts" 

Assigns FONTS: to the main system font drawer. Font-related tools and programs can use this logical path. 

Assign "HELP:"    "LOCALE:Help" DEFER 

Assigns HELP: to LOCALE:Help. DEFER delays resolving the assign until it is actually used, which can help when dependent assigns or paths are not fully ready yet. 

Assign "THEMES:"  "SYS:Prefs/Presets/Themes" >NIL: 

Assigns THEMES: to the system themes drawer. Output is redirected to NIL:, so messages are hidden. 

Assign "IMAGES:"  "SYS:System/Images" DEFER 

Assigns IMAGES: to the default system image drawer. DEFER delays resolving it until needed. 

Assign "PRINTERS:" "DEVS:Printers" 

Assigns PRINTERS: to the printer driver/configuration drawer. Printing tools can use this location. 

Assign "WANDERER:" "SYS:System/Wanderer" DEFER Assigns WANDERER: to the Wanderer desktop drawer. This makes it easy to start Wanderer later with WANDERER:Wanderer. 

If EXISTS "C:SetPatch"    C:SetPatch QUIET
EndIf 

If SetPatch exists, it is run quietly. SetPatch applies system patches or updates needed during startup. The check prevents an error if the command is missing. 

If EXISTS "SYS:Classes/USB"    
Assign "USBCLASSES:" "SYS:Classes/USB"    
Run <NIL: >NIL: QUIET AddUSBClasses
EndIf 

If USB class files exist, the script assigns USBCLASSES: to that drawer and runs AddUSBClasses in the background. Input and output are redirected to NIL:, so it runs silently. This prepares USB class support. 

If EXISTS "SYS:DiskImages"    
Assign "FDSK:" "SYS:DiskImages"
EndIf 

If the disk image drawer exists, it assigns FDSK: to it. This likely gives disk-image tools a standard place to find image files or related resources. 

Automount >NIL: 

Runs Automount silently. This tries to automatically detect and mount available devices or volumes. Output is hidden. 

Mount >NIL: "DEVS:DOSDrivers/~((.#?)|(#?.info)|(#?.dbg))" 

Mounts DOS drivers from DEVS:DOSDrivers, but excludes certain files. The pattern skips hidden/temporary-style files, icon files ending in .info, and debug files ending in .dbg. Output is redirected to NIL:. 

Dir >NIL: "PIPE:" 

Accesses PIPE: silently. This likely ensures the pipe device/handler is initialized and available. PIPE: is used for inter-process command piping. 

Path "C:" "SYS:System" "S:" "SYS:Prefs" "SYS:Tools" "SYS:Utilities" QUIET 

Sets the command search path. This lets the Shell find commands in C:, SYS:System, S:, SYS:Prefs, SYS:Tools, and SYS:Utilities without needing full paths. 

If EXISTS "SYS:Tools/Commodities"    
Path "SYS:Tools/Commodities" QUIET ADD
EndIf 

If the Commodities drawer exists, it is added to the command path. Commodities are small background tools or system helpers. 

If EXISTS "SYS:Demos"    
Path "SYS:Demos" ADD QUIET
EndIf 

If a demos drawer exists, it is added to the path. This makes demo programs easier to start from the Shell. 

If EXISTS "Sys:RexxC"    
Path "Sys:RexxC" ADD QUIET
EndIf 

If the Rexx command drawer exists, it is added to the path. This supports REXX/ARexx-related command use. 

Copy >NIL: "ENVARC:" "ENV:" ALL NOPRO NOREQ PAT "~(def_#?.info)" 

Copies saved environment settings from ENVARC: to active ENV:. ALL copies recursively, NOREQ avoids requesters, NOPRO avoids copying protection bits, and the pattern excludes matching default .info icon files. This loads saved preferences for the current session. 

If EXISTS "ENV:SYS/theme.var"    
Assign "THEME:" "${SYS/theme.var}"
Else    
Assign "THEME:" "THEMES:AROSDefault"
EndIf 

Checks whether a theme variable exists. If it does, THEME: is assigned to the selected theme path stored in that variable. If not, THEME: falls back to THEMES:AROSDefault. 

If EXISTS "THEME:Images"    
Assign "IMAGES:"  "THEME:Images" PREPEND
EndIf 

If the selected theme contains its own Images drawer, it is prepended to the IMAGES: assign. PREPEND means theme images are searched before default system images. This lets themes override default graphics. 

Touch >NIL: "FONTS:__TEST__" 

Tries to create or update a test file inside FONTS:. This checks whether the fonts drawer is writable. Output is hidden. 

If WARN 

Checks whether the previous Touch command produced a warning. If it did, the script assumes that FONTS: may not be writable.

Makedir "RAM:Fonts"Assign "FONTS:" "RAM:Fonts" 

Creates a temporary font drawer in RAM and assigns FONTS: to it. This gives the system a writable font location even if the original SYS:Fonts is not writable. 

Makedir "FONTS:fixed"Copy >NIL: "SYS:Fonts/fixed" "FONTS:fixed" ALL CLONE NOREQ 

Creates a temporary fixed font drawer and copies the system fixed font files into it. CLONE preserves file attributes as much as possible. 

Makedir "FONTS:arial"Copy >NIL: "SYS:Fonts/arial" "FONTS:arial" ALL CLONE NOREQ 

Copies Arial fonts into the temporary writable font area. 

Makedir "FONTS:stop"Copy >NIL: "SYS:Fonts/stop" "FONTS:stop" ALL CLONE NOREQ 

Copies the stop font set into the temporary font area. 

Makedir "FONTS:ttcourier"Copy >NIL: "SYS:Fonts/ttcourier" "FONTS:ttcourier" ALL CLONE NOREQ 

Copies the ttcourier font set into the temporary font area. 

Makedir "FONTS:XEN"Copy >NIL: "SYS:Fonts/XEN" "FONTS:XEN" ALL CLONE NOREQ 

Copies the XEN font set into the temporary font area. 

FixFonts >NIL: 

Rebuilds or refreshes font information silently. This helps AROS recognize the copied fonts. 

Assign >NIL: "FONTS:" "SYS:Fonts" ADD 

Adds the original SYS:Fonts back to the FONTS: assign, so the system can use both the temporary writable fonts and the original system fonts. Else    

If NOT EXISTS "FONTS:fixed.font"        
FixFonts >NIL:    
EndIf
EndIf 

If the font drawer was writable, the script checks whether fixed.font exists. If it does not, FixFonts is run to rebuild font metadata. This ensures basic font information is available. 

Assign >NIL: "FONTS:" "FONTS:Russian" ADD 

Adds FONTS:Russian

 to the font search path. This makes Russian font resources available if present. 

If EXISTS "FONTS:__TEST__"    Delete "FONTS:__TEST__" QUIET
EndIf 

Removes the temporary test file created earlier. This cleans up after the font write test. 

AddDataTypes REFRESH QUIET 

Refreshes datatypes quietly. Datatypes allow AROS applications to recognize and load different file formats, such as images, text, sounds, or other media types. 

If EXISTS "C:PsdStackLoader"    
PsdStackLoader >NIL:
EndIf 

If PsdStackLoader exists, it is run silently. This appears to load or initialize the Poseidon USB stack component if available. 

Run <NIL: >NIL: QUIET ConClip 

Starts ConClip in the background. ConClip supports console clipboard behavior. Input/output are redirected to NIL: so it runs silently. 

If EXISTS "C:RexxMast"    
Assign "REXX:" "S:"    
Run <NIL: >NIL: QUIET 
C:RexxMast
EndIf 

If RexxMast exists, the script assigns REXX: to S: and starts RexxMast in the background. RexxMast is the ARexx master process, needed for ARexx-style script communication. 

If EXISTS "C:Decoration"    
If EXISTS "ENV:SYS/theme.var"        
C:Decoration <NIL: >NIL:    
EndIf
EndIf 

If the Decoration command exists and a theme variable exists, it runs Decoration silently. This likely applies themed window decoration or visual style settings. IPrefs Loads and applies Intuition preferences. This activates GUI-related preferences such as screen, font, pointer, palette, and interface settings. 

Assign EXISTS "Extras:" >NIL: 

Checks whether the assign Extras: already exists. Output is hidden. If WARN If the previous check returned a warning, Extras: does not exist, so the script tries to create it. 

If EXISTS "$EXTRASPATH"    
Assign "Extras:" "$EXTRASPATH"
Else    
Assign "Extras:" "SYS:Extras" >NIL:    
If WARN        
Assign "Extras:" "NIL:" >NIL:    
EndIf
EndIf 

This sets up the Extras: assign. First it tries the environment variable $EXTRASPATH. If that does not exist, it tries SYS:Extras. If that also fails, it assigns Extras: to NIL: so programs looking for Extras: do not fail completely. 

If EXISTS "ENV:SYS/Packages" 

Checks whether a packages configuration drawer exists in the active environment. If it does, package-specific startup processing begins. 

List "ENV:SYS/Packages" NOHEAD FILES TO "T:P" LFORMAT="..." 

Lists package entries and writes generated startup commands to the temporary file T:P. NOHEAD removes the list header, FILES means only files are listed, and LFORMAT creates a custom command block for each package. 

The generated commands roughly do this for each package:
check whether the package path exists
change into the package directory
if S/<PackageName>-Startup exists, execute it
otherwise, if S/Package-Startup exists, execute that
then continue to the next package

This is an automatic package startup mechanism. 

Execute "T:P" 

Executes the temporary generated package startup script. 

Delete "T:P" QUIET 

Deletes the temporary package startup script after it has been used. 

CD "SYS:" 

Changes the current directory back to the system volume. This ensures startup continues from a known location after package scripts may have changed directories. EndIf Ends the package startup block. 

Protect "S:PCD" "s" ADD QUIET
Protect "S:SPat" "s" ADD QUIET
Protect "S:DPat" "s" ADD QUIET 

Adds the script protection bit s to these files. This helps them behave as executable scripts or command helpers. They are likely helper scripts for path or pattern handling. 

If EXISTS "S:User-Startup"    
Execute "S:User-Startup"
EndIf 

If the user startup file exists, it is executed. This is the safer place for user-specific additions such as extra assigns, paths, or program startup commands. 

If EXISTS "WANDERER:Wanderer"    
WANDERER:Wanderer    
If NOT ERROR        
EndCLI    
EndIf
EndIf 

If the Wanderer desktop executable exists, it starts Wanderer. If Wanderer starts without an error, EndCLI closes the startup CLI process. This is the final step that brings the user to the graphical desktop.
      
In simple stages Your startup sequence does this: 
Loads the system clock.
Sets error handling.
Creates important temporary RAM drawers.
Creates assigns for temporary files, clipboard, locale, fonts, themes, printers, and Wanderer.
Applies patches if available.
Prepares USB classes if available.
Mounts devices and DOS drivers.
Sets the Shell command path.
Copies permanent preferences from ENVARC: to ENV:.
Selects and applies the current theme.
Tests and prepares fonts.
Refreshes datatypes.
Starts USB, clipboard, ARexx, and decoration helpers if available.
Loads GUI preferences with IPrefs.
Sets up Extras:.
Runs package startup scripts.
Executes S:User-Startup.
Starts Wanderer and closes the startup CLI.

Beginner conclusion This is a fairly complete AROS startup sequence. It is not only starting the desktop; it also prepares many important system services: environment variables, fonts, themes, datatypes, USB, ARexx, clipboard support, packages, and user startup commands. For beginners, the safest area to customize is usually S:User-Startup, not this main startup file.