rapha
July 15, 2021, 9:07am
1
Balena cli version: 12.44.24
Device type jetson-nano
- Nano SD-Card version
Balena OS
2.75.0+rev1
2.69.1+rev1
2.67.3+rev2
Manipulating the .img provided by the balena dashboard as such:
sudo balena config write --type jetson-nano --drive balena-cloud-staging-linux-armv8-l4t-t210-jetson-nano-2.75.0+rev1-dev-v12.5.10.img.zip os.udevRules.101 "ACTION==\"add\", SUBSYSTEMS==\"usb\", RUN+=\"/usr/sbin/nvpmodel -m 0\"" --debug
or
sudo balena config inject ./staging-linux-armv8-l4t-t210.config.json --drive ./balena-cloud-staging-linux-armv8-l4t-t210-jetson-nano-2.75.0+rev1-dev-v12.5.10.img.zip --type jetson-nano
Fail with:
Invalid MBR boot signature. Expected 0xAA55, but saw 0x501A
SyntaxError: Invalid MBR boot signature. Expected 0xAA55, but saw 0x501A
at Function.MBR.detectFormat (/snapshot/versioned-source/node_modules/mbr/lib/mbr.js:73:11)
at Function.MBR.parse (/snapshot/versioned-source/node_modules/mbr/lib/mbr.js:54:20)
at new MBR (/snapshot/versioned-source/node_modules/mbr/lib/mbr.js:12:16)
at getPartitionsFromMBRBuf (/snapshot/versioned-source/node_modules/partitioninfo/build/partitioninfo.js:36:12)
at getDiskPartitions (/snapshot/versioned-source/node_modules/partitioninfo/build/partitioninfo.js:88:24)
The expected MBR boot signature in the error stays the same across all Balena OS versions, but the found signature changes:
2.75.0+rev1: Expected 0xAA55, but saw 0x501A
2.69.1+rev1: Expected 0xAA55, but saw 0x66BC
2.67.3+rev2: Expected 0xAA55, but saw 0xDCC9
rapha
July 15, 2021, 11:59am
2
I just tried it with a jetson-tx2
device type as well, same issue.
rapha
July 15, 2021, 12:10pm
3
Ahh, this does not work on the .zip
files that one downloads from the Dashboard.
The solution is to unzip
the image first.
Would be great to either support a .zip
or get a nicer error message. @pdcastro
Thanks for the suggestion! As part of this PR we added an additional warning if a zip file is detected by balena preload: preload: Catch sfdisk errors that result in an endless spinner by klutchell · Pull Request #2283 · balena-io/balena-cli · GitHub
I guess we should do the same for balena config inject/write! I’ve opened this issue for tracking and we can notify you on this thread when a fix is released!
opened 08:04PM - 15 Jul 21 UTC
# Expected Behavior
Attempting to perform image config commands when provided… a zip file should present a helpful warning.
- `balena config write`
- `balena config inject`
- ...
# Actual Behavior
Attempting to perform image config commands when provided a zip file results in confusing errors:
```
Invalid MBR boot signature. Expected 0xAA55, but saw 0x501A
SyntaxError: Invalid MBR boot signature. Expected 0xAA55, but saw 0x501A
```
## Examples
```
sudo balena config write --type jetson-nano --drive balena-cloud-staging-linux-armv8-l4t-t210-jetson-nano-2.75.0+rev1-dev-v12.5.10.img.zip os.udevRules.101 "ACTION==\"add\", SUBSYSTEMS==\"usb\", RUN+=\"/usr/sbin/nvpmodel -m 0\"" --debug
```
```
sudo balena config inject ./staging-linux-armv8-l4t-t210.config.json --drive ./balena-cloud-staging-linux-armv8-l4t-t210-jetson-nano-2.75.0+rev1-dev-v12.5.10.img.zip --type jetson-nano
```
# Steps to Reproduce the Problem
This is the most important and helpful part of a bug report. If we cannot reproduce the
problem, it is difficult to tell what the fix should be, or whether code changes have
fixed it.
1.
2.
3.
# Specifications
- **balena CLI version:** 12.44.24
- **Cloud backend: balenaCloud
- **Operating system version:**
- **32/64 bit OS and processor:**
- **Install method:**
- **If npm install, Node.js and npm version:**
# Additional References
If applicable, please add additional links to GitHub projects, forums.balena.io threads,
gist.github.com, Google Drive attachments, etc.
1 Like