Public bug reported:

Long story short, trying to install 19.10 with ZFS root and it keeps
failing saying that /target is unavailable. I figured out the real
problem under it all was that it was getting an error when running:

/usr/share/ubiquity/zsys-setup init

When that ran it end of the relevant log was:

+ format_disk /dev/sda 2 6 7 4
+ disk=/dev/sda
+ partgrub=2
+ partbpool=6
+ partrpool=7
+ ss=4
+ partswap=5
+ partext=3
+ sfdiskopts=
+ partprefix=/dev/sda
+ echo I: Formatting disk /dev/sda with partitions grub:2 ext:3 bpool:6 rpool:7
I: Formatting disk /dev/sda with partitions grub:2 ext:3 bpool:6 rpool:7
+ [ false = true ]
+ sfdisk -l /dev/sda
+ grep ^/dev/sda2
+ awk {print $2}
+ start=4096
+ cat
+ cat /tmp/sfdisk.cfg
+ sfdisk /dev/sda
Checking that no-one is using this disk right now ... OK

Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 73EEC891-81A8-419C-B45B-E0C3460933F1

Old situation:

Device     Start         End     Sectors  Size Type
/dev/sda1   2048        4095        2048    1M BIOS boot
/dev/sda2   4096 15628052479 15628048384  7.3T Linux filesystem

>>> Created a new GPT disklabel (GUID: A74BE178-9C6E-7D48-AB35-B50BA323BB9A).
/dev/sda1: Created a new partition 2 of type 'VMware Virsto' and of size 50 MiB.
Partition #2 contains a ext4 signature.
/dev/sda3: Created a new partition 3 of type 'Sony boot partition' and of size 
7.3 TiB.
/dev/sda4: Created a new partition 5 of type 'VMware Virtual SAN' and of size 
512 B.
/dev/sda6: Failed to add #6 partition: Invalid argument
Leaving.

If you look into the zsys-setup source you'll notice that there are two
possible configs that can be passed into sfdisk. One is chosen if there
is EFI detected and the other if not. My machine doesn't have EFI
enabled, but the disk is GPT, so it needs that configuration for the
drive. I believe, and I'm no drive expert, that you need to look for the
label type to make this determination.

For me the output of: sfdisk -d /dev/sda includes a "label: gpt" which I
believe can be used to determine which disk format config should be
used.

** Affects: ubiquity (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1858065

Title:
  zsys-setup is detecting drive format typing using EFI availability

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1858065/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to