Drew Bonasera
26cd138b9b
More verbose and earlier errors on incompatible images
2020-04-27 06:17:07 -04:00
framp
3c3f68f59f
Added missing tail when retrieving partnum
2020-04-20 14:58:25 +02:00
framp
9a2c7fe949
Fixed pishrink issue #133
2020-04-20 14:07:11 +02:00
Drew Bonasera
18c86f53fc
Merge branch 'master' into fix/parted
2020-04-19 16:32:50 -04:00
kmpm
c99b053afb
stop on parted error
2020-04-09 18:17:47 +02:00
framp
d80d48a645
Minor code cleanup and README update
2020-02-29 14:52:35 +01:00
framp
b4db6c1a64
Patch from OmegaSquad82
2020-02-27 16:42:43 +01:00
framp
c7d74a73e7
Use -Z and -z instead of -i and use pigz now
2020-02-07 17:30:38 +01:00
framp
ab32008981
Added support for gzip and xz only
2020-02-07 16:49:22 +01:00
framp
4ed3162284
Initial version which supports addl zip tools
2020-01-11 15:21:54 +01:00
framp
9de4f53b96
Added some more dbug logs
2020-01-09 13:21:55 +01:00
daveilers
74b106e763
Add sysprep-ish steps
...
Add an option to remove logs, apt archives, dhcp client leases and ssh hostkeys from image while shrinking.
2020-01-03 09:49:25 -08:00
wfroemgen
054f6c7902
Update pishrink.sh
...
deleted option "p" from usage example
2019-10-28 09:44:41 +01:00
Drew Bonasera
17346f5d02
Update docs
2019-08-27 04:15:31 -04:00
Drew Bonasera
20ae97d2bc
Add gzip option
2019-08-27 03:52:43 -04:00
Drew Bonasera
97b9a5db39
Make pishrink always try to repair the filesystem
...
There were far too many people having to repair the filesystems by hand. Since the image would be mostly unusable anyway, I feel confident doing it on the image without copying.
2019-08-27 01:13:11 -04:00
Drew Bonasera
27f8780508
Add double quote to prevent globbing and word splitting
2019-08-27 01:11:27 -04:00
Drew Bonasera
562142b841
Merge branch 'offer_filesystem_repair_option' of https://github.com/framps/PiShrink
2019-08-26 23:35:15 -04:00
framp
cfe5cc5534
Fixed issue #84
2019-08-23 15:46:45 +02:00
framp
1dfe90f650
Added additional e2fscks with option -r and -p
2019-07-30 15:33:33 +02:00
framp
db62822a42
Removed some checks
2018-08-19 22:05:28 +02:00
framp
15c43f1199
Merge with debug branch
2018-08-19 17:59:44 +02:00
framp
8a0637b3da
Initial debug and error checking version
2018-08-19 17:54:23 +02:00
framp
c68ff6d502
Added option -r
2018-08-19 17:46:55 +02:00
framp
0fea4cc2a7
Update
2018-08-17 22:15:16 +02:00
framp
b0ffc3afd9
Initial debug and error checking version
2018-08-17 21:48:21 +02:00
framp
8aae06a4b2
Modified cleanup
2018-03-24 12:01:59 +01:00
framp
67add2e613
Added cleanup function trap
2018-02-14 20:07:11 +01:00
Drew Bonasera
eac933beb8
Add `-a minimal` to parted call to fix errors with some images
2018-02-03 17:38:31 -05:00
Andrew Scheller
3568798dd4
Give the new file the same ownership as the old file
...
(instead of having it always owned just by root)
2018-01-29 09:58:24 +00:00
Andrew Scheller
201db16c93
Replace `expr` with bash built-in arithmetic, and tidy up free-space calculation
2018-01-29 09:58:24 +00:00
Andrew Scheller
8331faf8f3
Check for additional required commands
2018-01-29 09:58:24 +00:00
Andrew Scheller
e3ff4d20aa
Double-quote all the filenames
2018-01-29 09:58:24 +00:00
Andrew Scheller
ec95ba8097
`ls` doesn't need `-a` flag when passed a filename
2018-01-29 09:57:19 +00:00
Andrew Scheller
c69f57affe
Tighten up grep matches
2018-01-29 09:57:19 +00:00
Andrew Scheller
8784bda989
Avoid calling identical commands multiple times
2018-01-29 09:57:19 +00:00
Andrew Scheller
49964b512c
Remove the unnecessary `tr -d '\n'` parts
2018-01-29 09:57:19 +00:00
Andrew Scheller
0b19d6c6ea
Add the -s flag to all parted commands
2018-01-29 09:57:19 +00:00
Andrew Scheller
b787dd4e66
Always quote echo strings
2018-01-29 09:57:19 +00:00
Andrew Scheller
b11de9a8ee
Remove unused variables
2018-01-29 09:57:19 +00:00
Andrew Scheller
9d6392d0c2
Use $() for command-substitution instead of backticks
2018-01-29 09:57:19 +00:00
Drew Bonasera
2aa44f0ecd
Fix error return value
...
Closes #39
2018-01-27 00:03:04 -05:00
Andrew Scheller
2229ae89a6
Don't allow a directory to be selected
...
The `-e` flag checks for a file _or_ a directory of that name. The `-f` flag checks only for files.
2018-01-21 22:08:43 +00:00
framp
f83e3f341d
Autorepair fsck errors
2017-12-29 18:03:11 +01:00
framp
4af698457e
Accept filenames with spaces
2017-12-02 23:18:54 +01:00
Drew Bonasera
ff89083249
Update auto expanding script
...
It now attempts to use raspi-config and falls back on the (updated) hard coded procedure. This should
help prevent some incompatibility issues.
2017-10-24 03:50:46 -04:00
Sean Mayo
0b04de8118
reverted to using raspi-config to be used for automatic image resizing
...
while not having to rely on the raspi-config tool does make the pishrink utility more portable, the raspi-config tool is already properly maintained. rather than being forced to maintain the autosizing utility in this script (which has already been broken for several months due to a linux kernal change), it just makes more sense to not have to rewrite properly maintained code.
2017-07-07 15:53:20 -07:00
Drew Bonasera
9b55197d9b
Remove need for raspi-config to be installed on the image for resizing.
...
Closes #8
2016-10-31 01:42:34 -04:00
Drew Bonasera
75dafa2801
Fix spacing
2016-08-22 04:11:37 -04:00
Carl Jensen
8388774c3e
New indents broke rc.local md5sum, startup script
...
The indentation was introduced in cad2e0e11a
, not when the safety hash check was added in 2c6f069c2f
, my first guess.
The indentations makes the rc.local begin with spaces instead of `#!/bin/bash` and will not run. But it gets better.
The md5 safety check is based on rc.local without indents, so after the added indentations the if-block will never be skipped. If the script is run a second time, the original rc.local backed up in rc.local.bak will be overwritten, and on boot result in a never ending loop, trying to expand the filesystem each time. A user could run the pishrink.sh a second time on a disk image, e.g. after making more edits.
2016-08-18 03:01:14 +02:00