curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02726
[Merge] ~ogayot/curtin:filter-out-ventoy into curtin:master
Olivier Gayot has proposed merging ~ogayot/curtin:filter-out-ventoy into curtin:master.
Commit message:
storage: filter out ventoy image when building storage config
When ventoy is used, the filesystem mounted to /cdrom is not a /dev/sr0
device (major number 11) but a dm device named "ventoy". Add a check to
exclude it as well as real cdrom devices.
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~ogayot/curtin/+git/curtin/+merge/439863
storage: filter out ventoy image when building storage config
When ventoy is used, the filesystem mounted to /cdrom is not a /dev/sr0
device (major number 11) but a dm device named "ventoy". Add a check to
exclude it as well as real cdrom devices.
--
Your team curtin developers is requested to review the proposed merge of ~ogayot/curtin:filter-out-ventoy into curtin:master.
diff --git a/curtin/storage_config.py b/curtin/storage_config.py
index b1d48cb..2424004 100644
--- a/curtin/storage_config.py
+++ b/curtin/storage_config.py
@@ -1119,6 +1119,14 @@ class MountParser(ProbertParser):
# no floppy, no cdrom
if self.blockdev_data[source]['MAJOR'] in ["11", "2"]:
return {}
+ # When using ventoy, if any mount is found for /cdrom, it will not be a
+ # block device with major number 11 but a dev/mapper device named
+ # "ventoy".
+ # See https://bugs.launchpad.net/bugs/2012722
+ # TODO: ideally, we should not rely on the value of the DM_NAME
+ # attribute. Other image loading systems will have a different value.
+ if self.blockdev_data[source].get("DM_NAME") == "ventoy":
+ return {}
source_id = self.blockdev_to_id(self.blockdev_data[source])
return {'type': 'mount',
Follow ups