# Alpine Linux USB Rescue ISO A bootable hybrid ISO that: - Gets an IP via **DHCP on `eth0`** - Automatically opens a **Nebula overlay tunnel** - Runs **OpenSSH** (login: `root` / `alpine`) - Carries all tools needed to **install Alpine onto the host machine** (`setup-alpine`, `setup-disk`, `parted`, …) The ISO is a hybrid image — it can be written to a USB stick with `dd` *or* burned to a CD/DVD. --- ## Prerequisites - Docker + Docker Compose - A Nebula certificate set for this node (see below) --- ## 1. Place Nebula certificates Put the following files in `nebula/`: ``` nebula/ nebula ← binary (already included) config.yml ← already included, edit as needed ca.crt ← your Nebula CA certificate ← YOU PROVIDE host.crt ← this node's certificate ← YOU PROVIDE host.key ← this node's private key ← YOU PROVIDE ``` `ca.crt`, `host.crt`, and `host.key` are gitignored. --- ## 2. Build the ISO ```bash docker compose run --rm alpine bash /scripts/create.sh ``` The ISO is written to `output/rescue-alpine.iso`. --- ## 3. Write to USB ```bash dd if=output/rescue-alpine.iso of=/dev/sdX bs=4M status=progress && sync ``` Replace `/dev/sdX` with your USB device (check with `lsblk`). **All data on the device will be erased.** Or burn to CD/DVD: ```bash cdrecord dev=/dev/sr0 output/rescue-alpine.iso ``` --- ## 4. Boot and connect 1. Insert USB and boot the target machine from it. 2. The system comes up fully in RAM — no writes to the host disk. 3. On boot, `eth0` gets an IP via DHCP, then the Nebula tunnel comes up automatically. 4. SSH in via the Nebula overlay IP (see `nebula/config.yml`): ```bash ssh root@ # password: alpine ``` --- ## 5. Install Alpine onto the host machine Once SSH'd in (or at the local console): ```bash # Interactive guided installer — partitions disk, installs Alpine setup-alpine # Or use setup-disk for more control setup-disk -m sys /dev/sda ``` All required tools (`parted`, `e2fsprogs`, `dosfstools`, `btrfs-progs`, `alpine-conf`, …) are pre-installed. --- ## Default credentials | Field | Value | |----------|----------| | Username | `root` | | Password | `alpine` | Change this in `scripts/chroot-setup.sh` before building if needed. --- ## Architecture ``` ISO (hybrid — bootable on USB or CD) └── isolinux (BIOS boot) ├── vmlinuz-lts └── initramfs.gz ← entire Alpine system packed as cpio+gzip ├── eth0 DHCP (openrc networking) ├── nebula → /usr/local/bin/nebula ├── /etc/nebula/ (config + certs) ├── OpenSSH (sshd) └── Alpine install tools ``` The system runs **entirely in RAM** — the host disk is never touched until you explicitly run the installer.