Automatically build a Linux From Scratch system for a Raspberry Pi. I know that there is an official script, but I want to learn for myself. Also, those scripts are missing some initial setup important to Americans like me.
Based on:
- https://intestinate.com/pilfs/guide.html
- http://www.linuxfromscratch.org/lfs/view/development/index.html
- Raspberry Pi
- 2x SD cards >=4GB, Class 10 and/or U-rated
- Means to connect Pi to internet
- US keyboard
- Monitor
-
Create a Raspbian Lite boot disk on an SD card. https://www.raspberrypi.org/software/
-
Boot your pi from it. Default login is
piand password israspberry. -
While the pi is rebooting, go ahead and install Raspbian again on another SD card.
-
Change the default password with
passwd. -
sudo raspi-configand configure your internet connection. Other options, like locale, keyboard and timezone will be set by the install script. -
Finish the
raspi-config. Reboot as prompted. -
sudo apt update && sudo apt install -y git && git clone https://github.com/chaimleib/pilfs -
TZ=<your_timezone_name> source pilfs/pi_env.shand follow the prompts -
As the lfs user, run
source pilfs/lfs_env.sh. Now you should be ready to run through chapter 5 and onwards. -
If you wish, verify your host system dependencies by running
./version-check.sh.