refactor: moved to hugo
This commit is contained in:
parent
4c6912edd0
commit
e77e5583c2
604 changed files with 1675 additions and 2279 deletions
|
@ -0,0 +1,77 @@
|
|||
+++
|
||||
title = "Running Alpine Linux from USB on the Raspberry Pi 3"
|
||||
date = 2021-12-31
|
||||
draft = true
|
||||
+++
|
||||
|
||||
``` bash
|
||||
# Tested on Raspberry Pi 3
|
||||
# Create a Raspberry pi OS SD card
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo rpi-update
|
||||
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
|
||||
reboot
|
||||
|
||||
# At this point the boot flag is enabled
|
||||
# Prepare the USB
|
||||
|
||||
# Install Alpine to USB Drive
|
||||
# Format USB
|
||||
# Create two partitions:
|
||||
# - boot fat16
|
||||
# - root ext4
|
||||
tar xzvf ~/Downloads/alpine-rpi-3.12.1-armhf.tar.gz
|
||||
|
||||
# boot/usercfg.txt:
|
||||
enable_uart=1 # Not sure I need this
|
||||
gpu_mem=32 # The minimal memory for the bootloader
|
||||
|
||||
setup-alpine
|
||||
apk update
|
||||
apk add cfdisk e2fsprogs
|
||||
mkfs.ext4 /dev/sda2
|
||||
|
||||
# Setup proper TZ
|
||||
apk add tzdata
|
||||
cp /usr/share/zoneinfo/Europe/Madrid /etc/localtime
|
||||
echo "Europe/Madrid" > /etc/timezone
|
||||
apk del tzdata
|
||||
|
||||
mount /dev/sda2 /mnt
|
||||
setup-disk -m sys /mnt
|
||||
mount -o remount,rw /media/sda1
|
||||
|
||||
rm -f /media/sda1/boot/*
|
||||
cd /mnt
|
||||
rm boot/boot # Remove symlink
|
||||
|
||||
mv boot/* /media/sda1/boot/
|
||||
rm -rf boot
|
||||
mkdir media/sda1
|
||||
|
||||
ln -s media/sda1/boot boot
|
||||
|
||||
# /mnt/etc/fstab
|
||||
# Remove cdrom
|
||||
# Add:
|
||||
/dev/sda1 /media/sda1 vfat default 0 0
|
||||
|
||||
# Edit boot cmdline to boot from the ext partition
|
||||
# Add root=/dev/sda2
|
||||
|
||||
# Reboot
|
||||
|
||||
# After install
|
||||
|
||||
# Set swclock (pi doesn't have a hwclock)
|
||||
rc-update add swclock boot
|
||||
rc-update del hwclock boot
|
||||
service hwclock stop
|
||||
service swclock start
|
||||
|
||||
apk update
|
||||
apk upgrade
|
||||
|
||||
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue