Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Share:
Notifications
Clear all

Partition shrinking/resizing doesnt work on MacOS Sequoia 15.3.2 (24D81). Please help fix.

2 Posts
2 Users
0 Reactions
418 Views
(@danrancan)
New Member
Joined: 11 months ago
Posts: 0
Topic starter  

I have a USB Stick with Ubuntu Server 22.04 for Raspberry Pi (aarch64) installed on it. I am trying to back it up, and shrink the drive from a 128GB Drive to a much smaller file. I have the shrink option set properly in ApplePi Baker and when I start the cloning, It seems to shrink the partition and image filesize by barely anything. I have tried to shrink with both the stable version as well as the beta version of ApplePi Baker, and the cloned image just doesn't shrink. NOTE: I am saving the clone as a

.img

file, NOT a

.zip

file.

Could you help me figure out why ApplePi Baker is not shrinking it's clones?

Here is the output log from my most recent "unshrunken" image using ApplePi-Baker v2.3.0 (Build2), (Helper Tool version 1.9.2), on MacOS Version 15.3.2 (Build 24D81):

11:54:12 Initialization Info
11:54:12 - ApplePi-Baker 2.3.0 (Build 2)
11:54:12 - macOS Version 15.3.2 (Build 24D81) x86-64 (64 bit application)
11:54:12 - libarchive 3.6.0, by Tim Kientzle
11:54:12 - liblzma 5.2.5, by Mike Kezner et al.
11:54:12 - zlib 1.2.11, by Greg Roelofs && Mark Adler
11:54:12 - bz2lib 1.0.8, by Julian Seward
11:54:12 - e2fsprogs 1.46.5, by Theodore Ts'o
11:54:12 No HelperTool Found - Installing HelperTool
11:54:17 HelperTool Updated to 1.9.2
11:54:18 Disk Appeared - /dev/disk5
11:54:18 Disk Appeared - /dev/disk4
11:54:18 Disk Appeared - /dev/disk3
11:54:18 Disk Appeared - /dev/disk2
11:54:18 Disk Appeared - /dev/disk0
11:54:18 Disk Appeared - /dev/disk1
11:54:27 Full Disk Access Test (1): SUCCESS
11:54:27 Drive added to list: /dev/disk4 (128 GB KS100Pro 128GB kuesuny)
11:54:31 Backup -- START BACKUP
11:54:53 Backup Started - Making Disk to File Backup
11:54:53 Source - Disk: /dev/disk4 (128 GB KS100Pro 128GB kuesuny) (128,035,676,160 bytes)
11:54:53 Source - Disk: only 5,382,340,608 bytes in use
11:54:53 Destination - File: /Users/boo/Desktop/backup2.img
11:54:53 Shrink IMG Enabled - Temporary IMG file: "backup2.tmp"
11:54:59 Backup started
12:03:00 Finished - Completed in 8 minutes and 6 seconds, average speed 263.7 MB/sec
12:03:00 Resizing - Attempting IMG shrinking
12:03:00 RESIZE - Attempting to MINIMIZE a Linux partition in the IMG file "backup2.tmp"
12:03:00 RESIZE - Find Ext2/3/4 partition and determine size and location
12:03:00 RESIZE - STATS:
12:03:00 File Size : 128,035,676,160 Bytes (250,069,680 Sectors)
12:03:00 Linux Partition : 4,844,421,120 Bytes (9,461,760 Sectors)
12:03:00 Starts at : Byte 537,919,488 (Sector 1,050,624)
12:03:00 Linux Target Size : Minimum size
12:03:00 RESIZE - Extracting Ext2/3/4 Linux partition
12:03:05 RESIZE - Verifying and Fixing extracted Linux Partition
12:03:05 RESIZE - Shrinking Linux Partition to Minimum Size (double pass)
12:03:07 RESIZE - Creating new IMG file and Updating Partition Table IMG file
12:05:12 RESIZE - Shrinking of IMG file completed
12:05:12 Original:
12:05:12 - IMG File Size : 128,035,676,160 Bytes
12:05:12 - Linux Partition : 4,844,421,120 Bytes
12:05:12 Resized:
12:05:12 - IMG File Size : 127,001,710,592 Bytes
12:05:12 - Linux Partition : 3,810,455,552 Bytes
12:05:12 File SHRUNK : 1,033,965,568 Bytes
12:05:15 Backup - Backup and Resizing Completed in 10 minutes and 22 seconds
12:05:15 Backup -- END BACKUP
This topic was modified 4 weeks ago 2 times by danrancan

   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2854
 

Hi Danrancan!

Several reasons why this may or may not work, but I suspect your 1st partition (FAT) maybe the culprit.
Resizing only works for the Linux (Ext) partition which seems about 5Gb.
The FAT partition then is about 123 Gb, assuming the disk is used for a full 100%.
The tool I use does only resize Ext partitions.

Correct me if I'm wrong. On your Mac Disk Utility can maybe confirm this.
Or try diskutil in Terminal (where diskX is the USB disk or SD card).

diskutil list /dev/diskX

You could for example (be careful) try plugging it in a Windows computer and resize the FAT partition and hopefully shift or resize the Ext partition (may not be needed if Apple Pi Baker is used to back it up after that and restore it with the exand option again - rather cumbersome of course). Or try GPartEd on a Linux machine (not you RPi).

Please let me know if this is not the case .... be happy to help and see where the culprit may be.


   
ReplyQuote
Share: