-
Notifications
You must be signed in to change notification settings - Fork 109
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
hfsplusclone.c: HFS_Plus incorrect signature 'Partclone fail, please check partclone.log !
#250
Comments
Hi, Thank you for this report. I tried to reproduce this issue but not successfully. I created a USB disk using Mac OS (disk utility) and ran clean, remove, and format a new empty USB key. Partclone does not have the error message from my Linux machine.
and I can't run partclone.hfsp outside the docker image due to different GLIBC. My partition_signature is similar:
As you mentioned we have the same HFS_Signature(0x482b), so I guess we can do some tests:
I made a static partclone.hfsp, and please try again and check /var/log/partclone.log. download link: https://file.io/1zqKPM48Mfds wget https://file.io/1zqKPM48Mfds -o partclone.hfsp sha256sum ./src/partclone.hfsp check the log file and grep 'HFS_Plus signature'
Please kindly share your test, thank you. |
I tried your command, but it does not work: $ docker run -it -v "`pwd`:`pwd`" --privileged=true --device=/dev/sda1 tlinux/partclone partclone.hfsp -d -c -s /dev/sda1 --overwrite "`pwd`/dhfsp.img"
Partclone v0.3.31 http://partclone.org
Starting to clone device (/dev/sda1) to image (/home/stdedos/Documents/WorkBulk/dhfsp.img)
Reading Super Block
hfsplusclone.c: HFS_Plus Volume '/dev/sda1' is scheduled for a check or it was shutdown
uncleanly. Please fix it by fsck.
Partclone fail, please check /var/log/partclone.log !
$ docker run -it -v "`pwd`:`pwd`" --privileged=true --device=/dev/sda1 tlinux/partclone bash
root@b42d9df5a934:/partclone/tests# fsck /dev/sda1
fsck from util-linux 2.39.3
** /dev/sda1
Executing fsck_hfs (version 540.1-Linux).
** Checking Journaled HFS Plus volume.
The volume name is Install macOS Sierra
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Install macOS Sierra appears to be OK.
root@b42d9df5a934:/partclone/tests# fsck /dev/sda
fsck from util-linux 2.39.3
e2fsck 1.47.0 (5-Feb-2023)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Found a dos partition table in /dev/sda ( Here's the signature: partition_signature.tar.gz Downloading the file failed. Would you mind pushing a branch? I'll rebuild locally instead ... I know a filesystem is a filesystem, but could you please try to create a recovery USB instead? https://support.apple.com/en-us/101578#create |
Hi, Please follow this to run fsck to check and repair macOS disks. or you want to work with linux docker, please replace as fsck.hfsplus, because the default fsck is for Linux extended file system eg: ext4, so my example:
|
I am pretty sure that root@b42d9df5a934:/partclone/tests# fsck.hfsplus /dev/sda1
** /dev/sda1
Executing fsck_hfs (version 540.1-Linux).
** Checking Journaled HFS Plus volume.
The volume name is Install macOS Sierra
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Install macOS Sierra appears to be OK.
root@b42d9df5a934:/partclone/tests# fsck.hfsplus -f /dev/sda1
** /dev/sda1
Executing fsck_hfs (version 540.1-Linux).
** Checking Journaled HFS Plus volume.
The volume name is Install macOS Sierra
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Install macOS Sierra appears to be OK.
I don't have "regular" macOS access - so I cannot check it via the OS. ... but I'd like to keep the disk image handy "just in case", so if need be, I don't have to spend a week+ to re-create it. |
Great! The fsck.hfsplus works well and should be ready to backup. I downloaded your partition_signature.bin file and tried to initial the clone. I have a similar error message:
Now, your partition is clean so we can ignore that and go back to do Signature test. I updated the code to the master branch, you can clone/rebuild. Could you please dump super block and then run partclone.hfsplus again? |
I will give it a try later. |
I'm surprised how just d6f993b could "fix everything" 😕 It seems that it will work in the end:
Theoretically, the docker image is "latest": root@b42d9df5a934:/partclone-clone# ../partclone/src/partclone.hfsp -v
Partclone : v0.3.31 (0.3.31) |
From your experienced position, should I be able to re-format the flash drive with the |
I have no idea about 'bootable recovery drive' but you can try using this image to create another one. Partclone is tool for imaging individual partitions (like sda1), NOT disk(sda), so normally, the disk related partition table and MBR is missing. Of course you can re-run createinstallmedia then restore data from your partclone image. If you're concerned about handling special cases, using dd or Clonezilla(default with partclone) might be a better option. |
The recovery drive from mac not works for me. I am not familar with mac os. let me give up.
any partclone issue is welcome. |
I cannot 😅 Apple, in its infinite wisdom, has "things" not be "backwards compatible" with themselves. So I cannot use a "nowadays" Mac to burn a Sierra - regardless if my laptop supports only that.
I thought about it. But my flash drive is 128GB 😱 I don't want to store a 128GB img "just in case" I need that again. |
I have some "obvious" expected issues at recovery:
I still have my source intact, so I can retry stuff. However, unless necessary, I'd like to treat it as RO (until I can have a working backup). Do you think there is something I could reasonably do here? |
On a tangent, do you expect that # partclone.hfsp -d -r -s macOSSierraInstallUSB.partclone.img -o /dev/sdb1 -C
Partclone v0.3.31 http://partclone.org
Starting to restore image (macOSSierraInstallUSB.partclone.img) to device (/dev/sdb1)
Reading Super Block
Calculating bitmap... Please wait...
done!
File system: HFS Plus
Device size: 124.9 GB = 30504704 Blocks
Space in use: 5.3 GB = 1286985 Blocks
Free Space: 119.7 GB = 29217719 Blocks
Block size: 4096 Byte
^C^Csed: 00:00:12, Remaining: 00:00:16, Completed: 41.77%, 11.01GB/min,
Current block: 1653748, Total block: 30504704, Complete: 5.42%
^\^C^C^C^C^C^\^\^\^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^C^C^C |
The first restore to sdb1 is failed.
to prevent this, preparing a large disk or partition is necessary. The alternative is to resize your partition before backup. The option '-C' is not for this case, it's only for some dangerous test. |
"I didn't create the partition", and I guess the OS decided to take the full size of that USB 😕 I thought that, since the file was I tried to check if I could do some ... good news for me is, Yes, it causes errors at the end of the restoration, and while 5% finishes in seconds, ~93.86% takes much more time, and it fails:
But the USB works (after some manual, intelligent I guess I can now try to resize the source, and re-image my source |
It seems to be impossible to do: https://superuser.com/a/412685/533196
So I guess I will live with that limitation. I have already spent ... about the same time to create that flash drive, as I have spent "backing it up" 😓 Thank you for your time and effort Thomas 🙃 |
I have used
docker run -it tlinux/partclone
to subsequently buildpartclone
, like so:Then, I extracted the resulting
docker cp a2f52e88be97:/partclone/src/partclone.hfsp .
, and used it like so:Which I don't believe to be accurate.
I have verified the partition signature to be correct:
i.e.:
partclone/src/hfsplusclone.h
Lines 69 to 73 in f5dbe57
Given how the error message appears, and the code
partclone/src/hfsplusclone.c
Lines 141 to 144 in f5dbe57
I'd say that it falls into "those places" that are full of zeroes?
In either way, I don't think that the
%c
is a "safe" way to dump what the software is seeing.... also, I have successfully used the drive to re-install a Sierra. So it must be a valid device/partition.
My end purpose is to store that Bootable USB somewhere, so "if it ever becomes a problem", I won't need to spend yet-another-week of hacking around, trying to re-create it. I hope the command above is correct.
Otherwise, please suggest what I should do 🙏
The text was updated successfully, but these errors were encountered: