# Installation Media (bootable SD cards) The toolkit can build a **bootable SD/removable-media card** for control boards that boot from a card. This is a separate, sanctioned path alongside the network-only `.afw` install: the ordinary alkane install still runs over the network from whatever OS the board has, and SD media exists for - recovering a board to genuine stock, and - bootstrapping or installing alkane onto a board through a card. It is a **physical** path (insert a card, boot, remove), by design -- unlike the network install, which needs no physical access. ## Which boards SD media is offered only for boards whose bootrom / stock bootloader boots from a card. Today that is the **Antminer S17 / Zynq-7010** control board, where the stock U-Boot card-detects a plain FAT32 card and side-loads the card's boot trio (confirmed on hardware: no boot-mode strap and no `uEnv.txt` needed, with the stock bootloader intact). The Amlogic **A113D is excluded** -- it is eMMC-only with no SD slot (USB recovery disabled), so it stays network-only. ## What you can build | Kind | What it does | |------|--------------| | **Stock recovery** | Replicates a genuine Bitmain vendor SD-recovery package onto a card: boot it to write genuine stock back into NAND. You supply the vendor package. | | **Alkane: run from SD** | Boots alkane from the card each power-on; nothing is written to the board. Good for a non-destructive try-out. | | **Alkane: installer** | Boots an installer OS from the card that writes alkane into the board's own storage, verifies, and signals the red/green LEDs when done -- then you power off, remove the card, and boot internal alkane. | The card is always built as an **image file first** (root-free), then written to the device. The image is identical to what lands on the card, so it can be inspected or kept. ## GUI Scan the fleet, right-click a card-bootable board, and choose **Installation Media (SD card)...**. Pick the kind, Browse to the source (an `.afw` for alkane, or a genuine vendor package `.zip` for stock recovery), choose the target SD card (or "build an image file only"), and click **Create**. Writing to a card erases it entirely -- confirm the target device first. ## CLI ``` # Stock recovery card from a genuine vendor package: alkane-cli afw make-media --kind stock \ --stock-package SD_S17.zip --out card.img \ [--write /dev/sdX --confirm WRITE] # Alkane card from an .afw (simpleboot = run from SD, installer = flash to board): alkane-cli afw make-media --kind alkane --mode installer \ --afw alkane-os--zynq-7010.afw --allow-unsigned --out card.img \ [--write /dev/sdX --confirm WRITE] ``` Omit `--write` to build only the image file. Writing to a real device requires `--confirm WRITE`. `--board` defaults to `zynq-7010` (the only supported board for now). ## Safety notes - **Writing a card erases the whole device.** The GUI device list shows only removable disks and never a system disk, but always confirm the target. - Stock recovery relies on the board's **existing stock bootloader** being intact (it recovers broken userspace/kernel). If the bootloader itself were wiped, a full card-boot path is needed instead -- a separate case. - The alkane installer preserves the board's boot-critical regions (on Zynq, `BOOT.bin` at `0x0..0x1a00000` is never written), mirroring the network installer's guarantees.