User:Erkexzcx/RaspberryPI: Difference between revisions
No edit summary |
(Style, typing mistakes) |
||
Line 1: | Line 1: | ||
= Understanding | = Understanding the Procedure = | ||
Alpine Linux | Alpine Linux installation on Raspberry Pi differs from Arch Linux ARM. For Alpine Linux, you create a single boot partition on the SD card using your computer, copy files from the *.tar.gz package, and then boot the system. Once booted, Alpine Linux will load entirely into RAM, allowing you to perform the regular setup, including repartitioning the SD card. After completion, you can boot into a fully installed Alpine Linux environment. | ||
= Installation for " | = Installation for "Live Boot" = | ||
== Partitioning SD | == Partitioning the SD Card == | ||
Connect SD card to your computer. Replace sdX in the following instructions with the device name for the SD card as it appears on your computer. | Connect the SD card to your computer. Replace 'sdX' in the following instructions with the device name for the SD card as it appears on your computer. | ||
Start fdisk to partition the SD card: | Start fdisk to partition the SD card: | ||
Line 13: | Line 13: | ||
At the fdisk prompt, delete old partitions and create a new one: | At the fdisk prompt, delete old partitions and create a new one: | ||
# Type '''o''' | # Type '''o''' to clear out any existing partitions. | ||
# Type '''p''' to list partitions. There should be | # Type '''p''' to list partitions. There should be none left. | ||
# Type '''n''', then p for primary, '''1''' for the first partition | # Type '''n''', then 'p' for primary, '''1''' for the first partition, press ENTER for the default first sector, and type '''+256M''' for the last sector. | ||
# Type '''t''', then '''c''' to set the first partition to type {{ic|W95 FAT32 (LBA)}}. | # Type '''t''', then '''c''' to set the first partition to type {{ic|W95 FAT32 (LBA)}}. | ||
# Write the partition table and exit by typing '''w'''. | # Write the partition table and exit by typing '''w'''. | ||
== Formatting & | == Formatting & Mounting the SD Card == | ||
Create and mount the FAT filesystem: | Create and mount the FAT filesystem: | ||
Line 26: | Line 26: | ||
mount /dev/sdX1 boot | mount /dev/sdX1 boot | ||
== Download and | == Download and Copy Files == | ||
Download and extract the root filesystem (as root, not via sudo): | Download and extract the root filesystem (as root, not via sudo): | ||
Line 33: | Line 33: | ||
sync | sync | ||
== | == Setting Up Headless Access == | ||
By default, | By default, Alpine Linux does not include an SSH server, WiFi, or any other headless access options. To address this, use the [https://github.com/macmpi/alpine-linux-headless-bootstrap alpine-linux-headless-bootstrap] project. This project enables internet access (on the Ethernet port) and sets up SSH access for "live boot" (see the README.md for more information): | ||
wget https://github.com/macmpi/alpine-linux-headless-bootstrap/raw/main/headless.apkovl.tar.gz -P boot | wget https://github.com/macmpi/alpine-linux-headless-bootstrap/raw/main/headless.apkovl.tar.gz -P boot | ||
=== (Optional) | === (Optional) Setting Up WiFi === | ||
If you | If you prefer not to use Ethernet, you can configure WiFi access. To set up WiFi on boot, add a single configuration file using the {{ic|wpa_passphrase}} command below: | ||
wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > boot/wpa_supplicant.conf | wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > boot/wpa_supplicant.conf | ||
== | == Unmounting the SD Card == | ||
You can now unmount | You can now unmount the SD card: | ||
umount boot | umount boot |
Latest revision as of 20:39, 21 March 2023
Understanding the Procedure
Alpine Linux installation on Raspberry Pi differs from Arch Linux ARM. For Alpine Linux, you create a single boot partition on the SD card using your computer, copy files from the *.tar.gz package, and then boot the system. Once booted, Alpine Linux will load entirely into RAM, allowing you to perform the regular setup, including repartitioning the SD card. After completion, you can boot into a fully installed Alpine Linux environment.
Installation for "Live Boot"
Partitioning the SD Card
Connect the SD card to your computer. Replace 'sdX' in the following instructions with the device name for the SD card as it appears on your computer.
Start fdisk to partition the SD card:
fdisk /dev/sdX
At the fdisk prompt, delete old partitions and create a new one:
- Type o to clear out any existing partitions.
- Type p to list partitions. There should be none left.
- Type n, then 'p' for primary, 1 for the first partition, press ENTER for the default first sector, and type +256M for the last sector.
- Type t, then c to set the first partition to type
W95 FAT32 (LBA)
. - Write the partition table and exit by typing w.
Formatting & Mounting the SD Card
Create and mount the FAT filesystem:
mkfs.vfat /dev/sdX1 mkdir boot mount /dev/sdX1 boot
Download and Copy Files
Download and extract the root filesystem (as root, not via sudo):
wget https://dl-cdn.alpinelinux.org/alpine/v3.17/releases/aarch64/alpine-rpi-3.17.1-aarch64.tar.gz bsdtar -xpf alpine-rpi-3.17.1-aarch64.tar.gz -C boot sync
Setting Up Headless Access
By default, Alpine Linux does not include an SSH server, WiFi, or any other headless access options. To address this, use the alpine-linux-headless-bootstrap project. This project enables internet access (on the Ethernet port) and sets up SSH access for "live boot" (see the README.md for more information):
wget https://github.com/macmpi/alpine-linux-headless-bootstrap/raw/main/headless.apkovl.tar.gz -P boot
(Optional) Setting Up WiFi
If you prefer not to use Ethernet, you can configure WiFi access. To set up WiFi on boot, add a single configuration file using the wpa_passphrase
command below:
wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > boot/wpa_supplicant.conf
Unmounting the SD Card
You can now unmount the SD card:
umount boot