mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-17 21:31:45 +01:00
fatpack sd card expansion (#3785)
* extend sd card before fatpack (#3783) * Fatpack sd card expand (#3784) * extend sd card before fatpack * fix expansion detection
This commit is contained in:
parent
4af7fa5d94
commit
f64f6d21e9
11
FAQ.dev.md
11
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
|
||||
|
@ -32,7 +32,7 @@ minimumSizeByte=16384000000
|
||||
rootPartition=$(sudo mount | grep " / " | cut -d " " -f 1 | cut -d "/" -f 3)
|
||||
rootPartitionBytes=$(lsblk -b -o NAME,SIZE | grep "${rootPartition}" | tr -s ' ' | cut -d " " -f 2)
|
||||
|
||||
# make conculsions
|
||||
# make conclusions
|
||||
needsExpansion=0
|
||||
tooSmall=0
|
||||
if [ $rootPartitionBytes -lt $minimumSizeByte ]; then
|
||||
|
@ -9,6 +9,37 @@ if [ "$EUID" -ne 0 ]
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if sd card needs expansion before fatpack
|
||||
source <(sudo /home/admin/config.scripts/blitz.bootdrive.sh status)
|
||||
if [ "${needsExpansion}" == "1" ]; then
|
||||
|
||||
echo "################################################"
|
||||
echo "# SD CARD NEEDS EXPANSION BEFORE FATPACK"
|
||||
echo "# this will be done now ... and trigger a reboot"
|
||||
echo "# after reboot run this script again"
|
||||
echo "################################################"
|
||||
|
||||
# write a stop file to prevent full bootstrap
|
||||
# after fsexpand reboot
|
||||
touch /boot/stop
|
||||
|
||||
# trigger fsexpand
|
||||
/home/admin/config.scripts/blitz.bootdrive.sh fsexpand
|
||||
|
||||
# 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
|
||||
fi
|
||||
|
||||
apt_install() {
|
||||
apt install -y ${@}
|
||||
if [ $? -eq 100 ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user