@@ -233,8 +233,12 @@ def create_root_pool(install_profile):
233
233
as libict doesn't know how to handle compex pool types
234
234
'''
235
235
rootpool_name = install_profile .disks [0 ].get_install_root_pool ()
236
+ tgt_disk = install_profile .disks [0 ].to_tgt ()
236
237
237
- cmd = [ "/usr/sbin/zpool" , "create" , "-f" , rootpool_name ]
238
+ if tgt_disk .use_whole :
239
+ cmd = [ "/usr/sbin/zpool" , "create" , "-Bf" , rootpool_name ]
240
+ else :
241
+ cmd = [ "/usr/sbin/zpool" , "create" , "-f" , rootpool_name ]
238
242
239
243
zpool_type = install_profile .zpool_type
240
244
if zpool_type is None :
@@ -249,8 +253,18 @@ def create_root_pool(install_profile):
249
253
for disk in install_profile .disks :
250
254
cmd .append (disk .get_install_device ())
251
255
252
- exec_cmd ( cmd ,
253
- "creating root pool" )
256
+ exec_cmd (cmd , "creating root pool" )
257
+
258
+ # Clear ESP to be sure we do not have pool label there
259
+ if tgt_disk .use_whole :
260
+ for disk in install_profile .disks :
261
+ name = disk .get_install_device () + "s0"
262
+ try :
263
+ exec_cmd ([ "/usr/sbin/zpool" , "labelclear" , "-f" , name ],
264
+ "clearing zpool label on " + name )
265
+ except ti_utils .InstallationError :
266
+ pass
267
+
254
268
# Create boot/grub directory for holding menu.lst file
255
269
exec_cmd (["/usr/bin/mkdir" , "-p" , "/%s/boot/grub" % (rootpool_name ) ],
256
270
"creating grub menu directory" )
0 commit comments