Fatpack sd card expand (#3784)

* extend sd card before fatpack

* fix expansion detection
This commit is contained in:
/rootzoll 2023-05-04 13:23:05 +02:00 committed by GitHub
parent 7943fe0611
commit 34f91f1730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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