|
| 1 | + |
| 2 | +# KoC Custom Image for Mwebaza 2024 |
| 3 | + |
| 4 | +Follow these steps to create a customized version of Raspberry Pi OS for |
| 5 | +use in KoC Labs in Uganda. The labs have Raspberry Pi 3B hardware. |
| 6 | + |
| 7 | +---- |
| 8 | +## Operating System Setup (Raspberry Pi OS) |
| 9 | + |
| 10 | +### Download Raspberry Pi OS |
| 11 | + |
| 12 | +* Download ZIP file for **Raspberry Pi OS with desktop and recommended software** |
| 13 | + * https://www.raspberrypi.com/software/operating-systems/ |
| 14 | + * As of Jan 2024, this file is: |
| 15 | + * Release date: December 5th 2023 |
| 16 | + * System: 32-bit |
| 17 | + * Kernel version: 6.1 |
| 18 | + * Debian version: 12 (bookworm) |
| 19 | + * Size: 2,602MB |
| 20 | + |
| 21 | + |
| 22 | +### Write RPiOS Image to SD Card |
| 23 | + |
| 24 | +* Use [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to install the downloaded file to a 8GB (or larger) SD card |
| 25 | +* Options: |
| 26 | + * Raspberry Pi Device: Raspberry Pi 3 (for Mwebaza Labs created in 2019, which have RPi 3B) |
| 27 | + * Operating System: Use Custom; browse to downloaded file |
| 28 | + * Storage: Select SD card inserted into your computer |
| 29 | +* OS Customization: |
| 30 | + * Set hostname: `mwebaza-pi` |
| 31 | + * Set username and password: |
| 32 | + * Username: `pi` |
| 33 | + * Password: `mwebaza` |
| 34 | + * Configure wireless LAN: |
| 35 | + * SSID: `Internet in a Box` |
| 36 | + * Password: (none) |
| 37 | + * Set locale settings: |
| 38 | + * Time zone: `Africa/Kampala` |
| 39 | + * Keyboard layout: `us` |
| 40 | +* Write the new OS to SD card |
| 41 | + |
| 42 | + |
| 43 | +### Insert SD Card into Pi and Boot |
| 44 | + |
| 45 | +* First boot will take a few minutes |
| 46 | + |
| 47 | + |
| 48 | +---- |
| 49 | +## KoC Customizations and Packages |
| 50 | + |
| 51 | +### Create Bigger Swap File |
| 52 | + |
| 53 | +* The default swap file size with RPi OS is 100MB ... [too small](https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian) |
| 54 | +* Open a terminal and run the following commands to increase the swap file to 2048MB: |
| 55 | +* `sudo vi /etc/dphys-swapfile` |
| 56 | +* Look for line that contains `CONF_SWAPSIZE`, change value to 2048 |
| 57 | +* Save, quit |
| 58 | +* `sudo /etc/init.d/dphys-swapfile stop` |
| 59 | +* `sudo /etc/init.d/dphys-swapfile start` |
| 60 | +* Reboot |
| 61 | + |
| 62 | + |
| 63 | +#### Software Updates |
| 64 | + |
| 65 | +* Join wifi |
| 66 | +* Open terminal, apply any software updates: |
| 67 | + * `sudo apt update` |
| 68 | + * `sudo apt upgrade -y` |
| 69 | + * If needed, the password for user `koc` is: `mwebaza` |
| 70 | +* Reboot |
| 71 | + |
| 72 | + |
| 73 | +#### Software Package Installation |
| 74 | + |
| 75 | +In this section, we install several educational software packages and games, plus removes some |
| 76 | +RPiOS packages that don't run very well on Pi 3Bs. This may take several hours, depending on |
| 77 | +Internet connection speed. |
| 78 | + |
| 79 | +* Join WiFi |
| 80 | +* Open a terminal and run the following: |
| 81 | +``` |
| 82 | +mkdir -p koc/install |
| 83 | +``` |
| 84 | + |
| 85 | +* Using web browser, download the following files into `koc/install` folder created in the last step: |
| 86 | + * https://raw.githubusercontent.com/kidsoncomputers/documentation/master/uganda/2024/mwebaza/koc-packages.sh |
| 87 | + * https://raw.githubusercontent.com/kidsoncomputers/documentation/master/uganda/2024/mwebaza/install-packages.txt |
| 88 | + * https://raw.githubusercontent.com/kidsoncomputers/documentation/master/uganda/2024/mwebaza/remove-packages.txt |
| 89 | + |
| 90 | +* Return to the terminal and run: |
| 91 | +``` |
| 92 | +cd koc/install |
| 93 | +chmod u+x koc-packages.sh |
| 94 | +./koc-packages.sh |
| 95 | +``` |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | +#### Set Desktop Backgound and Bookmarks |
| 100 | + |
| 101 | +Other customizations to prepare the OS image for use in an offline KoC lab environment. |
| 102 | + |
| 103 | +* Start **Web Browser** (Menu, Internet, Chromium) |
| 104 | + * Set home page to `http://box` (Internet in a Box media server which is available in each Mwebaza lab): |
| 105 | + * Go to Chromium Settings |
| 106 | + * Search for "on start-up" |
| 107 | + * Choose "Open a specific page or set of pages" |
| 108 | + * Enter `http://box` |
| 109 | + |
| 110 | +* Start Gcompris to download additional content files |
| 111 | + * Upon starting Gcompris, it should prompt for downloading some content |
| 112 | + * Also open Settings and look for options to download other content |
| 113 | + |
| 114 | +* Download wallpapers/background images, then set one to be the desktop background: |
| 115 | + * Open a terminal and run the following: |
| 116 | +``` |
| 117 | +mkdir -p koc/install |
| 118 | +``` |
| 119 | + * Using web browser, download the following file into `koc/install` folder created in the last step: |
| 120 | + * https://raw.githubusercontent.com/kidsoncomputers/documentation/master/uganda/2024/mwebaza/backgrounds-koc-mwebaza-2024.sh |
| 121 | + * Return to the terminal and run: |
| 122 | +``` |
| 123 | +cd koc/install |
| 124 | +chmod u+x backgrounds-koc-mwebaza-2024.sh |
| 125 | +./backgrounds-koc-mwebaza-2024.sh |
| 126 | +``` |
| 127 | + |
| 128 | + |
| 129 | +#### Change background |
| 130 | + |
| 131 | +* Right-click desktop, choose **Desktop Preferences**, **Desktop**, **Picture**, then select a background image from `Backgrounds/Mwebaza/` folder in the user's home directory. |
| 132 | +* Customize the stretch/layout of the picture as well as desktop background to match desired appearance |
| 133 | + |
| 134 | + |
| 135 | +## Create Image File from SD Card |
| 136 | + |
| 137 | +* Follow [clone-sd-card](./clone-sd-card.md) instructions to make a backup copy of this custom OS for distribution. |
0 commit comments