Skip to content

About

Raspberry Pi 5 üzerinde çevrimdışı bilgi arşivi: Wikipedia, haritalar ve hayatta kalma kaynakları kendi Wi-Fi ağı üzerinden sunulur, internet gerekmez. Internet-in-a-Box tabanlıdır.Offline knowledge archive on Raspberry Pi 5: Wikipedia, maps and survival resources served over its own Wi-Fi hotspot, no internet required. Built on Internet-in-a-Box.

Resources

Stars

777 stars

Watchers

14 watching

Forks

Latest commit

 

History

39 Commits

Folders and files

Repository files navigation

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 user@10.10.10.10
  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:

  • the disk was remounted read-only or has file system errors,
  • the disk's own SMART test reports a failure or pre-failure, or an NVMe SSD has used 90% of its life,
  • the disk is 95% full,
  • the Pi is running on, or has had, under-voltage (a weak power supply or battery can corrupt the disk).

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.

  • ssh user@hostname.local stops working after install. Internet-in-a-Box renames the Pi to box. Use ssh user@box.local or the Pi's IP address. To find the IP, run arp -a on your computer or check your router's device list.
  • Chromium says the profile is locked. This also comes from the hostname change. Click "Unlock Profile", or run rm -f ~/.config/chromium/Singleton*.
  • The hotspot doesn't appear. Connect over Ethernet, check sudo iiab-diagnostics, and make sure the install finished: /etc/iiab/install-flags/iiab-complete must exist.
  • Map downloads fail with "connection reset by peer". The map server (contabostorage.com) is blocked in some countries, e.g. Turkey. Install Cloudflare WARP on the Pi, connect, retry the download in the admin console, then disconnect:
    curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
    echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(. /etc/os-release; echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
    sudo apt update && sudo apt install -y cloudflare-warp
    warp-cli --accept-tos registration new && warp-cli --accept-tos connect
    # after downloads finish:
    warp-cli --accept-tos disconnect
  • Book collections (Water Treatment, Knots, Food for Preppers, Post-Disaster, Medicine) keep loading forever. These collections store their book list in the browser's local database. iPhone Safari private tabs and the captive portal pop-up window block that. Open them in a normal Safari tab.
  • The hotspot never comes up and the log says "invalid WPA passphrase length". Wi-Fi passwords must be 8–63 characters. Fix hostapd_password in /etc/iiab/local_vars.yml and wpa_passphrase in /etc/hostapd/hostapd.conf, then sudo systemctl restart hostapd.
  • The hotspot is visible, but devices say "incorrect password" or drop after a few seconds. The password is probably fine; the hotspot bridge (br0) is down. In sudo journalctl -u hostapd you see "associated → disassociated" repeating every ~4 seconds. Check:
    ip -br addr show br0
    bridge link
    If br0 is DOWN and wlan0 shows state disabled, the bridge was not created at boot. Changing connections with nmcli can leave the files in /etc/netplan/90-NM-*.yaml empty, which removes the bridge. Fix:
    sudo mkdir -p /root/netplan-bak && sudo mv /etc/netplan/90-NM-*.yaml /root/netplan-bak/
    sudo nmcli connection add type bridge ifname br0 con-name iiab-br0 ipv4.method manual ipv4.addresses 10.10.10.10/24 ipv6.method disabled bridge.stp no connection.autoconnect yes
    sudo nmcli connection up iiab-br0
    sudo systemctl restart hostapd dnsmasq
    br0 should now be UP with 10.10.10.10 and wlan0 should show state forwarding.
  • SSH without a cable: join the Pi's hotspot and use ssh user@10.10.10.10.
  • Restoring the original homepage: sudo cp /library/www/html/home/index.html.iiab-original /library/www/html/home/index.html

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 kullanici@10.10.10.10
  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:

  • disk salt okunur moda geçmiş ya da dosya sisteminde hata var,
  • diskin kendi SMART testi arıza ya da arıza öncesi belirti bildiriyor, veya NVMe SSD ömrünün %90'ı dolmuş,
  • disk %95 dolu,
  • Pi düşük voltajla çalışıyor ya da çalıştı (zayıf güç kaynağı ya da pil diski bozabilir).

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.

  • Kurulumdan sonra ssh kullanici@hostname.local çalışmıyor. Internet-in-a-Box cihazın adını box yapar. ssh kullanici@box.local ya da Pi'nin IP adresini kullan. IP adresini bulmak için bilgisayarında arp -a çalıştır ya da modeminin cihaz listesine bak.
  • Chromium "profile is locked" hatası veriyor. Bu da cihaz adının değişmesinden kaynaklanır. "Unlock Profile" butonuna tıkla ya da rm -f ~/.config/chromium/Singleton* komutunu çalıştır.
  • Hotspot görünmüyor. Ethernet ile bağlan, sudo iiab-diagnostics komutuyla kontrol et ve kurulumun bittiğinden emin ol: /etc/iiab/install-flags/iiab-complete dosyası var olmalı.
  • Harita indirmesi "connection reset by peer" hatası veriyor. Harita sunucusu (contabostorage.com) Türkiye gibi bazı ülkelerde engelli. Pi'ye Cloudflare WARP kur, bağlan, indirmeyi yönetim panelinden tekrar başlat ve bitince bağlantıyı kapat:
    curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
    echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(. /etc/os-release; echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
    sudo apt update && sudo apt install -y cloudflare-warp
    warp-cli --accept-tos registration new && warp-cli --accept-tos connect
    # indirmeler bitince:
    warp-cli --accept-tos disconnect
  • Kitap koleksiyonları (Su Arıtma, Düğümler, Gıda, Afet Sonrası, Tıp) sürekli "yükleniyor" diyor. Bu koleksiyonlar kitap listesini tarayıcının yerel veritabanında tutuyor. iPhone Safari'nin gizli sekmesi ve captive portal penceresi buna izin vermiyor. Normal bir Safari sekmesinde aç.
  • Hotspot hiç açılmıyor ve kayıtta "invalid WPA passphrase length" yazıyor. Wi-Fi şifreleri 8–63 karakter olmalı. /etc/iiab/local_vars.yml içindeki hostapd_password ve /etc/hostapd/hostapd.conf içindeki wpa_passphrase satırını düzelt, sonra sudo systemctl restart hostapd çalıştır.
  • Hotspot görünüyor ama cihazlar "hatalı şifre" diyor ya da birkaç saniyede kopuyor. Şifre büyük ihtimalle doğru, sorun hotspot köprüsünün (br0) kapalı olması. sudo journalctl -u hostapd çıktısında her ~4 saniyede tekrarlanan "associated → disassociated" satırları görürsün. Kontrol et:
    ip -br addr show br0
    bridge link
    br0 DOWN ve wlan0 için state disabled görünüyorsa köprü açılışta kurulmamış demektir. nmcli ile bağlantı eklemek ya da değiştirmek /etc/netplan/90-NM-*.yaml dosyalarını boşaltabiliyor, bu da köprüyü siliyor. Çözüm:
    sudo mkdir -p /root/netplan-bak && sudo mv /etc/netplan/90-NM-*.yaml /root/netplan-bak/
    sudo nmcli connection add type bridge ifname br0 con-name iiab-br0 ipv4.method manual ipv4.addresses 10.10.10.10/24 ipv6.method disabled bridge.stp no connection.autoconnect yes
    sudo nmcli connection up iiab-br0
    sudo systemctl restart hostapd dnsmasq
    Artık br0 10.10.10.10 adresiyle UP, wlan0 da state forwarding görünmeli.
  • Kablosuz SSH: Pi'nin hotspot'una bağlan ve ssh kullanici@10.10.10.10 kullan.
  • Orijinal ana sayfaya dönmek için: sudo cp /library/www/html/home/index.html.iiab-original /library/www/html/home/index.html

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.

About

Raspberry Pi 5 üzerinde çevrimdışı bilgi arşivi: Wikipedia, haritalar ve hayatta kalma kaynakları kendi Wi-Fi ağı üzerinden sunulur, internet gerekmez. Internet-in-a-Box tabanlıdır.Offline knowledge archive on Raspberry Pi 5: Wikipedia, maps and survival resources served over its own Wi-Fi hotspot, no internet required. Built on Internet-in-a-Box.

Resources

Stars

777 stars

Watchers

14 watching

Forks

Releases

Packages

Contributors

Languages