ipsw icon indicating copy to clipboard operation
ipsw copied to clipboard

"cross-device link" when extracting file with `ipsw ota` to an external hard drive

Open zhuowei opened this issue 2 years ago • 8 comments

To reproduce:

  • find an ota file (I'm using macOS 11.6.6's full installer)
  • cd /Volumes/ExternalDrive
  • ipsw ota /Volumes/Shared\ Support/com_apple_MobileAsset_MacSoftwareUpdate/2dfb5a64fe5668616d4bd0c308ed57cd642dc52f.zip "System/Library/Kernels/kernel"

Expected: System/Library/Kernels/kernel from the zip is extracted to the current folder

Actual: I get an error: failed to read files in tmp folder: failed to mv file /System/Library/Kernels/kernel to 20G624__MacBookAir10,1_MacBookPro17,1_Macmini9,1_iMac21,1_2/kernel: rename /var/folders/8l/jf7z1_kj37nbx3765k2m8xwr0000gn/T/ota_payload.0143036435530/System/Library/Kernels/kernel 20G624__MacBookAir10,1_MacBookPro17,1_Macmini9,1_iMac21,1_2/kernel: cross-device link

zhuowei avatar May 17 '22 04:05 zhuowei

Hello my friend! Thank you for letting me know, in the mean time can you also try:

ipsw extract -k /Volumes/Shared\ Support/com_apple_MobileAsset_MacSoftwareUpdate/2dfb5a64fe5668616d4bd0c308ed57cd642dc52f.zip

Also are you able to write to tmp on that machine? I believe I use it as a staging area, but will double check.

blacktop avatar May 17 '22 05:05 blacktop

It looks like Golang might have an issue with the os.Rename cmd inside Docker?? - https://gist.github.com/var23rav/23ae5d0d4d830aff886c3c970b8f6c6b

blacktop avatar May 17 '22 05:05 blacktop

Are you running it via the Docker image?

blacktop avatar May 17 '22 05:05 blacktop

No: this is ipsw_3.1.102_macOS_x86_64.tar.gz on macOS 12.4 (Intel); both internal and external drives are APFS. I can write to /tmp, but /tmp is on the internal SSD of this machine; my working directory is an external hard drive - I think that's what it means by "cross-device link"?

zhuowei avatar May 17 '22 05:05 zhuowei

Did the ipsw extract -k cmd work?

blacktop avatar May 17 '22 05:05 blacktop

I assume I lost you now 😞

blacktop avatar Jun 30 '22 06:06 blacktop

(sorry - I haven't tried this again since I just ended up moving the ipsw into my internal drive; will try it next time I need to extract an ipsw)

zhuowei avatar Jun 30 '22 06:06 zhuowei

Sounds good! Congratz on the new blog!

just putting some links here for reference in the future.

  • https://groups.google.com/g/golang-dev/c/5w7Jmg_iCJQ
  • https://gist.github.com/var23rav/23ae5d0d4d830aff886c3c970b8f6c6b

blacktop avatar Jul 03 '22 09:07 blacktop