@@ -117,25 +117,29 @@ def create_systemd_boot_conf(install_path, efi_dir, uuid, entry, entry_name, ker
117117
118118 partitions = libcalamares .globalstorage .value ("partitions" )
119119 swap_uuid = ""
120+ swap_outer_mappername = None
120121
121122 cryptdevice_params = []
122123
123124 # Take over swap settings:
124125 # - unencrypted swap partition sets swap_uuid
125126 # - encrypted root sets cryptdevice_params
126127 for partition in partitions :
128+ if partition ["fs" ] == "linuxswap" and not partition .get ("claimed" , None ):
129+ continue
127130 has_luks = "luksMapperName" in partition
128131 if partition ["fs" ] == "linuxswap" and not has_luks :
129132 swap_uuid = partition ["uuid" ]
130133
134+ if (partition ["fs" ] == "linuxswap" and has_luks ):
135+ swap_outer_mappername = partition ["luksMapperName" ]
136+
131137 if partition ["mountPoint" ] == "/" and has_luks :
132138 cryptdevice_params = ["cryptdevice=UUID="
133139 + partition ["luksUuid" ]
134140 + ":"
135141 + partition ["luksMapperName" ],
136142 "root=/dev/mapper/"
137- + partition ["luksMapperName" ],
138- "resume=/dev/mapper/"
139143 + partition ["luksMapperName" ]]
140144
141145 if cryptdevice_params :
@@ -146,6 +150,10 @@ def create_systemd_boot_conf(install_path, efi_dir, uuid, entry, entry_name, ker
146150 if swap_uuid :
147151 kernel_params .append ("resume=UUID={!s}" .format (swap_uuid ))
148152
153+ if swap_outer_mappername :
154+ kernel_params .append ("resume=/dev/mapper/{!s}" .format (
155+ swap_outer_mappername ))
156+
149157 kernel_line = get_kernel_line (kernel_type )
150158 libcalamares .utils .debug ("Configure: \" {!s}\" " .format (kernel_line ))
151159
0 commit comments