Merge pull request #43 from framps/master

Added installation instructions in README
This commit is contained in:
Drew Bonasera 2018-02-03 17:03:32 -05:00 committed by GitHub
commit 54051ea2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -1,16 +1,24 @@
# PiShrink # # PiShrink #
PiShrink is a bash script that automatically shrink a pi image that will then resize to the max size of the SD card on boot. This will make putting the image back onto the SD card faster and the shrunk images will compress better. PiShrink is a bash script that automatically shrink a pi image that will then resize to the max size of the SD card on boot. This will make putting the image back onto the SD card faster and the shrunk images will compress better.
`Usage: sudo ./pishrink.sh [-s] imagefile.img [newimagefile.img]` ## Usage ##
`sudo pishrink.sh [-s] imagefile.img [newimagefile.img]`
If the `-s` option is given the script will skip the autoexpanding part of the process. If you specify the `newimagefile.img` parameter, the script will make a copy of `imagefile.img` and work off that. You will need enough space to make a full copy of the image to use that option. If the `-s` option is given the script will skip the autoexpanding part of the process. If you specify the `newimagefile.img` parameter, the script will make a copy of `imagefile.img` and work off that. You will need enough space to make a full copy of the image to use that option.
## Prerequisites ## ## Prerequisites ##
If using Ubuntu, you will likely see an error about `e2fsck` being out of date and `metadata_csum`. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run. If using Ubuntu, you will likely see an error about `e2fsck` being out of date and `metadata_csum`. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run.
## Installation ##
```bash
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin
```
## Example ## ## Example ##
```bash ```bash
[user@localhost PiShrink]$ sudo ./pishrink.sh pi.img [user@localhost PiShrink]$ sudo pishrink.sh pi.img
e2fsck 1.42.9 (28-Dec-2013) e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure Pass 2: Checking directory structure