Skip to content

fix exiting loop early if /sys/block/${dev}/ has boot section#116

Open
ngicks wants to merge 1 commit intotruenas:masterfrom
ngicks:fix-early-loop-exit
Open

fix exiting loop early if /sys/block/${dev}/ has boot section#116
ngicks wants to merge 1 commit intotruenas:masterfrom
ngicks:fix-early-loop-exit

Conversation

@ngicks
Copy link

@ngicks ngicks commented Oct 8, 2025

I was trying to install the truenas on mmcblk0.
It fails for Failed to find partition number 2 on mmcblk0.

I noticed that /sys/block/mmcblk0 has mmcblk0boot0 and mmcblk0boot1 in there.
The script was trying to read /sys/block/mmcblk0/mmcblk0boot0/partition and /sys/block/mmcblk0/mmcblk0boot1/partition (if I remember correctly. I was playing around truenas as work and this is my free time OSS contribution) which are nonexistent. That was causing early loop exit.

I applied this fix by manually editing the script in bootable USB's overlay fs.
And it worked for me and now I think I need to let everyone know about this.

@ngicks ngicks changed the title fix exiting loop early if block dev has boot partition fix exiting loop early if /sys/block/${dev}/ has boot section Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant