Install OS Inferno New Edition (update)
- Tutorial
FAQ: What is OS Inferno and why is it needed?
The information in the previous post was out of date for almost 4 years, and I was asked to update it. They also asked not to mix installation with setup in one post, therefore there will only be installation, and the setup is described in a separate post in a separate post. Update: Installation description for Windows was updated in June 2014.
So, we will install the distributed Inferno OS . There are installation instructions on the official website , but they are not entirely correct and also a little outdated. Inferno can work in two modes - native (on bare hardware or in qemu / etc. Like all regular OSs) and hosted(as a regular application under * NIX / Win). Installation instructions for native Inferno can be found on the Russian wiki . In addition to this, there are other options - for example, installing Inferno on Android (English) . Personally, I don’t see the point of using native Inferno on regular computers, so I will describe the installation of hosted Inferno under Gentoo, Ubuntu, FreeBSD, MacOSX and Windows.
Theoretically, the latest official Fourth Edition was released around 2004. The current version is in the Mercurial repository on Google Code, and calls itself “New Edition.” In practice, it makes no sense to use anything other than the current version from the repository - it is absolutely stable, and has always been stable. We will put it.
Inferno can be installed system-wide (e.g. c
OS Inferno 32-bit. Therefore, to install and run on 64-bit OSs, support for 32-bit applications on these OSs is required. Unfortunately, under 64-bit FreeBSD-9.0, I was not able to start inferno.
Inferno executes code in a virtual machine, plus it supports JIT, so it has the same problems with various protections as Java, etc. In a previous article, I paid more attention to this topic, if you have questions, look there.
Installed inferno takes about 200MB. But the installation of compilers may require up to 3-odd gigabytes (for example, on Xcode or Visual Studio). Inferno compiles in just a couple of minutes on the middle system.
When installing inferno in your home directory, keep in mind that inferno does not like specials. characters in the names of files / directories, so if the path to the home directory contains, for example, a space, there may be difficulties that I did not consider.
Everything is trivial in (Hardened) Gentoo Linux 32/64-bit - there is a package that puts the inferno system-wide in
And now we will deal with other OSes.
I have already installed Xcode (3.2.2) and Mercurial (1.7.1).
Install Xcode (4.3.2) through the App Store.
Launch Xcode, go to the Xcode - Preferences - Downloads menu and click Install for Command Line Tools.
We go to mercurial.berkwood.com and download / install the current version (Mercurial 2.2.2 for OS X 10.7).
We go to mercurial.selenic.com/downloads and download / install the current version (3.0.1).
But with the compiler there are options. The obvious option with installing Visual Studio Express will cost more than 3 gig per screw. An alternative - to put WinSDK - will cost about 800 megabytes. I will describe both options, choose for yourself.
First option. We go to www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express and download / install / update (according to Russian custom - three times :) otherwise not all updates will be installed) "Visual C ++ 2010 Express ".
The second option. First, go to go.microsoft.com/fwlink/?LinkId=187668 and download / install the full ".NET Framework 4". Then we go towww.microsoft.com/en-us/download/details.aspx?id=8279 and download / install “Windows SDK 7.1”. When installing, it is enough to limit yourself to these points:
Despite the fact that the official website offers a separate archive for Windows, and separate binaries for the poppy, we don’t need all this, and it’s even harmful (the archive for Windows is not updated normally from the repository - there are conflicts). So under all OS we will install from inferno-20100120.tgz. The point of using this archive instead of simply cloning the repository is that the archive includes some files (mainly fonts) that the license prohibits from uploading to Google Code, so there are none in the repository.
Download www.vitanuova.com/dist/4e/inferno.zip (it is recommended on the site, but you can also get .tgz - I have both of them going without problems).
Unpack to
We start
The only really necessary variable is this
We go to: Control Panel -> System -> Additional system parameters (in XP simply "Advanced") -> Environment variables.
Add Path to the end:
Create a new variable: INFERNO_ROOT:
Create a new variable: EMU:
You can edit the file
In linukha inferno supports IPv6. Moreover, this IPv6 is used by default. Whether it suits you or not - decide for yourself. I personally turn it off:
Editing
If you installed WinSDK, then you need to make a new shortcut on the “Windows SDK 7.1 Command Prompt”, go into its properties and add a parameter
If you installed Visual C ++ 2010, I don’t know how to start the 32-bit compiler (but maybe this is done in much the same way).
What to do next is described in the next paragraph for all versions of Windows.
We launch the “Windows SDK 7.1 Command Prompt” (well, or “Visual Studio Command Prompt (2010)” - depending on what you installed).
Собственно, это всё. Теперь вы можете запустить инферно командой
Тем, кто не остановится на установке системы, может быть интересно почитать моё описание Limbo на русском, текущую версию man-документации в html, посмотреть на мои инферно модули и приложения и большой архив приложений под инферно от mjl. Англоязычное коммьюнити обитает в maillist-е и на IRC
I answer in advance the traditional question “to whom and why all this is needed.” In hosted mode, inferno is used in much the same way as Erlang, Java or Go - for developing applications in a cool programming language that run in a very pleasant environment that are simple and comfortable to write and that work at least as well as similar applications in other languages . Unlike Erlang, Inferno does not have many things “out of the box” (but they are easily implemented by handles if necessary), but it is a general-purpose system suitable for solving any problems (well, except for low-level drivers, etc., as usual). Unlike Java, we have complete lightweight threads and the ability to write simple multi-threaded applications in the style of CSP. Unlike Go, we have a virtualized and simplified environment that is identical under any OS. Generally,
The information in the previous post was out of date for almost 4 years, and I was asked to update it. They also asked not to mix installation with setup in one post, therefore there will only be installation, and the setup is described in a separate post in a separate post. Update: Installation description for Windows was updated in June 2014.
So, we will install the distributed Inferno OS . There are installation instructions on the official website , but they are not entirely correct and also a little outdated. Inferno can work in two modes - native (on bare hardware or in qemu / etc. Like all regular OSs) and hosted(as a regular application under * NIX / Win). Installation instructions for native Inferno can be found on the Russian wiki . In addition to this, there are other options - for example, installing Inferno on Android (English) . Personally, I don’t see the point of using native Inferno on regular computers, so I will describe the installation of hosted Inferno under Gentoo, Ubuntu, FreeBSD, MacOSX and Windows.
Content
- Installation Features
- Installation
- Launch
- useful links
- PS
Installation Features
OS Inferno Versions
Theoretically, the latest official Fourth Edition was released around 2004. The current version is in the Mercurial repository on Google Code, and calls itself “New Edition.” In practice, it makes no sense to use anything other than the current version from the repository - it is absolutely stable, and has always been stable. We will put it.
One- or multi-user installation style
Inferno can be installed system-wide (e.g. c
/usr/inferno/
) so that all users can use it. Inferno supports everything that is required for this - work with user rights, separate home directories, etc. On the other hand, inferno can simply be put in your home directory (e.g. c ~/inferno/
), which is even more convenient. I oversimplified the previous article while describing both methods at the same time, but now I decided that it would be easier to describe only the single-user installation option. If one of the readers of this article has a server on which there is more than one inferno user, he hardly needs my instructions for installing inferno. ;-) So we will install ~/inferno/
on * NIX systems, and C:\inferno\
on Windows.32/64 bit
OS Inferno 32-bit. Therefore, to install and run on 64-bit OSs, support for 32-bit applications on these OSs is required. Unfortunately, under 64-bit FreeBSD-9.0, I was not able to start inferno.
Hardened / PaX / SeLinux / etc.
Inferno executes code in a virtual machine, plus it supports JIT, so it has the same problems with various protections as Java, etc. In a previous article, I paid more attention to this topic, if you have questions, look there.
Time and place
Installed inferno takes about 200MB. But the installation of compilers may require up to 3-odd gigabytes (for example, on Xcode or Visual Studio). Inferno compiles in just a couple of minutes on the middle system.
Location
When installing inferno in your home directory, keep in mind that inferno does not like specials. characters in the names of files / directories, so if the path to the home directory contains, for example, a space, there may be difficulties that I did not consider.
Installation
Everything is trivial in (Hardened) Gentoo Linux 32/64-bit - there is a package that puts the inferno system-wide in
/usr/inferno/
:layman -a powerman
emerge inferno
And now we will deal with other OSes.
Mercurial, compilers and all all all
... Ubuntu 12.04 32-bit
sudo apt-get install -y mercurial
sudo apt-get install -y libxext-dev
... Ubuntu 12.04 64-bit
sudo apt-get install -y mercurial
sudo apt-get install -y libc6-dev-i386
sudo apt-get install -y libxext-dev:i386
... FreeBSD 8.0 32-bit
pkg_add -r mercurial
... Mac OS X 10.6.8 Snow Leopard 32-bit
I have already installed Xcode (3.2.2) and Mercurial (1.7.1).
... Mac OS X 10.7.4 Lion 64-bit
Install Xcode (4.3.2) through the App Store.
Launch Xcode, go to the Xcode - Preferences - Downloads menu and click Install for Command Line Tools.
We go to mercurial.berkwood.com and download / install the current version (Mercurial 2.2.2 for OS X 10.7).
... Windows (XP 32-bit, Seven 32-bit, Seven 64-bit)
We go to mercurial.selenic.com/downloads and download / install the current version (3.0.1).
But with the compiler there are options. The obvious option with installing Visual Studio Express will cost more than 3 gig per screw. An alternative - to put WinSDK - will cost about 800 megabytes. I will describe both options, choose for yourself.
First option. We go to www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express and download / install / update (according to Russian custom - three times :) otherwise not all updates will be installed) "Visual C ++ 2010 Express ".
The second option. First, go to go.microsoft.com/fwlink/?LinkId=187668 and download / install the full ".NET Framework 4". Then we go towww.microsoft.com/en-us/download/details.aspx?id=8279 and download / install “Windows SDK 7.1”. When installing, it is enough to limit yourself to these points:
# Windows Native Code Development:
# Windows Headers and Libraries:
# [X] Windows Headers
# [X] x86 Libraries
# [X] Visual C++ Compilers
# Redistributable Packages:
# [X] Microsoft Visual C++ 2010
(In 2014, my SDK refused to install until I demolished all of Visual C ++ 2010 Redistributable - they turned out to be too new a version for it.) Then we update too. In fact, updating is probably not necessary, it has just become a habit.Download and update the inferno sources
Despite the fact that the official website offers a separate archive for Windows, and separate binaries for the poppy, we don’t need all this, and it’s even harmful (the archive for Windows is not updated normally from the repository - there are conflicts). So under all OS we will install from inferno-20100120.tgz. The point of using this archive instead of simply cloning the repository is that the archive includes some files (mainly fonts) that the license prohibits from uploading to Google Code, so there are none in the repository.
... * NIX
wget http://www.vitanuova.com/dist/4e/inferno-20100120.tgz
tar xzf inferno-20100120.tgz
cd inferno/
hg pull -uv
... Win
Download www.vitanuova.com/dist/4e/inferno.zip (it is recommended on the site, but you can also get .tgz - I have both of them going without problems).
Unpack to
C:\inferno\
. I don’t know what it takes to unpack .tgz under Windows - I had Far and 7Zip, I unpacked Far. We start
cmd
.cd \inferno
hg pull -uv
# если получаем конфликт вроде:
merging libinterp/keyring.h
warning: conflicts during merge.
merging libinterp/keyring.h incomplete! (edit conflicts, then use 'hg resolve --mark')
merging libinterp/runt.h
warning: conflicts during merge.
merging libinterp/runt.h incomplete! (edit conflicts, then use 'hg resolve --mark')
3038 files updated, 0 files merged, 106 files removed, 2 files unresolved
use 'hg resolve' to retry unresolved file merges
# то просто восстанавливаем последнюю версию:
hg revert -r tip libinterp\keyring.h
hg revert -r tip libinterp\runt.h
We exit from cmd
.Configure environment variables
The only really necessary variable is this
PATH
. The EMU
default parameters for starting inferno are set, it is needed just for convenience. As for INFERNO_ROOT
the inferno, it does not know about it at all, we need this variable just for convenience. In addition to setting variables in the current session, we will write them in the start scripts.... Ubuntu
export INFERNO_ROOT=$(pwd)
export PATH=$INFERNO_ROOT/Linux/386/bin:$PATH
export EMU=-r$INFERNO_ROOT
echo "export INFERNO_ROOT=$INFERNO_ROOT" >> ~/.bashrc
echo "export PATH=\$INFERNO_ROOT/Linux/386/bin:\$PATH" >> ~/.bashrc
echo "export EMU=-r\$INFERNO_ROOT" >> ~/.bashrc
... FreeBSD
export INFERNO_ROOT=$(pwd)
export PATH=$INFERNO_ROOT/FreeBSD/386/bin:$PATH
export EMU=-r$INFERNO_ROOT
echo "export INFERNO_ROOT=$INFERNO_ROOT" >> ~/.bash_profile
echo "export PATH=\$INFERNO_ROOT/FreeBSD/386/bin:\$PATH" >> ~/.bash_profile
echo "export EMU=-r\$INFERNO_ROOT" >> ~/.bash_profile
... Mac OS X
export INFERNO_ROOT=$(pwd)
export PATH=$INFERNO_ROOT/MacOSX/386/bin:$PATH
export EMU=-r$INFERNO_ROOT
echo "export INFERNO_ROOT=$INFERNO_ROOT" >> ~/.bash_profile
echo "export PATH=\$INFERNO_ROOT/MacOSX/386/bin:\$PATH" >> ~/.bash_profile
echo "export EMU=-r\$INFERNO_ROOT" >> ~/.bash_profile
... Win
We go to: Control Panel -> System -> Additional system parameters (in XP simply "Advanced") -> Environment variables.
Add Path to the end:
;C:\inferno\Nt\386\bin
Create a new variable: INFERNO_ROOT:
C:\inferno
Create a new variable: EMU:
-rC:\inferno
Configure build options
You can edit the file
mkconfig
manually in all OSs, but for simplicity I will, where possible, give commands that automatically change the config.... Ubuntu
perl -i -pe 's/^ROOT=.*/ROOT=$ENV{INFERNO_ROOT}/m' mkconfig
perl -i -pe 's/^SYSHOST=.*/SYSHOST=Linux/m' mkconfig
perl -i -pe 's/^OBJTYPE=.*/OBJTYPE=386/m' mkconfig
In linukha inferno supports IPv6. Moreover, this IPv6 is used by default. Whether it suits you or not - decide for yourself. I personally turn it off:
perl -i -pe 's/ipif6/ipif/g' emu/Linux/emu emu/Linux/emu-g
... FreeBSD
perl -i -pe 's/^ROOT=.*/ROOT=$ENV{INFERNO_ROOT}/m' mkconfig
perl -i -pe 's/^SYSHOST=.*/SYSHOST=FreeBSD/m' mkconfig
perl -i -pe 's/^OBJTYPE=.*/OBJTYPE=386/m' mkconfig
... Mac OS X
perl -i -pe 's/^ROOT=.*/ROOT=$ENV{INFERNO_ROOT}/m' mkconfig
perl -i -pe 's/^SYSHOST=.*/SYSHOST=MacOSX/m' mkconfig
perl -i -pe 's/^OBJTYPE=.*/OBJTYPE=386/m' mkconfig
... Win
Editing
mkconfig
:ROOT=c:/inferno
SYSHOST=Nt
OBJTYPE=386
Assembly
... * NIX
sh makemk.sh
mk nuke
mk install # пропустите эту команду на серверах без X-ов и GUI
mk CONF=emu-g install
... Win Seven 64-bit
If you installed WinSDK, then you need to make a new shortcut on the “Windows SDK 7.1 Command Prompt”, go into its properties and add a parameter
/x86
- to get it like this: C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86
If you installed Visual C ++ 2010, I don’t know how to start the 32-bit compiler (but maybe this is done in much the same way).
What to do next is described in the next paragraph for all versions of Windows.
... Win
We launch the “Windows SDK 7.1 Command Prompt” (well, or “Visual Studio Command Prompt (2010)” - depending on what you installed).
cd \inferno
mk nuke
mk install
Launch
Собственно, это всё. Теперь вы можете запустить инферно командой
emu
или emu-g
(вторая отличается тем, что не поддерживает графический режим, но зато будет работать на серверах без X-ов и очень удобна для запуска разных сетевых сервисов). Графическую среду можно увидеть запустив внутри emu команду wm/wm
:$ emu
; wm/wm
Полезные ссылки
Тем, кто не остановится на установке системы, может быть интересно почитать моё описание Limbo на русском, текущую версию man-документации в html, посмотреть на мои инферно модули и приложения и большой архив приложений под инферно от mjl. Англоязычное коммьюнити обитает в maillist-е и на IRC
#inferno
в сети freenode.P.S.
I answer in advance the traditional question “to whom and why all this is needed.” In hosted mode, inferno is used in much the same way as Erlang, Java or Go - for developing applications in a cool programming language that run in a very pleasant environment that are simple and comfortable to write and that work at least as well as similar applications in other languages . Unlike Erlang, Inferno does not have many things “out of the box” (but they are easily implemented by handles if necessary), but it is a general-purpose system suitable for solving any problems (well, except for low-level drivers, etc., as usual). Unlike Java, we have complete lightweight threads and the ability to write simple multi-threaded applications in the style of CSP. Unlike Go, we have a virtualized and simplified environment that is identical under any OS. Generally,