diff --git a/README.md b/README.md index e4c4542..84411a8 100644 --- a/README.md +++ b/README.md @@ -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 - diff --git a/VERSION b/VERSION index 49d5957..3b04cfb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1 +0.2 diff --git a/addon/www/index.html b/addon/www/index.html index 2722980..c1cb663 100644 --- a/addon/www/index.html +++ b/addon/www/index.html @@ -200,7 +200,7 @@ along with this program. If not, see . rest("GET", "/is_system_upgradeable", null, function(upgradeable) { if (!upgradeable) { var message = 'Filesystems to small, system not upgradeable!
'; - message += 'Please download and install adapted RaspMatic image first.'; + message += 'Please download and install adjusted RaspMatic image from RaspMatic image first.'; display_message('error', message, 6000000); } }); diff --git a/resize_image.sh b/resize_image.sh index 62e89ff..b0a3531 100755 --- a/resize_image.sh +++ b/resize_image.sh @@ -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 diff --git a/rmupdate.tar.gz b/rmupdate.tar.gz new file mode 100644 index 0000000..a8340be Binary files /dev/null and b/rmupdate.tar.gz differ