User:Erkexzcx/RaspberryPI: Difference between revisions

From Alpine Linux
(Created page with "test")
 
No edit summary
Line 1: Line 1:
test
= Understanding procedure =
 
Alpine Linux installs differently in comparison to Arch Linux ARM. With Alpine Linux, you will have to create a single boot partition on SD card using your computer, copy/paste files from *.tar.gz package and...boot it. Once booted, Alpine Linux will be fully loaded into the RAM and from there you will perform a regular setup, including repartitioning SD card. Once done, you will be able to boot into a fully installed Alpine Linux installation.
 
= Installation for "live boot" =
 
== Partitioning 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.
 
Start fdisk to partition the SD card:
fdisk /dev/sdX
 
At the fdisk prompt, delete old partitions and create a new one:
# Type '''o'''. This will clear out any partitions on the drive.
# Type '''p''' to list partitions. There should be no partitions left.
# Type '''n''', then p for primary, '''1''' for the first partition on the drive, press ENTER to accept the default first sector, then type '''+256M''' for the last sector.
# Type '''t''', then '''c''' to set the first partition to type {{ic|W95 FAT32 (LBA)}}.
# Write the partition table and exit by typing '''w'''.
 
== Formatting & mounting 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
 
== Setup headless access ==
 
By default, such Alpine Linux will not have SSH server, wifi or any other headless access. In order to solve it, the project [https://github.com/macmpi/alpine-linux-headless-bootstrap alpine-linux-headless-bootstrap] has been born. This project automatically starts internet (on Ethernet port) as well as setups SSH access for "live boot" (see its README.md for more information):
wget https://github.com/macmpi/alpine-linux-headless-bootstrap/raw/main/headless.apkovl.tar.gz -P boot
 
=== (Optional) Setup WiFi ===
 
If you won't be using Ethernet, you can use WiFi. Configuring WiFi on boot is as simple as adding a single configuration file using below {{ic|wpa_passphrase}} command:
wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > boot/wpa_supplicant.conf
 
== Unmount SD card ==
 
You can now unmount your SD card:
umount boot

Revision as of 15:48, 3 February 2023

Understanding procedure

Alpine Linux installs differently in comparison to Arch Linux ARM. With Alpine Linux, you will have to create a single boot partition on SD card using your computer, copy/paste files from *.tar.gz package and...boot it. Once booted, Alpine Linux will be fully loaded into the RAM and from there you will perform a regular setup, including repartitioning SD card. Once done, you will be able to boot into a fully installed Alpine Linux installation.

Installation for "live boot"

Partitioning 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.

Start fdisk to partition the SD card:

fdisk /dev/sdX

At the fdisk prompt, delete old partitions and create a new one:

  1. Type o. This will clear out any partitions on the drive.
  2. Type p to list partitions. There should be no partitions left.
  3. Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +256M for the last sector.
  4. Type t, then c to set the first partition to type W95 FAT32 (LBA).
  5. Write the partition table and exit by typing w.

Formatting & mounting 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

Setup headless access

By default, such Alpine Linux will not have SSH server, wifi or any other headless access. In order to solve it, the project alpine-linux-headless-bootstrap has been born. This project automatically starts internet (on Ethernet port) as well as setups SSH access for "live boot" (see its README.md for more information):

wget https://github.com/macmpi/alpine-linux-headless-bootstrap/raw/main/headless.apkovl.tar.gz -P boot

(Optional) Setup WiFi

If you won't be using Ethernet, you can use WiFi. Configuring WiFi on boot is as simple as adding a single configuration file using below wpa_passphrase command:

wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > boot/wpa_supplicant.conf

Unmount SD card

You can now unmount your SD card:

umount boot