mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 13:37:40 +02:00
version 0.2
This commit is contained in:
parent
207e9f95af
commit
62e04d5414
@ -1,12 +1,11 @@
|
||||
# RaspberryMatic addon to (auto-)update system
|
||||
Do not use this addon in the current state!
|
||||
This addon can be used to easily up- and downgrade the RaspberryMatic system to another version.
|
||||
|
||||
## Prerequisites
|
||||
* Adapted partiton layout
|
||||
* This addon depends on CUxD
|
||||
* RaspMatic image with adjusted partition sizes
|
||||
|
||||
## Installation / configuration
|
||||
* Download [adapted RaspberryMatic image](https://github.com/j-a-n/raspberrymatic-addon-rmupdate/raw/master/RaspberryMatic.zip)
|
||||
* Download [adapted RaspberryMatic image](https://github.com/j-a-n/raspberrymatic-addon-rmupdate/raw/master/RaspberryMatic.adjusted.zip)
|
||||
* Install adjusted RaspberryMatic image like described at [RaspberryMatic project](https://github.com/jens-maus/RaspberryMatic)
|
||||
* Download [addon package](https://github.com/j-a-n/raspberrymatic-addon-rmupdate/raw/master/rmupdate.tar.gz)
|
||||
* Install addon package on RaspberryMatic via system control
|
||||
|
||||
|
@ -200,7 +200,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
rest("GET", "/is_system_upgradeable", null, function(upgradeable) {
|
||||
if (!upgradeable) {
|
||||
var message = 'Filesystems to small, system not upgradeable!<br />';
|
||||
message += 'Please download and install adapted <a href="https://github.com/j-a-n/raspberrymatic-addon-rmupdate">RaspMatic image</a> first.';
|
||||
message += 'Please download and install adjusted RaspMatic image from <a href="https://github.com/j-a-n/raspberrymatic-addon-rmupdate">RaspMatic image</a> first.';
|
||||
display_message('error', message, 6000000);
|
||||
}
|
||||
});
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
LOOP_DEV=4
|
||||
BOOT_SIZE=$((50*1024*1024))
|
||||
ROOT_SIZE=$((1000*1024*1024))
|
||||
BOOT_SIZE=$((100*1024*1024))
|
||||
ROOT_SIZE=$((1900*1024*1024))
|
||||
USR_LOCAL_SIZE=$((2*1024*1024))
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ if [[ $EUID -ne 0 ]]; then
|
||||
fi
|
||||
|
||||
image_file="$1"
|
||||
new_image_file="$1.resized"
|
||||
new_image_file="${1/\.img/\.adjusted\.img}"
|
||||
|
||||
echo "*** Creating new image file and partitions ***"
|
||||
dd if=/dev/zero of=$new_image_file bs=1M count=$((((${BOOT_SIZE}+${ROOT_SIZE}+${USR_LOCAL_SIZE})/1024/1024)+1))
|
||||
@ -49,7 +49,7 @@ losetup /dev/loop${LOOP_DEV} $new_image_file
|
||||
kpartx -a /dev/loop${LOOP_DEV}
|
||||
ln -s /dev/loop${LOOP_DEV} /dev/mapper/loop${LOOP_DEV}p
|
||||
|
||||
fsck.vfat -a /dev/mapper/loop${LOOP_DEV}p1
|
||||
#fsck.vfat -a /dev/mapper/loop${LOOP_DEV}p1
|
||||
fatresize --size $BOOT_SIZE /dev/mapper/loop${LOOP_DEV}p1
|
||||
fsck.ext4 -f -y /dev/mapper/loop${LOOP_DEV}p2
|
||||
resize2fs /dev/mapper/loop${LOOP_DEV}p2
|
||||
|
BIN
rmupdate.tar.gz
Normal file
BIN
rmupdate.tar.gz
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user