HAS_Prepper_Disk README

The project's README from github.com/schematrix/HAS_Prepper_Disk. As one markdown file: README.md.

HAS_PrepperDisk exploded view

English · Türkçe


Katkıda Bulunanlar / Contributors

HAS_PrepperDisk topluluğun emeğiyle büyüyor. Her katkı gerçek bir Raspberry Pi 5 üzerinde denendi ve sonra eklendi. Emeği geçen herkese teşekkürler.

HAS_PrepperDisk grows with the community's work. Every contribution below was tested on a real Raspberry Pi 5 before it was merged. Thank you to everyone who helped.

PR Katkıda bulunan / Contributor Ne getirdi What it added
#3 @turer73, doğrulama / verified by @volthdl Kaldırılmış ZIM adlarını düzeltti, Türkçe içerikleri (Vikikitap, Vikisöz, Vikikaynak, Vikisözlük, PhET, iFixit) ekledi, sürümleri Kiwix kataloğundan bulup her indirmeyi SHA-256 ile doğrulayan indirme betiği Fixed retired ZIM names, added Turkish content (Wikibooks, Wikiquote, Wikisource, Wiktionary, PhET, iFixit), catalog-based versions and SHA-256 verification for every download
#10 @Proxy34 Ana sayfada telefonun değil kutunun saati, ZIM dosyalarının doğru eşleşmesi ve README düzeltmeleri Homepage shows the box's clock instead of the phone's, correct ZIM matching and README fixes
#11 @Proxy34 AFAD, CDC ve EPA kaynaklı, internetsiz açılan Türkçe acil durum sayfası Turkish emergency page sourced from AFAD, CDC and EPA, works offline
#12 @efeesrefinal Kutunun durumunu tek komutla gösteren salt okunur sağlık kontrolü (status.sh) Read-only health check that shows the box's state in one command (status.sh)
#13 @efeesrefinal Her PR'da kabuk betiklerini otomatik denetleyen ShellCheck CI ShellCheck CI that checks the shell scripts on every PR
#16 @Proxy34 Telefonda rahat okunan ve parmakla kolay basılan ana sayfa Homepage that is easy to read and tap on phones
#17 @Proxy34 Disk dolarken, SSD yıpranırken ya da güç yetersizken ana sayfada uyarı Homepage warnings when the disk is filling up, the SSD is wearing out or power is insufficient
#28 @isihussain İnternetsiz ortamda saati korumak için RTC pili notu RTC battery note for keeping the time without internet
#29 @isihussain Windows'ta klonlanan betiklerin Pi'de bozulmaması için satır sonu ayarı (.gitattributes) Line-ending rules (.gitattributes) so scripts cloned on Windows still run on the Pi

İnceleme ve testleriyle açık PR'lara destek olan @volthdl, @FurkanKY, @Proxy34 ve @ramazansancar'a da ayrıca teşekkürler.

Special thanks also to @volthdl, @FurkanKY, @Proxy34 and @ramazansancar for reviewing and testing open PRs.

English

An offline knowledge archive on a Raspberry Pi 5. Wikipedia, maps, medical references and repair guides, served over the Pi's own Wi-Fi hotspot. Any phone or laptop that joins the network can open them in a browser. No internet needed.

Built on Internet-in-a-Box and Kiwix. This repo adds a ready-made configuration, helper scripts and a custom homepage.

Hardware

Part Notes
Raspberry Pi 5 (4 GB or 8 GB)
M.2 NVMe HAT + NVMe SSD (256 GB+) Content lives here
microSD card (32 GB+) Operating system
5V/5A USB-C power supply The official one is recommended
Active cooler The Pi 5 and SSD get warm
Ethernet cable Recommended during install
RTC battery (optional) Keeps system time offline (e.g. official SC1163)

RTC battery note: Without internet access, the Pi 5 cannot sync time via NTP. When power is lost, the internal RTC clock resets unless a backup battery is connected to the J5 (BAT) connector. If you use the official rechargeable Panasonic ML-2020 battery (SC1163), enable trickle-charging by adding dtparam=rtc_bbat_vchg=3000000 to /boot/firmware/config.txt. (Do not enable charging if using standard non-rechargeable CR2032 cells).

Screenshot 2026-10-30 at 23 22 21

Installation

1. Operating system. Use Raspberry Pi Imager to flash Raspberry Pi OS Lite (64-bit) to the SD card. In Imager's settings, enable SSH and set a username and password. Boot the Pi with the SSD attached and connect it to your router with Ethernet.

2. Update and get this repo.

sudo apt update && sudo apt full-upgrade -y
sudo apt install -y git
git clone https://github.com/schematrix/HAS_Prepper_Disk.git
cd HAS_Prepper_Disk
chmod +x install.sh scripts/*.sh

3. Mount the SSD at /library. Find the disk name with lsblk; it is usually nvme0n1. If the disk is not ext4 it will be formatted, and the script asks before doing so.

sudo ./scripts/setup-ssd.sh /dev/nvme0n1

4. Install. The script asks for the Wi-Fi name and password, then installs Internet-in-a-Box (30–60 min). If the Pi reboots or the install stops, run the same command again. It continues where it left off.

sudo ./install.sh

During the install Internet-in-a-Box asks three things of its own: a new password for the iiab-admin user (used for http://<pi-ip>/admin, write it down), a key press to confirm you will re-run the command if something goes wrong, and at the end Enter to reboot. After the reboot run sudo ./install.sh once more; it skips the finished part and installs the homepage.

5. Download content. Edit config/content.conf to choose what to download, then run the script below. The defaults need about 160 GB, and downloads can take many hours. If a download is interrupted, re-run the script and it resumes. The script looks up the newest version of each ZIM in the Kiwix catalog, checks free disk space before each download and verifies every file against its SHA-256 checksum.

sudo ./scripts/download-content.sh

6. Maps. Open http://<pi-ip>/admin (user iiab-admin), go to the maps section of the Install Content menu and choose the regions you want.

7. Use it. Join the Wi-Fi network you created and open http://box.lan/home.

Optional: internet over a USB Wi-Fi adapter

The Pi's built-in Wi-Fi is dedicated to the hotspot. If the Pi needs internet temporarily (updates, new content) and there is no Ethernet cable, add a cheap USB Wi-Fi adapter as a second card. Adapters with the MediaTek MT7601U chip work out of the box.

  1. Plug the adapter in, preferably into a black USB 2.0 port. The blue USB 3.0 ports can interfere with 2.4 GHz Wi-Fi.
  2. Join the Pi's hotspot from your laptop and connect: ssh [email protected]
  3. Connect the adapter (usually wlan1) to a Wi-Fi network:
    nmcli device wifi list ifname wlan1
    sudo nmcli device wifi connect "NETWORK_NAME" password "PASSWORD" ifname wlan1 name temp-wifi
    
  4. When you are done, remove the connection: sudo nmcli connection delete temp-wifi

Never run sudo iiab-network while a USB Wi-Fi adapter is plugged in. It may move the hotspot onto the adapter. Unplug it first.

Disk and power health

Every 6 hours (and 5 minutes after boot) scripts/disk-health.sh checks the /library disk and the Pi's power supply. If something is wrong, a red warning appears at the top of the homepage:

Check now: sudo ./scripts/disk-health.sh. Disks behind some USB adapters don't report SMART; those checks are then skipped silently.

Repo layout

install.sh                 main installer
scripts/setup-ssd.sh       mounts the SSD at /library
scripts/download-content.sh  downloads/updates ZIM files from Kiwix
scripts/install-homepage.sh  installs the custom homepage
scripts/status.sh          health check: disk, services, hotspot, content, power
scripts/disk-health.sh     disk and power health check (saglik/: its systemd timer)
config/iiab-overrides.yml  Internet-in-a-Box settings
config/content.conf        list of content to download
www/home/index.html        homepage
www/home/acil.html         emergency page (Turkish, sourced from AFAD and EPA)

Troubleshooting

Start with the health check. It only reads, needs no sudo, and points to the matching fix below:

./scripts/status.sh

It checks free space on the SD card and SSD, the web, Kiwix, hotspot and DHCP services, the hotspot bridge, which ZIMs from config/content.conf are missing or not yet in the Kiwix library, unfinished downloads, CPU temperature and under-voltage. It exits with 1 if it finds a problem, so it can also run from cron.

License

The scripts and homepage in this repo are released under the MIT License. Internet-in-a-Box, Kiwix and all downloaded content (Wikipedia, OpenStreetMap, etc.) keep their own licenses. This project is not affiliated with Internet-in-a-Box or Kiwix.


Türkçe

Raspberry Pi 5 üzerinde çevrimdışı bilgi arşivi. Wikipedia, haritalar, tıbbi başvuru kaynakları ve tamir rehberleri Pi'nin kendi Wi-Fi ağı üzerinden sunulur. Ağa bağlanan herhangi bir telefon ya da bilgisayar bunları tarayıcıdan açabilir. İnternet gerekmez.

Internet-in-a-Box ve Kiwix üzerine kurulmuştur. Bu repo hazır ayarlar, yardımcı betikler ve özel bir ana sayfa ekler.

Donanım

Parça Not
Raspberry Pi 5 (4 GB veya 8 GB)
M.2 NVMe HAT + NVMe SSD (256 GB+) İçerikler burada durur
microSD kart (32 GB+) İşletim sistemi
5V/5A USB-C adaptör Resmi adaptör önerilir
Aktif soğutucu Pi 5 ve SSD ısınır
Ethernet kablosu Kurulum sırasında önerilir
RTC pili (isteğe bağlı) İnternetsiz ortamda sistem saatini korur (örn. resmi SC1163)

RTC pili notu: Afet durumunda internet bağlantısı olmadığı için Pi 5 zamanı NTP üzerinden eşitleyemez. Elektrik kesildiğinde sistem saatinin sıfırlanmaması için Pi 5'in J5 (BAT) yuvasına bir yedek pil takılması önerilir. Resmi şarj edilebilir Panasonic ML-2020 pil (SC1163) kullanıyorsanız, /boot/firmware/config.txt dosyasına dtparam=rtc_bbat_vchg=3000000 ekleyerek şarj özelliğini açabilirsiniz. (Standart şarj edilmeyen CR2032 pillerde bu ayarı kesinlikle açmayın).

Kurulum

1. İşletim sistemi. Raspberry Pi Imager ile SD karta Raspberry Pi OS Lite (64-bit) yaz. Imager ayarlarında SSH'ı aç, kullanıcı adı ve şifre belirle. Pi'yi SSD takılıyken başlat ve modeme Ethernet ile bağla.

2. Sistemi güncelle ve repoyu indir.

sudo apt update && sudo apt full-upgrade -y
sudo apt install -y git
git clone https://github.com/schematrix/HAS_Prepper_Disk.git
cd HAS_Prepper_Disk
chmod +x install.sh scripts/*.sh

3. SSD'yi /library klasörüne bağla. Disk adını lsblk ile bul, genelde nvme0n1 olur. Disk ext4 değilse formatlanır, ama betik bunu yapmadan önce onay ister.

sudo ./scripts/setup-ssd.sh /dev/nvme0n1

4. Kur. Betik önce Wi-Fi adını ve şifresini sorar, sonra Internet-in-a-Box'ı kurar (30–60 dk). Pi yeniden başlarsa ya da kurulum yarıda kalırsa aynı komutu tekrar çalıştır. Kaldığı yerden devam eder.

sudo ./install.sh

Kurulum sırasında Internet-in-a-Box kendisi üç şey sorar: iiab-admin kullanıcısı için yeni bir şifre (http://<pi-ip>/admin girişinde kullanılır, bir yere not et), bir sorun olursa komutu tekrar çalıştıracağını onaylaman için bir tuşa basman ve en sonda yeniden başlatmak için Enter. Pi açıldıktan sonra sudo ./install.sh komutunu bir kez daha çalıştır; biten kısmı atlar ve ana sayfayı kurar.

5. İçerikleri indir. Ne indirileceğini config/content.conf dosyasından seç, sonra aşağıdaki betiği çalıştır. Varsayılan liste yaklaşık 160 GB tutar ve indirme saatler sürebilir. İndirme yarıda kalırsa betiği tekrar çalıştırman yeterli, kaldığı yerden devam eder. Betik her ZIM'in en yeni sürümünü Kiwix kataloğundan bulur, her indirmeden önce boş alanı kontrol eder ve inen dosyayı SHA-256 özetiyle doğrular.

sudo ./scripts/download-content.sh

6. Haritalar. http://<pi-ip>/admin adresine gir (kullanıcı adı iiab-admin), Install Content menüsündeki harita bölümüne git ve istediğin bölgeleri seç.

7. Kullan. Oluşturduğun Wi-Fi ağına bağlan ve http://box.lan/home adresini aç.

İsteğe bağlı: USB Wi-Fi adaptörüyle internet

Pi'nin dahili Wi-Fi kartı sadece hotspot için kullanılıyor. Pi'nin geçici olarak internete çıkması gerekirse (güncelleme, yeni içerik) ve Ethernet kablosu yoksa ikinci kart olarak ucuz bir USB Wi-Fi adaptörü tak. MediaTek MT7601U yongalı adaptörler kurulumsuz çalışıyor.

  1. Adaptörü mümkünse siyah USB 2.0 portlarından birine tak. Mavi USB 3.0 portları 2,4 GHz Wi-Fi'da parazit yapabiliyor.
  2. Bilgisayarını Pi'nin hotspot'una bağla ve SSH ile gir: ssh [email protected]
  3. Adaptörü (genelde wlan1) bir Wi-Fi ağına bağla:
    nmcli device wifi list ifname wlan1
    sudo nmcli device wifi connect "AG_ADI" password "SIFRE" ifname wlan1 name gecici-wifi
    
  4. İşin bitince bağlantıyı sil: sudo nmcli connection delete gecici-wifi

USB Wi-Fi adaptörü takılıyken asla sudo iiab-network çalıştırma. Hotspot'u adaptöre taşıyabilir. Önce adaptörü çıkar.

Disk ve güç sağlığı

scripts/disk-health.sh 6 saatte bir (ve açılıştan 5 dakika sonra) /library diskine ve Pi'nin güç kaynağına bakar. Bir sorun varsa ana sayfanın en üstünde kırmızı bir uyarı çıkar:

Hemen kontrol: sudo ./scripts/disk-health.sh. Bazı USB adaptörlerinin arkasındaki diskler SMART bilgisi vermez; o zaman bu kontrol sessizce atlanır.

Repo yapısı

install.sh                   ana kurulum betiği
scripts/setup-ssd.sh         SSD'yi /library klasörüne bağlar
scripts/download-content.sh  Kiwix'ten ZIM dosyalarını indirir/günceller
scripts/install-homepage.sh  özel ana sayfayı kurar
scripts/status.sh            sağlık kontrolü: disk, servisler, hotspot, içerik, güç
scripts/disk-health.sh       disk ve güç sağlığı denetimi (saglik/: systemd zamanlayıcısı)
config/iiab-overrides.yml    Internet-in-a-Box ayarları
config/content.conf          indirilecek içerik listesi
www/home/index.html          ana sayfa
www/home/acil.html           acil durum sayfası (AFAD ve EPA kaynaklı)

Sorun giderme

Önce sağlık kontrolünü çalıştır. Sadece okur, sudo gerektirmez ve aşağıdaki ilgili çözüme yönlendirir:

./scripts/status.sh

SD kart ve SSD'deki boş alanı, web, Kiwix, hotspot ve DHCP servislerini, hotspot köprüsünü, config/content.conf içindeki ZIM'lerden eksik olanları ya da Kiwix kütüphanesine henüz eklenmemiş olanları, yarım kalan indirmeleri, işlemci sıcaklığını ve düşük voltajı kontrol eder. Sorun bulursa 1 koduyla çıkar, bu yüzden cron ile de çalıştırılabilir.

Lisans

Bu repodaki betikler ve ana sayfa MIT Lisansı ile yayınlanmıştır. Internet-in-a-Box, Kiwix ve indirilen tüm içerikler (Wikipedia, OpenStreetMap vb.) kendi lisanslarına tabidir. Bu proje Internet-in-a-Box veya Kiwix ile bağlantılı değildir.

HAS_Prepper_Disk (schematrix/HAS_Prepper_Disk)

Searching Database…

What is this?An offline knowledge archive for a Raspberry Pi 5. It serves Wikipedia, maps, medical references and repair guides over the Pi's own Wi-Fi hotspot, so any phone or laptop can open them in a browser without internet.
Is this an app I install, or a whole system?It is a ready-made setup built on Internet-in-a-Box and Kiwix: a preset configuration, helper scripts and a custom homepage that you install onto a dedicated Pi.
How do I get it running?Flash Raspberry Pi OS Lite (64-bit) with Raspberry Pi Imager, enable SSH, mount the SSD at /library, then run the repo's install script. It asks for a Wi-Fi name and password and takes about 30-60 minutes. If it stops, run the same command again and it resumes. After the reboot, run install.sh once more to add the homepage.
What hardware do I need?A Raspberry Pi 5 with 4 or 8 GB, an M.2 NVMe HAT with a 256 GB+ SSD for the content, a 32 GB+ microSD card for the OS, a 5V/5A USB-C power supply and an active cooler. Ethernet is recommended during install, and an RTC battery is optional.
Do I need internet after setup?No. Devices on the Pi's hotspot read everything locally. Internet is only needed for updates or new content, and you can temporarily add a USB Wi-Fi adapter for that.
What's inside the offline library?Wikipedia, OpenStreetMap maps, medical references and repair guides, served through Kiwix. The repo also adds Turkish material such as Wikibooks, Wikiquote, Wikisource, Wiktionary, PhET and iFixit, plus a Turkish emergency page built from AFAD, CDC and EPA sources.
Is there a quick way to check the box's health?Yes. status.sh is a read-only health check that runs without sudo. It checks disk space, core services, the hotspot, missing ZIM files, unfinished downloads, CPU temperature and under-voltage, and points to the matching fix.
Creator
schematrix
Size
2.5 MB
Stars
811
Updated
CommitNov 07
Age
22d
Commits · 90 Days