Skip to content
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

Add how-to guide for raspi disk image #275

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion docs/quickstart-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ kubectl apply -f seedimage.yaml
</TabItem>
<TabItem value="seedImagerpi" label="Seed Image for Raspberry Pi" default>

The `SeedImage` resource, which automates the creation of an Elemental bootable image (the *seed image*), does not support Raspberry Pi yet.
The `SeedImage` resource, which automates the creation of an Elemental bootable image (the *seed image*), does not support Raspberry Pi ISOs yet (click [here](raspi-disk.md) for a guide to build a raw disk image).

We will generate a *seed image* manually in the [next section](quickstart-cli.md#preparing-the-installation-seed-image).

Now that we have defined all the configuration files let's apply them to create the proper resources in Kubernetes:
Expand Down
53 changes: 53 additions & 0 deletions docs/raspi-disk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_label: Building raw disk images for Raspberry Pi
title: ''
---

<head>
<link rel="canonical" href="https://elemental.docs.rancher.com/raspi-disk"/>
</head>


### How to build raw disk images for Raspberry Pi

This guide will show how we can build a raw disk image that can be written to an SD-card and booted without any other installation media.

:::caution
Any data on the SD-card will be erased, please only use a SD-card without anything important on it.

The SD-card must be reasonably large (32 GB or more) and **fast** (!!).
:::

```yaml title="SeedImage resource" showLineNumbers
apiVersion: elemental.cattle.io/v1beta1
kind: SeedImage
metadata:
name: fire-img
namespace: fleet-default
spec:
type: raw
baseImage: registry.opensuse.org/isv/rancher/elemental/dev/containers/suse/sle-micro/5.5:latest
targetPlatform: linux/arm64
registrationRef:
apiVersion: elemental.cattle.io/v1beta1
kind: MachineRegistration
name: fire-nodes
namespace: fleet-default
```
Check the logs for the build pod using:
```shell
kubectl logs -n fleet-default fire-img -f -c build
```

When the build is finished we can download the image file using wget:

```shell
wget --no-check-certificate $(kubectl get seedimage -n fleet-default fire-img -o jsonpath="{.status.downloadURL}") -O sle-micro.arm64.raw
```

Now we can write the `.raw` image to the SD-card. This can be done with `dd` on the Linux command line if you're comfortable with this command.
[openSUSE](https://www.opensuse.org) has nice instructions on how to write an image to a storage medium for [Linux](https://en.opensuse.org/SDB:Live_USB_stick),
[Windows](https://en.opensuse.org/SDB:Create_a_Live_USB_stick_using_Windows), and [OS X](https://en.opensuse.org/SDB:Create_a_Live_USB_stick_using_macOS).

3 changes: 2 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ const sidebars = {
'rancher-vmware',
'removable-device-cloudconfig',
'custom-certificate',
'airgap'
'airgap',
'raspi-disk'
]
},
{
Expand Down
Loading