-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] grub: workaround for OTA failure/otaclient crashing if rootfs i…
…s not sda (#258) This PR applies a workaround to deal with otaclient crashing and OTA failed when rootfs device is not assigned name as sda. With this PR, the slot naming is decoupled with the actual device name, the slot name will be fixed to sda<partition_id>, and otaclient will search for ota-partition folder with the slot name. With workaround implemented this PR, OTA will work if no matter when the rootfs device's name changed and what name is assigned to rootfs device. IMPORTANT: this is only a workaround fix, intended for swift issue overcoming and backward compatibility, a fundamental fix with new mechanism proposed is still required! Behavior before fix: 1. otaclient will crash during OTA finalizing switching boot if ota-partition folders other than ota-partition.sda* presented, 2. OTA will fail if rootfs device's name changed before and after OTA reboot, 3. OTA status will be lost if rootfs device's name changed, corresponding extra ota-partition folders will be created unexpectedly(i.e., ota-partition.sdb*, ota-partition.nvme0n1p*, etc). Behaivor after fix: 1. slot naming is fixed to "sda<partition_id>", 2. OTA will work and otaclient will not crash even if rootfs device's name changed at any time, otaclient will always locate the correct ota-partition folder.
- Loading branch information
1 parent
1403768
commit c000645
Showing
5 changed files
with
74 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIB6zCCAZCgAwIBAgIUWO/ANSZ6jsn+aIK9RQDgniCR92gwCgYIKoZIzj0EAwIw | ||
MIIB6jCCAZCgAwIBAgIUclYCFrRLcGCulcyR1uc8oA7t8vYwCgYIKoZIzj0EAwIw | ||
RTELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMQ4wDAYDVQQKDAVUaWVyNDE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vWqS/Hhk5+tV7+AI= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIB3zCCAYWgAwIBAgIUVcCyMLO2J6JKxw8Ye4cn21ty8XUwCgYIKoZIzj0EAwIw | ||
MIIB3jCCAYWgAwIBAgIUGYEMZsuwqHrRhrLot++BqE+xbQ4wCgYIKoZIzj0EAwIw | ||
RTELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMQ4wDAYDVQQKDAVUaWVyNDEW | ||
MBQGA1UEAwwNcm9vdC50aWVyNC5qcDAeFw0yMjEwMDMwNDE5MDNaFw0zMjEwMDUw | ||
NDE5MDNaMEUxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIDAVUb2t5bzEOMAwGA1UECgwF | ||
MBQGA1UEAwwNcm9vdC50aWVyNC5qcDAeFw0yMzEwMjcwNjU2MjdaFw0zMzEwMjkw | ||
NjU2MjdaMEUxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIDAVUb2t5bzEOMAwGA1UECgwF | ||
VGllcjQxFjAUBgNVBAMMDXJvb3QudGllcjQuanAwWTATBgcqhkjOPQIBBggqhkjO | ||
PQMBBwNCAARH1pYCjqPrXGGVIsMWIXvRIZfNCSH07X1iPn3lyNq7kIN4bJFiHdMi | ||
LxxOh94uvhh7psYcrDizFi/l3SsLihbxo1MwUTAdBgNVHQ4EFgQU1CD4lyyBeG/9 | ||
+h4LuEvylLAY4RgwHwYDVR0jBBgwFoAU1CD4lyyBeG/9+h4LuEvylLAY4RgwDwYD | ||
VR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNIADBFAiEAhJLAk9SRQ2Q61m9e2VoM | ||
m86odWMLRv+EKbpWebe4WTwCICnch1agvDomA7PMbkPvg0kz/jot2YoN3xZ24O6G | ||
zjmb | ||
PQMBBwNCAAR6Fa70+SJgvwq0adME6CAqq4VwNeJhAUxUdgz9QS+DpI7LcdMS6cmq | ||
3EqA2vJ5Z9jpVAOUuJ2kXqrtalhN69bCo1MwUTAdBgNVHQ4EFgQUUrXnsaXy3pRW | ||
OqD0C9XVxysufpEwHwYDVR0jBBgwFoAUUrXnsaXy3pRWOqD0C9XVxysufpEwDwYD | ||
VR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNHADBEAiACPOdQ/zjz+tokGgb6APQp | ||
ptM9N5JXgHTYTFBBpT72cAIgIWCnbPU68z6YiI4A1JqMzO4mUfnSP+5ssWTHLC2O | ||
Bfg= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIBjjCCATMCFAgcTp8kYozCqL4Aib6cooc5o2tnMAoGCCqGSM49BAMCME0xCzAJ | ||
MIIBjTCCATMCFG4r2lF/oNv7Ew2T7XDbfuQEuOW3MAoGCCqGSM49BAMCME0xCzAJ | ||
BgNVBAYTAkpQMQ4wDAYDVQQIDAVUb2t5bzEOMAwGA1UECgwFVGllcjQxHjAcBgNV | ||
BAMMFWludGVybWVkaWF0ZS50aWVyNC5qcDAeFw0yMjEwMDMwNDE5MDNaFw0yMzEw | ||
MDMwNDE5MDNaMEUxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIDAVUb2t5bzEOMAwGA1UE | ||
BAMMFWludGVybWVkaWF0ZS50aWVyNC5qcDAeFw0yMzEwMjcwNjU2MjdaFw0yNDEw | ||
MjYwNjU2MjdaMEUxCzAJBgNVBAYTAkpQMQ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