-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: correctly retrieve the last partition of the installation disk #36
Conversation
grepping /proc/partitions the way we're doing doesn't account for devices with more numbers according to our grep command. Devices like nvme0n1 would just return "0" as the last partition but that's wrong as what gets executed is: grep -c nvme0n1[0-9] /proc/partitions which just returns 0 but it's obviously not the last partition. Fix the above by using the sys filesystem as it provides better heiraical nature of paritions within a drive without accounting for its string format. Signed-off-by: Antonio Murdaca <[email protected]>
/test-9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I successfully tested the new logic for determining the last partition on a device with an NVMe drive (/sys/block/nvme0n1
) and a device with an SD card (/sys/block/mmcblk0
)
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM too 👍
LGTM 👍 |
tests are stuck because of the kernel bug for qemu, we're testing this manually |
The generated iso has been tested in Onlogic HX401 bare-metal device. After tweaking disk device name from /dev/vda /dev/nvme0n1 the root file system has grown to the proper size.
|
grepping /proc/partitions the way we're doing doesn't account for devices with more numbers according to our grep command. Devices like nvme0n1 would just return "0" as the last partition but that's wrong as what gets executed is:
grep -c nvme0n1[0-9] /proc/partitions
which just returns 0 but it's obviously not the last partition. Fix the above by using the sys filesystem as it provides better heiraical nature of paritions within a drive without accounting for its string format.