Skip to content

Commit 0a9202b

Browse files
tsoomepyhalov
authored andcommitted
create_root_pool: always create ESP
1 parent 6645f93 commit 0a9202b

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

usr/src/cmd/text-install/osol_install/text_install/ti_install.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ def create_root_pool(install_profile):
233233
as libict doesn't know how to handle compex pool types
234234
'''
235235
rootpool_name = install_profile.disks[0].get_install_root_pool()
236+
tgt_disk = install_profile.disks[0].to_tgt()
236237

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 ]
238242

239243
zpool_type = install_profile.zpool_type
240244
if zpool_type is None:
@@ -249,8 +253,18 @@ def create_root_pool(install_profile):
249253
for disk in install_profile.disks:
250254
cmd.append(disk.get_install_device())
251255

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+
254268
# Create boot/grub directory for holding menu.lst file
255269
exec_cmd(["/usr/bin/mkdir", "-p", "/%s/boot/grub" % (rootpool_name) ],
256270
"creating grub menu directory")

0 commit comments

Comments
 (0)