[2.5] Failed to deploy ppc64el when partition table is GPT

Bug #1800153 reported by Andres Rodriguez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Unassigned
grub2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

  Logs Events Configuration
Installation output
curtin: Installation started. (18.1-17-gae48e86f-0ubuntu1~18.04.1)
third party drivers not installed or necessary.
Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [83.2 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/universe ppc64el Packages [8260 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse ppc64el Packages [133 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el Packages [345 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe ppc64el Packages [481 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse ppc64el Packages [1668 B]
Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe ppc64el Packages [2844 B]
Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/main ppc64el Packages [137 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe ppc64el Packages [82.7 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse ppc64el Packages [640 B]
Fetched 9690 kB in 2s (4034 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  crda grub-common grub-ieee1275 grub-ieee1275-bin grub2-common iw libnl-3-200
  libnl-genl-3-200 linux-firmware linux-headers-4.15.0-38
  linux-headers-4.15.0-38-generic linux-headers-generic
  linux-image-4.15.0-38-generic linux-image-generic
  linux-modules-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic
  os-prober wireless-regdb
Suggested packages:
  multiboot-doc xorriso desktop-base genisoimage fdutils linux-doc-4.15.0
  | linux-source-4.15.0 linux-tools
The following NEW packages will be installed:
  crda grub-common grub-ieee1275 grub-ieee1275-bin grub2-common iw libnl-3-200
  libnl-genl-3-200 linux-firmware linux-generic linux-headers-4.15.0-38
  linux-headers-4.15.0-38-generic linux-headers-generic
  linux-image-4.15.0-38-generic linux-image-generic
  linux-modules-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic
  os-prober wireless-regdb
0 upgraded, 19 newly installed, 0 to remove and 5 not upgraded.
Need to get 130 MB of archives.
After this operation, 673 MB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el libnl-3-200 ppc64el 3.2.29-0ubuntu3 [48.8 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el libnl-genl-3-200 ppc64el 3.2.29-0ubuntu3 [10.8 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el wireless-regdb all 2018.05.09-0ubuntu1~18.04.1 [11.1 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el iw ppc64el 4.14-0.1 [89.1 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el crda ppc64el 3.18-1build1 [63.9 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub-common ppc64el 2.02-2ubuntu8.7 [1632 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub2-common ppc64el 2.02-2ubuntu8.7 [516 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-firmware all 1.173.1 [64.6 MB]
Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-modules-4.15.0-38-generic ppc64el 4.15.0-38.41 [12.5 MB]
Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-image-4.15.0-38-generic ppc64el 4.15.0-38.41 [6073 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-modules-extra-4.15.0-38-generic ppc64el 4.15.0-38.41 [31.4 MB]
Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-image-generic ppc64el 4.15.0.38.40 [2360 B]
Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-headers-4.15.0-38 all 4.15.0-38.41 [11.0 MB]
Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-headers-4.15.0-38-generic ppc64el 4.15.0-38.41 [1017 kB]
Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-headers-generic ppc64el 4.15.0.38.40 [2344 B]
Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-generic ppc64el 4.15.0.38.40 [1868 B]
Get:17 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el os-prober ppc64el 1.74ubuntu1 [16.1 kB]
Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub-ieee1275-bin ppc64el 2.02-2ubuntu8.7 [531 kB]
Get:19 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub-ieee1275 ppc64el 2.02-2ubuntu8.7 [47.0 kB]
Preconfiguring packages ...
Fetched 130 MB in 2s (73.2 MB/s)
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
Selecting previously unselected package libnl-3-200:ppc64el.
(Reading database ... 28516 files and directories currently installed.)
Preparing to unpack .../00-libnl-3-200_3.2.29-0ubuntu3_ppc64el.deb ...
Unpacking libnl-3-200:ppc64el (3.2.29-0ubuntu3) ...
Selecting previously unselected package libnl-genl-3-200:ppc64el.
Preparing to unpack .../01-libnl-genl-3-200_3.2.29-0ubuntu3_ppc64el.deb ...
Unpacking libnl-genl-3-200:ppc64el (3.2.29-0ubuntu3) ...
Selecting previously unselected package wireless-regdb.
Preparing to unpack .../02-wireless-regdb_2018.05.09-0ubuntu1~18.04.1_all.deb ...
Unpacking wireless-regdb (2018.05.09-0ubuntu1~18.04.1) ...
Selecting previously unselected package iw.
Preparing to unpack .../03-iw_4.14-0.1_ppc64el.deb ...
Unpacking iw (4.14-0.1) ...
Selecting previously unselected package crda.
Preparing to unpack .../04-crda_3.18-1build1_ppc64el.deb ...
Unpacking crda (3.18-1build1) ...
Selecting previously unselected package grub-common.
Preparing to unpack .../05-grub-common_2.02-2ubuntu8.7_ppc64el.deb ...
Unpacking grub-common (2.02-2ubuntu8.7) ...
Selecting previously unselected package grub2-common.
Preparing to unpack .../06-grub2-common_2.02-2ubuntu8.7_ppc64el.deb ...
Unpacking grub2-common (2.02-2ubuntu8.7) ...
Selecting previously unselected package linux-firmware.
Preparing to unpack .../07-linux-firmware_1.173.1_all.deb ...
Unpacking linux-firmware (1.173.1) ...
Selecting previously unselected package linux-modules-4.15.0-38-generic.
Preparing to unpack .../08-linux-modules-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
Unpacking linux-modules-4.15.0-38-generic (4.15.0-38.41) ...
Selecting previously unselected package linux-image-4.15.0-38-generic.
Preparing to unpack .../09-linux-image-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
Unpacking linux-image-4.15.0-38-generic (4.15.0-38.41) ...
Selecting previously unselected package linux-modules-extra-4.15.0-38-generic.
Preparing to unpack .../10-linux-modules-extra-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
Unpacking linux-modules-extra-4.15.0-38-generic (4.15.0-38.41) ...
Selecting previously unselected package linux-image-generic.
Preparing to unpack .../11-linux-image-generic_4.15.0.38.40_ppc64el.deb ...
Unpacking linux-image-generic (4.15.0.38.40) ...
Selecting previously unselected package linux-headers-4.15.0-38.
Preparing to unpack .../12-linux-headers-4.15.0-38_4.15.0-38.41_all.deb ...
Unpacking linux-headers-4.15.0-38 (4.15.0-38.41) ...
Selecting previously unselected package linux-headers-4.15.0-38-generic.
Preparing to unpack .../13-linux-headers-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
Unpacking linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
Selecting previously unselected package linux-headers-generic.
Preparing to unpack .../14-linux-headers-generic_4.15.0.38.40_ppc64el.deb ...
Unpacking linux-headers-generic (4.15.0.38.40) ...
Selecting previously unselected package linux-generic.
Preparing to unpack .../15-linux-generic_4.15.0.38.40_ppc64el.deb ...
Unpacking linux-generic (4.15.0.38.40) ...
Selecting previously unselected package os-prober.
Preparing to unpack .../16-os-prober_1.74ubuntu1_ppc64el.deb ...
Unpacking os-prober (1.74ubuntu1) ...
Selecting previously unselected package grub-ieee1275-bin.
Preparing to unpack .../17-grub-ieee1275-bin_2.02-2ubuntu8.7_ppc64el.deb ...
Unpacking grub-ieee1275-bin (2.02-2ubuntu8.7) ...
Selecting previously unselected package grub-ieee1275.
Preparing to unpack .../18-grub-ieee1275_2.02-2ubuntu8.7_ppc64el.deb ...
Unpacking grub-ieee1275 (2.02-2ubuntu8.7) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Setting up wireless-regdb (2018.05.09-0ubuntu1~18.04.1) ...
Setting up linux-modules-4.15.0-38-generic (4.15.0-38.41) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up grub-common (2.02-2ubuntu8.7) ...
Setting up linux-headers-4.15.0-38 (4.15.0-38.41) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libnl-3-200:ppc64el (3.2.29-0ubuntu3) ...
Setting up linux-firmware (1.173.1) ...
Setting up linux-image-4.15.0-38-generic (4.15.0-38.41) ...
I: /boot/vmlinux.old is now a symlink to vmlinux-4.15.0-38-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-4.15.0-38-generic
I: /boot/vmlinux is now a symlink to vmlinux-4.15.0-38-generic
I: /boot/initrd.img is now a symlink to initrd.img-4.15.0-38-generic
Setting up grub-ieee1275-bin (2.02-2ubuntu8.7) ...
Setting up grub2-common (2.02-2ubuntu8.7) ...
Setting up libnl-genl-3-200:ppc64el (3.2.29-0ubuntu3) ...
Setting up os-prober (1.74ubuntu1) ...
Setting up linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
Setting up iw (4.14-0.1) ...
Setting up grub-ieee1275 (2.02-2ubuntu8.7) ...

Creating config file /etc/default/grub with new version
Installing for powerpc-ieee1275 platform.
grub-install: error: the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `dd if=/dev/zero of=/dev/sda1'.
Failed: grub-install --target=powerpc-ieee1275 /dev/sda1 --no-nvram
WARNING: Bootloader is not properly installed, system may not be bootable
Setting up linux-headers-generic (4.15.0.38.40) ...
Setting up crda (3.18-1build1) ...
Setting up linux-modules-extra-4.15.0-38-generic (4.15.0-38.41) ...
Setting up linux-image-generic (4.15.0.38.40) ...
Setting up linux-generic (4.15.0.38.40) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for linux-image-4.15.0-38-generic (4.15.0-38.41) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
Setting up swapspace version 1, size = 8 GiB (8589869056 bytes)
no label, UUID=1125be4c-445c-4ea5-b16c-51b508f3f4a9
Unexpected error while running command.
Command: ['sh', '-c', 'exec "$0" "$@" 2>&1', 'install-grub', '/tmp/tmp_wb0l73x/target', '/dev/sda1']
Exit code: 1
Reason: -
Stdout: + pkg=grub-ieee1275
        + shift
        + dpkg-reconfigure grub-ieee1275
        Replacing config file /etc/default/grub with new version
        Installing for powerpc-ieee1275 platform.
        grub-install: error: the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `dd if=/dev/zero of=/dev/sda1'.
        Failed: grub-install --target=powerpc-ieee1275 /dev/sda1 --no-nvram
        WARNING: Bootloader is not properly installed, system may not be bootable
        + update-grub
        Generating grub configuration file ...
        Found linux image: /boot/vmlinux-4.15.0-38-generic
        Found initrd image: /boot/initrd.img-4.15.0-38-generic
        done
        + grub-install /dev/sda1
        Installing for powerpc-ieee1275 platform.
        grub-install: error: the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `dd if=/dev/zero of=/dev/sda1'.
        + exit
        failed to install grub!

Stderr: ''
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
        Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
        Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
        Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [83.2 kB]
        Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/universe ppc64el Packages [8260 kB]
        Get:6 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse ppc64el Packages [133 kB]
        Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el Packages [345 kB]
        Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe ppc64el Packages [481 kB]
        Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse ppc64el Packages [1668 B]
        Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe ppc64el Packages [2844 B]
        Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/main ppc64el Packages [137 kB]
        Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe ppc64el Packages [82.7 kB]
        Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse ppc64el Packages [640 B]
        Fetched 9690 kB in 2s (4034 kB/s)
        Reading package lists...
        Reading package lists...
        Building dependency tree...
        Reading state information...
        The following additional packages will be installed:
          crda grub-common grub-ieee1275 grub-ieee1275-bin grub2-common iw libnl-3-200
          libnl-genl-3-200 linux-firmware linux-headers-4.15.0-38
          linux-headers-4.15.0-38-generic linux-headers-generic
          linux-image-4.15.0-38-generic linux-image-generic
          linux-modules-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic
          os-prober wireless-regdb
        Suggested packages:
          multiboot-doc xorriso desktop-base genisoimage fdutils linux-doc-4.15.0
          | linux-source-4.15.0 linux-tools
        The following NEW packages will be installed:
          crda grub-common grub-ieee1275 grub-ieee1275-bin grub2-common iw libnl-3-200
          libnl-genl-3-200 linux-firmware linux-generic linux-headers-4.15.0-38
          linux-headers-4.15.0-38-generic linux-headers-generic
          linux-image-4.15.0-38-generic linux-image-generic
          linux-modules-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic
          os-prober wireless-regdb
        0 upgraded, 19 newly installed, 0 to remove and 5 not upgraded.
        Need to get 130 MB of archives.
        After this operation, 673 MB of additional disk space will be used.
        Get:1 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el libnl-3-200 ppc64el 3.2.29-0ubuntu3 [48.8 kB]
        Get:2 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el libnl-genl-3-200 ppc64el 3.2.29-0ubuntu3 [10.8 kB]
        Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el wireless-regdb all 2018.05.09-0ubuntu1~18.04.1 [11.1 kB]
        Get:4 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el iw ppc64el 4.14-0.1 [89.1 kB]
        Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el crda ppc64el 3.18-1build1 [63.9 kB]
        Get:6 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub-common ppc64el 2.02-2ubuntu8.7 [1632 kB]
        Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub2-common ppc64el 2.02-2ubuntu8.7 [516 kB]
        Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-firmware all 1.173.1 [64.6 MB]
        Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-modules-4.15.0-38-generic ppc64el 4.15.0-38.41 [12.5 MB]
        Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-image-4.15.0-38-generic ppc64el 4.15.0-38.41 [6073 kB]
        Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-modules-extra-4.15.0-38-generic ppc64el 4.15.0-38.41 [31.4 MB]
        Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-image-generic ppc64el 4.15.0.38.40 [2360 B]
        Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-headers-4.15.0-38 all 4.15.0-38.41 [11.0 MB]
        Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-headers-4.15.0-38-generic ppc64el 4.15.0-38.41 [1017 kB]
        Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-headers-generic ppc64el 4.15.0.38.40 [2344 B]
        Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el linux-generic ppc64el 4.15.0.38.40 [1868 B]
        Get:17 http://ports.ubuntu.com/ubuntu-ports bionic/main ppc64el os-prober ppc64el 1.74ubuntu1 [16.1 kB]
        Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub-ieee1275-bin ppc64el 2.02-2ubuntu8.7 [531 kB]
        Get:19 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main ppc64el grub-ieee1275 ppc64el 2.02-2ubuntu8.7 [47.0 kB]
        Preconfiguring packages ...
        Fetched 130 MB in 2s (73.2 MB/s)
        E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
        Selecting previously unselected package libnl-3-200:ppc64el.
        (Reading database ... 28516 files and directories currently installed.)
        Preparing to unpack .../00-libnl-3-200_3.2.29-0ubuntu3_ppc64el.deb ...
        Unpacking libnl-3-200:ppc64el (3.2.29-0ubuntu3) ...
        Selecting previously unselected package libnl-genl-3-200:ppc64el.
        Preparing to unpack .../01-libnl-genl-3-200_3.2.29-0ubuntu3_ppc64el.deb ...
        Unpacking libnl-genl-3-200:ppc64el (3.2.29-0ubuntu3) ...
        Selecting previously unselected package wireless-regdb.
        Preparing to unpack .../02-wireless-regdb_2018.05.09-0ubuntu1~18.04.1_all.deb ...
        Unpacking wireless-regdb (2018.05.09-0ubuntu1~18.04.1) ...
        Selecting previously unselected package iw.
        Preparing to unpack .../03-iw_4.14-0.1_ppc64el.deb ...
        Unpacking iw (4.14-0.1) ...
        Selecting previously unselected package crda.
        Preparing to unpack .../04-crda_3.18-1build1_ppc64el.deb ...
        Unpacking crda (3.18-1build1) ...
        Selecting previously unselected package grub-common.
        Preparing to unpack .../05-grub-common_2.02-2ubuntu8.7_ppc64el.deb ...
        Unpacking grub-common (2.02-2ubuntu8.7) ...
        Selecting previously unselected package grub2-common.
        Preparing to unpack .../06-grub2-common_2.02-2ubuntu8.7_ppc64el.deb ...
        Unpacking grub2-common (2.02-2ubuntu8.7) ...
        Selecting previously unselected package linux-firmware.
        Preparing to unpack .../07-linux-firmware_1.173.1_all.deb ...
        Unpacking linux-firmware (1.173.1) ...
        Selecting previously unselected package linux-modules-4.15.0-38-generic.
        Preparing to unpack .../08-linux-modules-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
        Unpacking linux-modules-4.15.0-38-generic (4.15.0-38.41) ...
        Selecting previously unselected package linux-image-4.15.0-38-generic.
        Preparing to unpack .../09-linux-image-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
        Unpacking linux-image-4.15.0-38-generic (4.15.0-38.41) ...
        Selecting previously unselected package linux-modules-extra-4.15.0-38-generic.
        Preparing to unpack .../10-linux-modules-extra-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
        Unpacking linux-modules-extra-4.15.0-38-generic (4.15.0-38.41) ...
        Selecting previously unselected package linux-image-generic.
        Preparing to unpack .../11-linux-image-generic_4.15.0.38.40_ppc64el.deb ...
        Unpacking linux-image-generic (4.15.0.38.40) ...
        Selecting previously unselected package linux-headers-4.15.0-38.
        Preparing to unpack .../12-linux-headers-4.15.0-38_4.15.0-38.41_all.deb ...
        Unpacking linux-headers-4.15.0-38 (4.15.0-38.41) ...
        Selecting previously unselected package linux-headers-4.15.0-38-generic.
        Preparing to unpack .../13-linux-headers-4.15.0-38-generic_4.15.0-38.41_ppc64el.deb ...
        Unpacking linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
        Selecting previously unselected package linux-headers-generic.
        Preparing to unpack .../14-linux-headers-generic_4.15.0.38.40_ppc64el.deb ...
        Unpacking linux-headers-generic (4.15.0.38.40) ...
        Selecting previously unselected package linux-generic.
        Preparing to unpack .../15-linux-generic_4.15.0.38.40_ppc64el.deb ...
        Unpacking linux-generic (4.15.0.38.40) ...
        Selecting previously unselected package os-prober.
        Preparing to unpack .../16-os-prober_1.74ubuntu1_ppc64el.deb ...
        Unpacking os-prober (1.74ubuntu1) ...
        Selecting previously unselected package grub-ieee1275-bin.
        Preparing to unpack .../17-grub-ieee1275-bin_2.02-2ubuntu8.7_ppc64el.deb ...
        Unpacking grub-ieee1275-bin (2.02-2ubuntu8.7) ...
        Selecting previously unselected package grub-ieee1275.
        Preparing to unpack .../18-grub-ieee1275_2.02-2ubuntu8.7_ppc64el.deb ...
        Unpacking grub-ieee1275 (2.02-2ubuntu8.7) ...
        Processing triggers for install-info (6.5.0.dfsg.1-2) ...
        Setting up wireless-regdb (2018.05.09-0ubuntu1~18.04.1) ...
        Setting up linux-modules-4.15.0-38-generic (4.15.0-38.41) ...
        Processing triggers for libc-bin (2.27-3ubuntu1) ...
        Setting up grub-common (2.02-2ubuntu8.7) ...
        Setting up linux-headers-4.15.0-38 (4.15.0-38.41) ...
        Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
        Setting up libnl-3-200:ppc64el (3.2.29-0ubuntu3) ...
        Setting up linux-firmware (1.173.1) ...
        Setting up linux-image-4.15.0-38-generic (4.15.0-38.41) ...
        I: /boot/vmlinux.old is now a symlink to vmlinux-4.15.0-38-generic
        I: /boot/initrd.img.old is now a symlink to initrd.img-4.15.0-38-generic
        I: /boot/vmlinux is now a symlink to vmlinux-4.15.0-38-generic
        I: /boot/initrd.img is now a symlink to initrd.img-4.15.0-38-generic
        Setting up grub-ieee1275-bin (2.02-2ubuntu8.7) ...
        Setting up grub2-common (2.02-2ubuntu8.7) ...
        Setting up libnl-genl-3-200:ppc64el (3.2.29-0ubuntu3) ...
        Setting up os-prober (1.74ubuntu1) ...
        Setting up linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
        Setting up iw (4.14-0.1) ...
        Setting up grub-ieee1275 (2.02-2ubuntu8.7) ...

        Creating config file /etc/default/grub with new version
        Installing for powerpc-ieee1275 platform.
        grub-install: error: the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `dd if=/dev/zero of=/dev/sda1'.
        Failed: grub-install --target=powerpc-ieee1275 /dev/sda1 --no-nvram
        WARNING: Bootloader is not properly installed, system may not be bootable
        Setting up linux-headers-generic (4.15.0.38.40) ...
        Setting up crda (3.18-1build1) ...
        Setting up linux-modules-extra-4.15.0-38-generic (4.15.0-38.41) ...
        Setting up linux-image-generic (4.15.0.38.40) ...
        Setting up linux-generic (4.15.0.38.40) ...
        Processing triggers for libc-bin (2.27-3ubuntu1) ...
        Processing triggers for linux-image-4.15.0-38-generic (4.15.0-38.41) ...
        /etc/kernel/postinst.d/initramfs-tools:
        update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
        Setting up swapspace version 1, size = 8 GiB (8589869056 bytes)
        no label, UUID=1125be4c-445c-4ea5-b16c-51b508f3f4a9
        Unexpected error while running command.
        Command: ['sh', '-c', 'exec "$0" "$@" 2>&1', 'install-grub', '/tmp/tmp_wb0l73x/target', '/dev/sda1']
        Exit code: 1
        Reason: -
        Stdout: + pkg=grub-ieee1275
                + shift
                + dpkg-reconfigure grub-ieee1275
                Replacing config file /etc/default/grub with new version
                Installing for powerpc-ieee1275 platform.
                grub-install: error: the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `dd if=/dev/zero of=/dev/sda1'.
                Failed: grub-install --target=powerpc-ieee1275 /dev/sda1 --no-nvram
                WARNING: Bootloader is not properly installed, system may not be bootable
                + update-grub
                Generating grub configuration file ...
                Found linux image: /boot/vmlinux-4.15.0-38-generic
                Found initrd image: /boot/initrd.img-4.15.0-38-generic
                done
                + grub-install /dev/sda1
                Installing for powerpc-ieee1275 platform.
                grub-install: error: the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `dd if=/dev/zero of=/dev/sda1'.
                + exit
                failed to install grub!

        Stderr: ''

Stderr: ''

Related branches

Changed in maas:
status: New → Incomplete
milestone: none → 2.5.0rc1
Revision history for this message
Ryan Harper (raharper) wrote :

Can you attach the curtin logs?

And do you have logs from the last previous successful run?

Ryan Harper (raharper)
Changed in curtin:
status: New → Incomplete
Revision history for this message
Andres Rodriguez (andreserl) wrote :

The curtin configuration can be found here: http://paste.ubuntu.com/p/89DwnJGzc2/

Revision history for this message
Andres Rodriguez (andreserl) wrote :

The failed installation log for the above config: https://pastebin.ubuntu.com/p/FSMCXRMzXt/

Revision history for this message
Andres Rodriguez (andreserl) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :

I deployed using MAAS 2.5.0beta3, and the result is successful. This is the config from get-curtin-config: http://paste.ubuntu.com/p/bg4JZ4bVb7/

It seems that 2.5.0beta3 has:

  - id: sda
    model: IPR-0 6DC90500
    name: sda
    ptable: msdos
    serial: IBM_IPR-0_6DC9050000000080
    type: disk

MAAS from master automatically sets the partition table to:

  - id: sda
    model: IPR-0 6DC90500
    name: sda
    ptable: gpt
    serial: IBM_IPR-0_6DC9050000000080
    type: disk
    wipe: superblock

It seems to me that the fact that latest MAAS is changing that to gpt is what's breaking the deployments.

summary: - [2.5] Failed to deploy ppc64el
+ [2.5] Failed to deploy ppc64el when partition table is GPT
Revision history for this message
Andres Rodriguez (andreserl) wrote :

After further investigation, it seems that commissioning is setting different partition tables:

MAAS 2.5.0beta3 sets partition table to MBR
MAAS 2.5.0beta4 sets partition table to GPT

Revision history for this message
Andres Rodriguez (andreserl) wrote :

The difference in behavior is between 2.5.0-beta3 and 418bd67af816b4a99747eb7a1ca8cb966b58ed84

The only storage related change is a UI change: https://git.launchpad.net/maas/commit/?id=32e3d12485456e07fbf5deb82ba6ab455eeefcb5 , which wouldn't seem related.

Changed in maas:
assignee: nobody → Lee Trager (ltrager)
importance: Undecided → Critical
status: Incomplete → Triaged
Revision history for this message
Andres Rodriguez (andreserl) wrote :

From the MAAS perspective, I can confirm that MAAS is setting to GPT, and it is failing. When setting it to MBR, it succeeds.

That said... the other question is whether curtin needs to support using GPT instead?

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Ryan Harper (raharper) wrote :

Can you do a curtin verbose install with GPT and capture the logs from that? I don't think mbr should matter, but we do use 'parted' for msdos partition creation and 'sgdisk' for gpt so there could be some issue going on here.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

@Ryan, with curtin verbose: https://pastebin.ubuntu.com/p/nzvHvStyKb/

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1800153] Re: [2.5] Failed to deploy ppc64el when partition table is GPT

@Andres can you attatch the full config when you run this under beta3
with the MBR config?

From what I can tell, the prep partition (/dev/sda1) is created fine,
but our wipe clears out the first and last 1M , it's an 8M partition.
This is a curtin bug as you've specified 'wipe: zero' which should
have written zeros over the entire partition.

That said, the same thing happens for MBR as well, so unless parted
itself is doing "extra" wiping for us; I'm not sure why the MBR
version
works but the GPT one doesn't.

We'll get a patch to ensure the partition handler checks the value of
the wipe mode and doesn't assume.
On Tue, Oct 30, 2018 at 2:16 PM Andres Rodriguez
<email address hidden> wrote:
>
> @Ryan, with curtin verbose: https://pastebin.ubuntu.com/p/nzvHvStyKb/
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1800153
>
> Title:
> [2.5] Failed to deploy ppc64el when partition table is GPT
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1800153/+subscriptions

Revision history for this message
Lee Trager (ltrager) wrote :

Every time I commission the PPC host we have in our CI I always get a GPT partitioning table using MAAS 2.4.2+. Looking through the source code it appears GPT is always set when creating a new partitioning table[1] and when generating the preseed[2] due to the bios_boot_method being powernv. I'm not sure how msdos got set but I believe the partition table type is a red herring.

The issue appears to be that Curtin is not wiping the PReP partition(/dev/sda1). If I chroot into the deployment environment and try to install GRUB with

grub-install --target=powerpc-ieee1275 /dev/sda1 --no-nvram

it fails. If I wipe /dev/sda1 first GRUB installation succeeds. I can then retry deployment and deployment works fine. I suspect the issue has to do with a newer version of GRUB being installed. Previous versions of GRUB must of been similar enough that the PReP partition didn't have to be fully wiped before installing.

@Ryan, as you mentioned Curtin has a bug where it is not fully wiping the PReP partition which appears to be the root cause of this bug. It may be worth modifying Curtin to always wipe any partition with the 'prep' flag set regardless of what wipe is set to to ensure this doesn't happen in other environments.

[1] https://git.launchpad.net/maas/tree/src/maasserver/models/partitiontable.py#n152
[2] https://git.launchpad.net/maas/tree/src/maasserver/preseed_storage.py#n254

Changed in curtin:
status: Incomplete → Confirmed
Changed in grub2 (Ubuntu):
status: New → Invalid
Changed in maas:
status: Incomplete → Invalid
Revision history for this message
Ryan Harper (raharper) wrote :

On Tue, Oct 30, 2018 at 7:35 PM Lee Trager <email address hidden> wrote:
>
> Every time I commission the PPC host we have in our CI I always get a
> GPT partitioning table using MAAS 2.4.2+. Looking through the source
> code it appears GPT is always set when creating a new partitioning
> table[1] and when generating the preseed[2] due to the bios_boot_method
> being powernv. I'm not sure how msdos got set but I believe the
> partition table type is a red herring.

>
> The issue appears to be that Curtin is not wiping the PReP
> partition(/dev/sda1). If I chroot into the deployment environment and
> try to install GRUB with

Well, other than simple mode, custom storage mode has never
wiped a prep partition. while that's a bug, it doesn't explain why
we only see this issue now.

>
> grub-install --target=powerpc-ieee1275 /dev/sda1 --no-nvram
>
> it fails. If I wipe /dev/sda1 first GRUB installation succeeds. I can
> then retry deployment and deployment works fine. I suspect the issue has
> to do with a newer version of GRUB being installed. Previous versions of
> GRUB must of been similar enough that the PReP partition didn't have to
> be fully wiped before installing.

That makes more sense; if the layout changed, but I suspect that PReP format
isn't really changing. Maybe it's attempting to copy in a new payload and
checking. The check for clean prep partition is from 2013, so no new grub
code AFAICT.

>
> @Ryan, as you mentioned Curtin has a bug where it is not fully wiping
> the PReP partition which appears to be the root cause of this bug. It
> may be worth modifying Curtin to always wipe any partition with the
> 'prep' flag set regardless of what wipe is set to to ensure this doesn't
> happen in other environments.

That seems reasonable, I was adding a wipe after creating if the
mode wasn't superblock (as we already clear superblocks before
creating partitions to not trigger buried data like raid or bcache).

But just ensuring prep partition is wiped works as well.

I'll have a branch up soon.

I would like to understand what's different on the CI side as
the curtin code *hasnt* changed despite there being a bug
for not clearing it.

>
>
> [1] https://git.launchpad.net/maas/tree/src/maasserver/models/partitiontable.py#n152
> [2] https://git.launchpad.net/maas/tree/src/maasserver/preseed_storage.py#n254
>
> ** Changed in: curtin
> Status: Incomplete => Confirmed
>
> ** Changed in: grub2 (Ubuntu)
> Status: New => Invalid
>
> ** Changed in: maas
> Status: Incomplete => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1800153
>
> Title:
> [2.5] Failed to deploy ppc64el when partition table is GPT
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1800153/+subscriptions

Revision history for this message
Scott Moser (smoser) wrote :

With regard to wiping all prep partitions...
We do have code that does this in helpers/pt_prep. Ie, the non-storage config path does this.
However, this is kind of a grey line here. If maas wants a partition wiped, then MAAS should send config that says it should be wiped.

If we bake in behavior to curtin of "Wipe all created (or existing?) PReP partitions", then
a.) that differs in behavior from all other partition types, causing inconsistency
b.) What happens at some later point when we for some reason need to *not* wipe those (dual boot or some other path). Curtin is then left in this unfortunate position of figuring out what MAAS wanted.

Why can't we have MAAS wipe this partition?

Revision history for this message
Ryan Harper (raharper) wrote :

On Wed, Oct 31, 2018 at 9:20 AM Scott Moser <email address hidden> wrote:
>
> With regard to wiping all prep partitions...
> We do have code that does this in helpers/pt_prep. Ie, the non-storage config path does this.
> However, this is kind of a grey line here. If maas wants a partition wiped, then MAAS should send config that says it should be wiped.
>
> If we bake in behavior to curtin of "Wipe all created (or existing?) PReP partitions", then
> a.) that differs in behavior from all other partition types, causing inconsistency
> b.) What happens at some later point when we for some reason need to *not* wipe those (dual boot or some other path). Curtin is then left in this unfortunate position of figuring out what MAAS wanted.
>
> Why can't we have MAAS wipe this partition?

MAAS is sending wipe: zero for the prep partition, which is exactly
what we want.

I think you're right that we want MAAS to keep doing this and have
curtin just follow the config.

>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1800153
>
> Title:
> [2.5] Failed to deploy ppc64el when partition table is GPT
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1800153/+subscriptions

Ryan Harper (raharper)
Changed in curtin:
status: Confirmed → In Progress
Lee Trager (ltrager)
no longer affects: maas
Revision history for this message
Lee Trager (ltrager) wrote :

My theory on different versions of GRUB causing the issue didn't pan out. After wiping the PReP partition I was able to go between 14.04, 16.04, and 18.04 with no problems. The only way I've been able to reproduce the issue after fixing it is by filling the PReP partition with garbage using

$ dd if=/dev/urandom of=/dev/sda1

This may of happened in our CI by running a destructive storage test(badblock-destructive, fio).

@Scott MAAS is already telling Curtin to wipe the PReP partition, Curtin isn't fully wiping it which is why we're seeing the problem. I was merely suggesting wiping PReP by default may be useful in non-MAAS environments to prevent this error. I see why you wouldn't want to do that so feel free to ignore my suggestion :)

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit ea939ee7 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=ea939ee7

Changed in curtin:
status: In Progress → Fix Committed
Revision history for this message
Ryan Harper (raharper) wrote : Fixed in curtin version 18.2.

This bug is believed to be fixed in curtin in version 18.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.