Fix "resizing" wrong partition when having two disks #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I discovered that the
postBootCommands
script didn't work under certain circumstances. I created an image with the following filesystem setup:On the Pi I use a dual NVME HAT. One disk was flashed with the disk image and the other disk was previously prepared with an ext4 FS and labeled with
FOO_BAR
.After booting the Pi I checked the devices with
lsblk
and found out that the disk I flashed with the created image wasnvme1n1
instead ofnvme0n1
and the additional disk wasnvme0n1
.lsblk
output was something like this (from memory):The
postBootCommands
script created partition 4 (and 3) because it takesMAJ:MIN
column to determine partition number, which is 4 in this case, but should be 2.This happens when another disk is indexed before the flashed one.
After changing the script by using
PARTN
column oflsblk
output, it looks as expected: