proofread v2

This commit is contained in:
Daniel Barlow 2023-09-15 21:35:06 +01:00
parent bb280c6d97
commit 8600dfc8cf

View file

@ -1,13 +1,13 @@
Getting Started Getting Started
############### ###############
Liminix is very configurable, which can make it initially daunting Liminix is very configurable, which can make it initially quite
especially if you're learning Nix or Linux or networking concepts at daunting, especially if you're learning Nix or Linux or networking
the same time. In this section we build some "worked example" Liminix concepts at the same time. In this section we build some "worked
images to introduce the concepts. If you follow the examples exactly, example" Liminix images to introduce the concepts. If you follow the
they should work. If you change things as you go along, they may work examples exactly, they should work. If you change things as you go
differently or not at all, but the experience should be educational along, they may work differently or not at all, but the experience
either way. should be educational either way.
.. warning:: The first example we will look at runs under emulation, .. warning:: The first example we will look at runs under emulation,
@ -23,19 +23,20 @@ either way.
Requirements Requirements
************ ************
You will need a reasonably powerful computer running Nix. Devices You will need a reasonably powerful computer running Nix. Target
that run Liminix are unlikely to have the CPU power and disk space to devices for Liminix are unlikely to have the CPU power and disk space
be able to build it in situ, so the build process is based around to be able to build it in situ, so the build process is based around
"cross-compilation" from another computer. The build machine can be "cross-compilation" from another computer. The build machine can be
any reasonably powerful desktop/laptop/server PC running NixOS. any reasonably powerful desktop/laptop/server PC running NixOS.
Standalone Nixpkgs installations on other Linux distributions - or on Standalone Nixpkgs installations on other Linux distributions - or on
MacOS - also ought to work but are untested. MacOS, or even in a Docker container - also ought to work but are
untested.
Running in Qemu Running in Qemu
*************** ***************
You can do this without even having a router to play with. You can try out Liminix without even having a router to play with.
Clone the Liminix git repository and change into its directory Clone the Liminix git repository and change into its directory
@ -71,9 +72,9 @@ Now you can try it:
nix-shell --run "mips-vm ./result/vmlinux ./result/rootfs" nix-shell --run "mips-vm ./result/vmlinux ./result/rootfs"
This starts Qemu emulator with a bunch of useful options, to run This starts the Qemu emulator with a bunch of useful options, to run
the Liminix configuration you just built. It connects the Liminix the Liminix configuration you just built. It connects the emulated
serial console and the `QEMU monitor device's serial console and the `QEMU monitor
<https://www.qemu.org/docs/master/system/monitor.html>`_ to <https://www.qemu.org/docs/master/system/monitor.html>`_ to
stdin/stdout. stdin/stdout.
@ -90,15 +91,21 @@ another virtual machine attached to the virtual network, which will
request an IP address from our Liminix system and give you a shell you request an IP address from our Liminix system and give you a shell you
can run ssh from. can run ssh from.
We'll use `System Rescue <https://www.system-rescue.org/>`_ in tty We use `System Rescue <https://www.system-rescue.org/>`_ in tty
mode (no graphical output) for this purpose, but if you have some mode (no graphical output) for this example, but if you have some
other favourite Linux Live CD ISO - or, for that matter, any other OS other favourite Linux Live CD ISO - or, for that matter, any other OS
image that QEMU can boot - adjust the command to suit: image that QEMU can boot - adjust the command to suit.
Download the System Rescue ISO:
.. code-block:: console .. code-block:: console
curl https://fastly-cdn.system-rescue.org/releases/10.01/systemrescue-10.01-amd64.iso -O curl https://fastly-cdn.system-rescue.org/releases/10.01/systemrescue-10.01-amd64.iso -O
and run it
.. code-block:: console
nix-shell -p qemu --run " \ nix-shell -p qemu --run " \
qemu-system-x86_64 \ qemu-system-x86_64 \
-echr 16 \ -echr 16 \