tar can't create hardlink
filip.banak.62 at gmail.com
Tue Feb 16 17:59:41 UTC 2021
When I tar x -vf (using latest busybox on linux 1.32.1):
tar: can't create hardlink
The archive was created form a folder structure that looks like this (with
more files, but not related to the issue):
drwxrwxrwx root/root 0 2011-07-05 19:30:16
-rwxrwxrwx root/root 35724 2016-05-25 23:29:04
-rwxrwxrwx root/root 0 2016-05-25 23:29:04
Now, as far as I know, one can't have a hardlink with the same name as an
existing file in the same directory,
but my folder in my android device apparently overcame this issue somehow
as you can see, the files are by the OEM not me.
So there is actually just one real file in the archive.
But not only does tar fail and stop, it also deletes the real mcfg_sw.mbn
file, so after it fails the
GNU tar extracts the real file without an error, ignores the weird hardlink
and continues, so all the files are successfully
extracted, except the weird hardlinks, but it doesn't fail.
I wish that busybox tar would behave just like GNU tar in this case.
The consequence of this behavior is that in TWRP android recovery,
which makes use of busybox tar to extract backups so that they can be
it fails to recover the files from the archive therefore not completing the
I know this is weird but as you can see things like this happen.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the busybox