- Download Alpine Linux from here.
- Connect your SD Card to your PC.
- Format the card. Create a single FAT32 partition.
- Extract the contents of the downloaded
tar.gzarchive. - Copy the contents to the root of the SD Card.
- Add headless configuration if needed.
- Connect to the SD Card to your Raspberry Pi.
- Power it on.
Run the following commands in the shell:
setup-interfaces
setup-apkrepos
apk update
apk add cfdisk e2fsprogs nanoUsing cfdisk /dev/mmcblk0 repartition your SD card such that:
- The first partition can be resized to something small, like
2G(2 GB) but it can be as low as128M(128MB). - The second partition should take up the rest of the free space on the SD Card.
Afterwards, format the secondary partition using mkfs.ext4 /dev/mmcblk0p2.
Now edit /etc/fstab using nano /etc/fstab. Add the following line:
/dev/mmcblk0p2 /media/mmcblk0p2 ext4 defaults 0 2
Save the file and exit nano. Then run mkdir /media/mmcblk0p2.
Run mount -a to verify the /etc/fstab configuration and mount the secondary partition to /media/mmcblk0p2.
Now run setup-alpine like normal, however:
- When asked to set up your network interface, set it up the same way as before. Same for apk repos setup.
- When asked to set up disks do the following:
-
No disks available. Try boot media /media/mmcblk0p1? (y/n) [n] n Enter where to store configs ('floppy', 'mmcblk0p1', 'mmcblk0p2', 'usb' or 'none') [mmcblk0p2] (enter) Enter apk cache directory (or '?' or 'none') [/media/mmcblk0p2/cache] (enter)
Lastly run the following 3 commands:
lbu commit
apk cache download
reboot
This instruction isn't correct.
Can you please verify first?