From a096577d7d6db4aaa199cf083e70a11e7c496267 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 13 Aug 2012 20:42:13 +0200 Subject: [PATCH] installer: When setting the slice type for >2TB, ignore fdisk warnings. With disks >2TB this step will lead to some whining from fdisk(8), but since we'll boot anyway (with 34ea800d, we resort to the media size when a maxed out slice size is detected), just ignore any issues which fdisk(8) reports in this case. After this commit, installing and booting from that installation on a disk which is >2TB will work (tested with a 3TB ahci attached drive as well as with a 4.5TB hptrr(4) RAID). Dragonfly-bug: Reported-by: ftigeot --- usr.sbin/installer/dfuibe_installer/fn_disk.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/usr.sbin/installer/dfuibe_installer/fn_disk.c b/usr.sbin/installer/dfuibe_installer/fn_disk.c index bed0d03..c56c7f3 100644 --- a/usr.sbin/installer/dfuibe_installer/fn_disk.c +++ b/usr.sbin/installer/dfuibe_installer/fn_disk.c @@ -587,6 +587,7 @@ int format_slice(struct i_fn_args *a) { struct commands *cmds; + struct command *cmd; int result; int cyl, hd, sec; @@ -627,9 +628,11 @@ format_slice(struct i_fn_args *a) /* * Execute the fdisk script. */ - command_add(cmds, "%s%s -v -f %snew.fdisk %s", + cmd = command_add(cmds, "%s%s -v -f %snew.fdisk %s", a->os_root, cmd_name(a, "FDISK"), a->tmp, disk_get_device_name(storage_get_selected_disk(a->s))); + if (slice_get_size(storage_get_selected_slice(a->s)) == 0xFFFFFFFFU) + command_set_failure_mode(cmd, COMMAND_FAILURE_IGNORE); /* * If there is an old 'virgin' disklabel hanging around -- 1.7.7.2