@@ -63,6 +63,8 @@ def _process_mounts_multi(self, mount_name: str, mount_config) -> None:
6363 if 'ugrd.fs.btrfs' not in self ['modules' ]:
6464 self .logger .info ("Auto-enabling btrfs module" )
6565 self ['modules' ] = 'ugrd.fs.btrfs'
66+ else :
67+ self .logger .debug ("Unknown mount type: %s" % mount_type )
6668
6769 self ['mounts' ][mount_name ] = mount_config
6870 self .logger .debug ("[%s] Added mount: %s" % (mount_name , mount_config ))
@@ -165,21 +167,25 @@ def autodetect_root(self) -> None:
165167 self .logger .debug ("Detected root mount info: %s" % root_mount_info )
166168
167169 mount_data = root_mount_info .partition (':' )[2 ].strip ().split (' ' )
168- root_dict = {key : value for key , value in (entry .split ('=' ) for entry in mount_data )}
170+ root_dict = {key : value .strip ('"' ) for key , value in (entry .split ('=' ) for entry in mount_data )}
171+
172+ mount_info = {'root' : {'type' : 'auto' , 'base_mount' : False }}
169173
170174 if mount_type := root_dict .get ('TYPE' ):
171175 self .logger .info ("Autodetected root type: %s" % mount_type )
172- self [ 'mounts' ] ['root' ]['type' ] = mount_type .lower ()
176+ mount_info ['root' ]['type' ] = mount_type .lower ()
173177
174178 if label := root_dict .get ('LABEL' ):
175179 self .logger .info ("Autodetected root label: %s" % label )
176- self [ 'mounts' ] ['root' ]['source' ] = {'label' : label }
180+ mount_info ['root' ]['source' ] = {'label' : label }
177181 elif uuid := root_dict .get ('UUID' ):
178182 self .logger .info ("Autodetected root uuid: %s" % uuid )
179- self [ 'mounts' ] ['root' ]['source' ] = {'uuid' : uuid }
183+ mount_info ['root' ]['source' ] = {'uuid' : uuid }
180184 else :
181185 raise ValueError ("Failed to autodetect root mount source." )
182186
187+ self ['mounts' ] = mount_info
188+
183189
184190def mount_base (self ) -> list [str ]:
185191 """ Generates mount commands for the base mounts. """
0 commit comments