Skip to content

Update rpi instructions #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 37 additions & 16 deletions content/en/docs/Installation/raspberry.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,57 @@ If you are not familiar with the process, it is suggested to follow the [quickst
- Etcher or `dd`
- A Linux host where to flash the device

## Download
## Install using AuroraBoot

Create `build` directory and add `cloud-config.yaml`, then run:

```bash
docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this command fails for find the /dev/loop0 device unless I pass this arg too:

--device /dev/loop0

I don't remember having to do this in the past, so although it seems reasonable to have to add this, I assume it's something on my system that made it a requirement now and it's not the case for everybody. If the command works for you as it is, let's keep it without the arg until I figure out what's different on my system.

--platform linux/arm64 -v $PWD/build/:/output \
kairos.docker.scarf.sh/kairos/auroraboot:latest \
--debug --set "disable_http_server=true" --set "disable_netboot=true" \
--set "state_dir=/output" --set "disk.raw=true" \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find the disk.raw parameter in the Auroraboot documentation or the source code.
Shouldn't this be disk.efi=true?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disk.raw was used before and we transitioned to disk.efi but its still possible to set disk.raw and it will transform it automatically for backwards compatibility :) https://github.com/kairos-io/AuroraBoot/blob/69bccf942277af0de137764b812f17adfaaf8762/internal/config/config.go#L101

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--cloud-config /output/cloud-config.yaml \
--set "container_image={{<oci variant="standard" model="rpi4" arch="arm64">}}"
```

Once complete, use Etcher or `dd` to flash the image to an SD card:

```bash {class="only-flavors=openSUSE+Leap-15.6,openSUSE+Tumbleweed,Ubuntu+20.04,Ubuntu+22.04,Alpine+3.19"}
sudo dd if=build/{{<image variant="standard" model="rpi4" arch="arm64" suffix=".raw">}} of=<device> oflag=sync status=progress bs=10MB
```

## Install using images

### Download

Extract the `img` file from a container image as described [in this page]({{< relref "../reference/image_matrix" >}})

## Flash the image
### Flash the image

Plug the SD card to your system. To flash the image, you can either use Etcher or `dd`. Note it's compressed with "XZ", so we need to decompress it first:
Plug the SD card to your system. To flash the image, you can either use Etcher or `dd`:

```bash {class="only-flavors=openSUSE+Leap-15.6,openSUSE+Tumbleweed,Ubuntu+20.04,Ubuntu+22.04,Alpine+3.19"}
sudo dd if={{<image variant="standard" model="rpi4" arch="arm64" suffix=".raw">}} of=<device> oflag=sync status=progress bs=10MB
```

Once the image is flashed, there is no need to carry any other installation steps. We can boot the image, or apply our config.
Once the image is flashed, there is no need to carry out any other installation steps, it can be booted right away. However you may want to add a `cloud-config` at this point - see below.

## Boot
### Boot

Use the SD Card to boot. The default username/password is `kairos`/`kairos`.
To configure your access or disable password change the `/usr/local/cloud-config/01_defaults.yaml` accordingly.
Use the SD Card to boot - the first time will boot into recovery, create `COS_STATE` and `COS_PERSISTENT` volumes and reboot, which will take a few minutes depending on the size and speed of the storage. The default username/password is `kairos`/`kairos`.
To configure your access or disable password change the `/oem/90_custom.yaml` accordingly.

## Configure your node
### Configure your node

To configure the device beforehand, be sure to have the SD plugged in your host. We need to copy a configuration file into `cloud-config` in the `COS_PERSISTENT` partition:
To configure the device beforehand, be sure to have the SD plugged in your host. We need to overwrite the default configuration file with the desired `cloud-config` in the `COS_OEM` partition:

```
$ PERSISTENT=$(blkid -L COS_PERSISTENT)
$ mkdir /tmp/persistent
$ sudo mount $PERSISTENT /tmp/persistent
$ sudo mkdir /tmp/persistent/cloud-config
$ sudo cp cloud-config.yaml /tmp/persistent/cloud-config
$ sudo umount /tmp/persistent
$ OEM=$(blkid -L COS_OEM)
$ mkdir /tmp/oem
$ sudo mount $OEM /tmp/oem
$ sudo cp cloud-config.yaml /tmp/oem/90_custom.yaml
$ sudo umount /tmp/oem
Comment on lines +72 to +76
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the cloud-config was referenced already in the AuroraBoot command and backed into the raw image is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently there are two options - auroraboot and using the raw images. I think using the raw images is too hard (kairos-io/kairos#3453) and auroraboot is much better, so would prefer to remove this section entirely

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what @ElKiwos meant was that if the instructions were followed, this line embeds the config in the image. This step here will be replacing that file, thus it's redundant. Maybe we should explain it a bit. E.g. "if you didn't embed the config in the image, then you can add it here like this" or something like that.

```

You can push additional `cloud config` files. For a full reference check out the [docs]({{< relref "../reference/configuration" >}}) and also [configuration after-installation]({{< relref "../advanced/after-install" >}})
You can push additional `cloud config` files. For a full reference check out the [docs]({{< relref "../reference/configuration" >}}) and also [configuration after-installation]({{< relref "../advanced/after-install" >}})