Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V24.10.23 - won't work on Pi 32bit Bookworm ? #294

Open
joneyes opened this issue Nov 3, 2024 · 6 comments
Open

V24.10.23 - won't work on Pi 32bit Bookworm ? #294

joneyes opened this issue Nov 3, 2024 · 6 comments

Comments

@joneyes
Copy link

joneyes commented Nov 3, 2024

I've been scratching my head on this for a few hours now.
I have a number of Pi's running various editions of Raspbian, most of them use a pibackup.sh and that launches pishrink.sh
In order to try and unravel the problem, I have broken down the two scripts and run them independently.
Using 2 Pis as examples, one running Bookworm, the other Buster. Both mount a network drive and can create .imgs there.

The Pi that is running Buster quite happily shrinks the image (in this example compressing with Gzip too.):

_pi@Coop:~ $ sudo pishrink.sh -advz /media/backup/pi3btest/2024-11-03.img /media/backup/pi3btest/test4.img
pishrink.sh: Creating log file /home/pi/pishrink.log
PiShrink v24.10.23 - https://github.com/Drewsif/PiShrink

_pishrink.sh: Copying /media/backup/pi3btest/2024-11-03.img to /media/backup/pi3btest/test4.img...
pishrink.sh: Gathering data
Creating new /etc/rc.local
pishrink.sh: Checking filesystem
rootfs: 117373/904960 files (0.2% non-contiguous), 932718/3652608 blocks

resize2fs 1.44.5 (15-Dec-2018)
pishrink.sh: Shrinking filesystem
resize2fs 1.44.5 (15-Dec-2018)
Resizing the filesystem on /dev/loop0 to 934619 (4k) blocks.

Begin pass 2 (max = 115452)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 112)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 4 (max = 13854)
Updating inode references XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/loop0 is now 934619 (4k) blocks long.

pishrink.sh: Zeroing any free space left
pishrink.sh: Zeroed 157M
pishrink.sh: Shrinking partition
pishrink.sh: Truncating image
pishrink.sh: Using pigz on the shrunk image
/media/backup/pi3btest/test4.img to /media/backup/pi3btest/test4.img.gz
pishrink.sh: Shrunk /media/backup/pi3btest/test4.img.gz from 15G to 1.2G

However, the 32 bit Bookworm version hangs at the gathering data point and doesn't move on:

pi@pi3btest:~ $ sudo pishrink.sh -v /media/backup/pi3btest/2024-11-03.img /media/backup/pi3btest/test3.img
PiShrink v24.10.23 - https://github.com/Drewsif/PiShrink

pishrink.sh: Copying /media/backup/pi3btest/2024-11-03.img to /media/backup/pi3btest/test3.img...
pishrink.sh: Gathering data

There's nothing more added to the log file either if i use the -d switch.
The install was completed using the text from your Linux Installation instructions.
All the prerequsites (parted gzip pigz xz-utils udev e2fsprogs) are all listed in their own folders when running a sudo which:
eg:
pi@pi3btest:~ $ sudo which parted
/usr/sbin/parted

It feels like an issue creating the new /etc/rc.local?
There's certainly no .bak verison of it on the bookworm unit
Bookworm:
image
Buster:
image
Note that this is not a recent file creation?

I'm at a loss now - do you have any suggestions?

@joneyes
Copy link
Author

joneyes commented Nov 3, 2024

PS - I've since manually created rc.local.bak - that didn't make any difference.

@Drewsif
Copy link
Owner

Drewsif commented Nov 3, 2024

Can you attach your logs? Im guessing one of the external utilities we call is hanging with the network drive. Does it work when the image is local?

@joneyes
Copy link
Author

joneyes commented Nov 4, 2024

Thanks for the swift response.
If you can tell me which logs you want (and their locations), I'll attach them.
I'll dig out a usb drive with enough storage and try it local tomorrow

@Drewsif
Copy link
Owner

Drewsif commented Nov 4, 2024

there should be a pishrink.log the gets written with the -d option

@joneyes
Copy link
Author

joneyes commented Nov 4, 2024

So i have run a few tests today.
If i mount a local USB drive and manually copy the image files across. pishrink will work - and pretty quickly.
If i use the same mounted USB drive and specify the USB drive as the final destination of the shrunk file (wit the source on the NAS), it will start to copy, but the file transfer stalls at about 4.1GB (of 15GB).
Pishrink fails to write anything useful to the log when it fails in the file copy from the NAS to the USB, or copying and shrinking the resultant file on the NAS, or shrinking the existing file on the NAS.

Noting that the exact same version on Buster writes and works on the same NAS.
Both write as root to the NAS.

pishrink_nas to nas file copy.log
pishrink copy to USB.log
pishrink_localusb.log

@joneyes
Copy link
Author

joneyes commented Nov 5, 2024

Is it possible to spin up a version that will do enhanced logging with a -D switch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants