improve formatting

mainline-omnia-wip
Daniel Barlow 2024-02-04 18:24:01 +00:00
parent 49ec4a2961
commit f875622100
1 changed files with 22 additions and 0 deletions

View File

@ -25,6 +25,8 @@
root password (which is ``secret``) and/or the SSH keys, then root password (which is ``secret``) and/or the SSH keys, then
build it with build it with
.. code-block:: console
$ nix-build -I liminix-config=./examples/recovery.nix \ $ nix-build -I liminix-config=./examples/recovery.nix \
--arg device "import ./devices/turris-omnia" \ --arg device "import ./devices/turris-omnia" \
-A outputs.mbrimage -o mbrimage -A outputs.mbrimage -o mbrimage
@ -35,6 +37,8 @@
medium using :command:`dd` or your other most favoured file copying medium using :command:`dd` or your other most favoured file copying
tool, which might be a comand something like this: tool, which might be a comand something like this:
.. code-block:: console
$ dd if=mbrimage of=/dev/path/to/the/usb/stick \ $ dd if=mbrimage of=/dev/path/to/the/usb/stick \
bs=1M conv=fdatasync status=progress bs=1M conv=fdatasync status=progress
@ -43,6 +47,8 @@
have a serial cable, the easiest way to change this is by booting have a serial cable, the easiest way to change this is by booting
to TurrisOS and logging in with ssh: to TurrisOS and logging in with ssh:
.. code-block:: console
root@turris:/# fw_printenv boot_targets root@turris:/# fw_printenv boot_targets
boot_targets=mmc0 nvme0 scsi0 usb0 pxe dhcp boot_targets=mmc0 nvme0 scsi0 usb0 pxe dhcp
root@turris:/# fw_setenv boot_targets usb0 mmc0 root@turris:/# fw_setenv boot_targets usb0 mmc0
@ -56,12 +62,16 @@
request from a ``liminix-recovery`` host and figure out what IP request from a ``liminix-recovery`` host and figure out what IP
address was assigned. address was assigned.
.. code-block:: console
$ ssh liminix-recovery.lan $ ssh liminix-recovery.lan
You should get a "Busybox" banner and a root prompt. Now you can You should get a "Busybox" banner and a root prompt. Now you can
start preparing the device to install Liminix on it. First we'll start preparing the device to install Liminix on it. First we'll
mount the root filesystem and take a snapshot: mount the root filesystem and take a snapshot:
.. code-block:: console
# mkdir /dest && mount /dev/mmcblk0p1 /dest # mkdir /dest && mount /dev/mmcblk0p1 /dest
# schnapps -d /dest create "pre liminix" # schnapps -d /dest create "pre liminix"
# schnapps -d /dest list # schnapps -d /dest list
@ -74,23 +84,31 @@
then we can remove all the files then we can remove all the files
.. code-block:: console
# rm -r /dest/@/* # rm -r /dest/@/*
and then it's ready to install the real Liminix system onto. On and then it's ready to install the real Liminix system onto. On
your build system, create the Liminix configuration you wish to your build system, create the Liminix configuration you wish to
install: here we'll use the ``rotuer`` example. install: here we'll use the ``rotuer`` example.
.. code-block:: console
build$ nix-build -I liminix-config=./examples/rotuer.nix \ build$ nix-build -I liminix-config=./examples/rotuer.nix \
--arg device "import ./devices/turris-omnia" \ --arg device "import ./devices/turris-omnia" \
-A outputs.systemConfiguration -A outputs.systemConfiguration
and then use :command:`min-copy-closure` to copy it to the device. and then use :command:`min-copy-closure` to copy it to the device.
.. code-block:: console
build$ nix-shell --run \ build$ nix-shell --run \
"min-copy-closure -r /dest/@ root@liminix-recovery.lan result" "min-copy-closure -r /dest/@ root@liminix-recovery.lan result"
and activate it and activate it
.. code-block:: console
build$ ssh root@liminix-recovery.lan \ build$ ssh root@liminix-recovery.lan \
"/dest/@/$(readlink result)/bin/install /dest/@" "/dest/@/$(readlink result)/bin/install /dest/@"
@ -98,6 +116,8 @@
a symlink so U-Boot can find :file:`/boot`, then restore the a symlink so U-Boot can find :file:`/boot`, then restore the
default boot order and reboot into the new configuration. default boot order and reboot into the new configuration.
.. code-block:: console
# cd /dest && ln -s @/boot . # cd /dest && ln -s @/boot .
# fw_setenv boot_targets "mmc0 nvme0 scsi0 usb0 pxe dhcp" # fw_setenv boot_targets "mmc0 nvme0 scsi0 usb0 pxe dhcp"
# cd / ; umount /dest # cd / ; umount /dest
@ -112,6 +132,8 @@
:file:`examples/recovery.nix` configuration also works :file:`examples/recovery.nix` configuration also works
using the ``tftpboot`` output. So you can do using the ``tftpboot`` output. So you can do
.. code-block:: console
build$ nix-build -I liminix-config=./examples/recovery.nix \ build$ nix-build -I liminix-config=./examples/recovery.nix \
--arg device "import ./devices/turris-omnia" \ --arg device "import ./devices/turris-omnia" \
-A outputs.tftpboot -A outputs.tftpboot