SSHRD_Script icon indicating copy to clipboard operation
SSHRD_Script copied to clipboard

hdiutil: resize: failed. Invalid argument (22)

Open chrisspankroy opened this issue 3 years ago • 11 comments

My machine is now running macOS Ventura, but I could also reproduce the issue on Monterey.

Steps to reproduce:

  1. Clone the repo
  2. Run ./sshrd.sh 16.1

The script will fail with an error hdiutil: resize: failed. Invalid argument (22)

This appears to be caused by this line in sshrd.sh:

hdiutil resize -size 210MB work/ramdisk.dmg

The README says that we can't resize the APFS DMGs on Linux machines, but it should work on macOS?

chrisspankroy avatar Nov 09 '22 17:11 chrisspankroy

yes, i dont think apfs dmgs can be resized, umount /tmp/SSHRD then comment out that resize line and it should work

verygenericname avatar Nov 09 '22 17:11 verygenericname

hm I get a bunch of No space left on device errors when it tries to copy files into that DMG, I'm guessing because we just commented out the line that makes it big enough to contain those files.

Could we make a new (bigger) APFS DMG and copy everything into that and just use that?

chrisspankroy avatar Nov 09 '22 18:11 chrisspankroy

Not sure how to resize an apfs dmg

verygenericname avatar Nov 09 '22 18:11 verygenericname

I opened #118 to fix this issue, but I can't actually get this project to boot on 16.1 to verify it works.

The screen lights up for a second and then shuts off. Does this project work on iOS 16.1 or does it still need other fixes?

chrisspankroy avatar Nov 09 '22 20:11 chrisspankroy

Looking further at my boot issues, it looks like I can send the iBSS and iBEC normally (the screen is lit up) but the screen turns off as soon as I send irecovery -c go and the device goes to recovery mode.

What normally happens when irecovery -c go is run? Is the device supposed to go to recovery mode?

chrisspankroy avatar Nov 09 '22 20:11 chrisspankroy

Ok I can confirm that #118 does work and closes this issue.

My issues with booting were resolved by using a newer version of irecovery

chrisspankroy avatar Nov 09 '22 22:11 chrisspankroy

Please don't double-post the same issue. The PR is the appropriate place to help you since that's what you're having an issue with. This issue is unrelated to your issue.

chrisspankroy avatar Nov 10 '22 16:11 chrisspankroy

My machine is now running macOS Ventura, but I could also reproduce the issue on Monterey.

Steps to reproduce:

  1. Clone the repo

  2. Run ./sshrd.sh 16.1

The script will fail with an error hdiutil: resize: failed. Invalid argument (22)

This appears to be caused by this line in sshrd.sh:

hdiutil resize -size 210MB work/ramdisk.dmg

The README says that we can't resize the APFS DMGs on Linux machines, but it should work on macOS?

I have comment 235 line same error While running command diskutil apfs resizeContainer $ourmountpoint 210m

My os is bigsur v11.6.6

Error: image

Heres the output of diskutil list image

ranzhie07 avatar Nov 11 '22 16:11 ranzhie07

Please don't double-post the same issue. The PR is the appropriate place to help you since that's what you're having an issue with. This issue is unrelated to your issue.

You have solution on problem in workaround?

ranzhie07 avatar Nov 13 '22 15:11 ranzhie07

same here, ideas? thx image

iam-theKid avatar Nov 30 '22 11:11 iam-theKid

name: Bug Report description: File a bug report title: "[Bug]: " labels: ["bug", "triage"] assignees:

  • octocat body:
  • type: markdown attributes: value: | Thanks for taking the time to fill out this bug report!
  • type: input id: contact attributes: label: Contact Details description: How can we get in touch with you if we need more info? placeholder: ex. [email protected] validations: required: false
  • type: textarea id: what-happened attributes: label: What happened? description: Also tell us, what did you expect to happen? placeholder: Tell us what you see! value: "A bug happened!" validations: required: true
  • type: dropdown id: version attributes: label: Version description: What version of our software are you running? options: - 1.0.2 (Default) - 1.0.3 (Edge) validations: required: true
  • type: dropdown id: browsers attributes: label: What browsers are you seeing the problem on? multiple: true options: - Firefox - Chrome - Safari - Microsoft Edge
  • type: textarea id: logs attributes: label: Relevant log output description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell
  • type: checkboxes id: terms attributes: label: Code of Conduct description: By submitting this issue, you agree to follow our Code of Conduct options: - label: I agree to follow this project's Code of Conduct required: true

naiff654321 avatar Mar 14 '23 23:03 naiff654321