From 34f91f1730aa416ad2433c46949f38fd88e630e6 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Thu, 4 May 2023 13:23:05 +0200 Subject: [PATCH] Fatpack sd card expand (#3784) * extend sd card before fatpack * fix expansion detection --- FAQ.dev.md | 11 +++-------- home.admin/config.scripts/blitz.fatpack.sh | 8 +++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/FAQ.dev.md b/FAQ.dev.md index c0b1d8362..d63ae01f4 100644 --- a/FAQ.dev.md +++ b/FAQ.dev.md @@ -28,9 +28,8 @@ Work notes for the process of producing a new SD card image release: * In terminal `ssh pi@[IP-OF-RASPIBLITZ]` * Password is `raspberry` * Run the following command BUT REPLACE `[BRANCH]` with the branch-string of your latest version -* For FATPACK: `wget --no-cache https://raw.githubusercontent.com/rootzoll/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh -u rootzoll -b [BRANCH]` -* For MINIMAL: `wget --no-cache https://raw.githubusercontent.com/rootzoll/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh -u rootzoll -b [BRANCH] -f 0 -d headless` -* Monitor/Check outputs for warnings/errors - install LCD +* To run the minimal pack: `wget --no-cache https://raw.githubusercontent.com/rootzoll/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh -u rootzoll -b [BRANCH] -f 0 -d headless` +* Monitor/Check outputs for warnings/errors * Login new with `ssh admin@[IP-OF-RASPIBLITZ]` (pw: raspiblitz) and run `release` * Disconnect WiFi/LAN on build laptop (hardware switch off) and shutdown * Remove `Ubuntu LIVE` USB stick and cut power from the RaspberryPi @@ -45,11 +44,7 @@ Work notes for the process of producing a new SD card image release: * Click on `boot` volume once in the file manger * Connect the NTFS USB stick, open in file manager and delete old files -* if not: review changes in latest pishrink script -* To make a raw image from sd card - first way (terminal): - * Open Terminal and cd into directory of NTFS USB stick under `/media/amnesia` - * Run `df` to check on the SD card device name (`boot` - ignore last partition number) - * `dd if=/dev/[sdcarddevice] of=./raspiblitz.img` + * To make a raw image from sd card - second way (UI with progress): * Search "Laufwerke" or "Drives" on Tails Apps * Create image named `raspiblitz.img` to USB storage diff --git a/home.admin/config.scripts/blitz.fatpack.sh b/home.admin/config.scripts/blitz.fatpack.sh index 2ccf45ca2..8beaafaaa 100755 --- a/home.admin/config.scripts/blitz.fatpack.sh +++ b/home.admin/config.scripts/blitz.fatpack.sh @@ -11,7 +11,7 @@ fi # check if sd card needs expansion before fatpack source <(sudo /home/admin/config.scripts/blitz.bootdrive.sh status) -if [ "${fsexpanded}" != "1" ]; then +if [ "${needsExpansion}" == "1" ]; then echo "################################################" echo "# SD CARD NEEDS EXPANSION BEFORE FATPACK" @@ -29,6 +29,12 @@ if [ "${fsexpanded}" != "1" ]; then # make sure this expand is not marked (because its not done after release) sed -i "s/^fsexpanded=.*/fsexpanded=0/g" /home/admin/raspiblitz.info + echo "################################################" + echo "# SD CARD GOT EXPANSION BEFORE FATPACK" + echo "# triggering a reboot" + echo "# after reboot run this script again" + echo "################################################" + # trigger reboot shutdown -h -r now exit 0