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: <https://bugs.dragonflybsd.org/issues/2264>
Reported-by: ftigeot
format_slice(struct i_fn_args *a)
{
struct commands *cmds;
+ struct command *cmd;
int result;
int cyl, hd, sec;
/*
* 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