← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2036638] Re: curtin FAIL: installing grub to target devices

 

Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         UEFI remove old olders efi state:
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         EFIBootState(current='0000', timeout='0 seconds', order=['0001', '2001', '2005'], entries={'0000': EFIBootEntry(name='USB Hard Drive (UEFI) - KingstonDataTraveler G3 (KingstonDataTraveler G3)', path='UsbWwid(951,1643,0,001CC0EC32C7FBA1171127D)/HD(2,GPT,994580b5-a031-475e-a2f0-f507ad708683,0xa9c820,0x2810)RC'), '0001': EFIBootEntry(name='Windows Boot Manager', path='HD(1,GPT,9ccec929-07f1-4276-8426-d77803f19ee3,0x800,0x82000)/File(\\EFI\\Microsoft\\Boot\\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d0000006d000100000010000000040000007fff0400'), '2001': EFIBootEntry(name='EFI USB Device', path='RC'), '2005': EFIBootEntry(name='Internal Hard Disk or Solid State Disk', path='RC')})
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Skipped removing 1 old UEFI entrie.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         UEFI entry 'Windows Boot Manager' might no longer exist and should be removed.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         installing grub to target=/target devices=['/dev/nvme0n1p1'] [replace_defaults=True]
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Checking if target_proc (/target/proc) is a mount
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         It's not, using normal behavior
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/target', 'dpkg', '--print-architecture'] with allowed return codes [0] (capture=True)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         updated /target/etc/default/grub to set: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Using grub install command: /usr/lib/grub/grub-multi-install
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Grub install cmds:
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         [['efibootmgr', '-v'], ['dpkg-reconfigure', 'grub-efi-amd64'], ['update-grub'], ['/usr/lib/grub/grub-multi-install'], ['efibootmgr', '-v']]
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--bind', '/dev', '/target/dev'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--bind', '/proc', '/target/proc'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--bind', '/run', '/target/run'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--bind', '/sys', '/target/sys'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--bind', '/sys/firmware/efi/efivars', '/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--bind', '/target/usr/bin/true', '/target/usr/bin/ischroot'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Checking if target_proc (/target/proc) is a mount
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         It is, so unshare will use --mount-proc=/target/proc
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'efibootmgr', '-v'] with allowed return codes [0] (capture=True)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Checking if target_proc (/target/proc) is a mount
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         It is, so unshare will use --mount-proc=/target/proc
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'dpkg-reconfigure', 'grub-efi-amd64'] with allowed return codes [0] (capture=True)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Checking if target_proc (/target/proc) is a mount
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         It is, so unshare will use --mount-proc=/target/proc
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'update-grub'] with allowed return codes [0] (capture=True)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Checking if target_proc (/target/proc) is a mount
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         It is, so unshare will use --mount-proc=/target/proc
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', '/usr/lib/grub/grub-multi-install'] with allowed return codes [0] (capture=True)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         TIMED subp(['udevadm', 'settle']): 0.007
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--make-private', '/target/usr/bin/ischroot'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['umount', '/target/usr/bin/ischroot'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--make-private', '/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['umount', '/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--make-private', '/target/sys'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['umount', '/target/sys'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--make-private', '/target/run'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['umount', '/target/run'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--make-private', '/target/proc'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['umount', '/target/proc'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['mount', '--make-private', '/target/dev'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Running command ['umount', '/target/dev'] with allowed return codes [0] (capture=False)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: installing grub to target devices
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/configuring-bootloader: FAIL: configuring target system bootloader
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Traceback (most recent call last):
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/commands/main.py", line 202, in main
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             ret = args.func(args)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                   ^^^^^^^^^^^^^^^
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/commands/curthooks.py", line 2217, in curthooks
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             builtin_curthooks(cfg, target, state)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/commands/curthooks.py", line 2172, in builtin_curthooks
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             setup_boot(cfg, target, machine, stack_prefix, osfamily=osfamily,
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/commands/curthooks.py", line 919, in setup_boot
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             setup_grub(cfg, target, osfamily=osfamily, variant=variant)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/commands/curthooks.py", line 839, in setup_grub
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             install_grub(instdevs, target, uefi=uefi_bootable, bootcfg=bootcfg)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/commands/install_grub.py", line 451, in install_grub
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             in_chroot.subp(cmd, env=env, capture=True)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/util.py", line 843, in subp
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             return subp(*args, **kwargs)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                    ^^^^^^^^^^^^^^^^^^^^^
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/util.py", line 323, in subp
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             return _subp(*args, **kwargs)
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                    ^^^^^^^^^^^^^^^^^^^^^^
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:           File "/snap/ubuntu-desktop-bootstrap/441/lib/python3.12/site-packages/curtin/util.py", line 172, in _subp
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:             raise ProcessExecutionError(stdout=out, stderr=err,
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         curtin.util.ProcessExecutionError: Unexpected error while running command.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', '/usr/lib/grub/grub-multi-install']
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Exit code: 1
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Reason: -
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Stdout: ''
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Stderr: Installing grub to /boot/efi.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                 Installing for x86_64-efi platform.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                 grub-install: error: failed to make directory: '/boot/efi/EFI/ubuntu'.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                 
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Unexpected error while running command.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', '/usr/lib/grub/grub-multi-install']
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Exit code: 1
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Reason: -
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Stdout: ''
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         Stderr: Installing grub to /boot/efi.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                 Installing for x86_64-efi platform.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                 grub-install: error: failed to make directory: '/boot/efi/EFI/ubuntu'.
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:                 
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         {'current': '0000', 'timeout': '0 seconds', 'order': '0001,2001,2005,2002,2004'}
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         {'current': '0000', 'timeout': '0 seconds', 'order': '0001,2001,2005,2002,2004'}
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]:         
Oct 10 22:46:52 ubuntu subiquity_log.4534[10663]: Stderr: ''
Oct 10 22:46:52 ubuntu subiquity_event.4534[4534]:  executing curtin install curthooks step
Oct 10 22:46:52 ubuntu subiquity_event.4534[4534]: installing system
Oct 10 22:46:52 ubuntu subiquity_event.4534[4534]:

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to curtin in Ubuntu.
https://bugs.launchpad.net/bugs/2036638

Title:
  curtin FAIL: installing grub to target devices

Status in curtin package in Ubuntu:
  Confirmed

Bug description:
  finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: installing grub to target devices
          finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/configuring-bootloader: FAIL: configuring target system bootloader
          finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
          Traceback (most recent call last):
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
              ret = args.func(args)
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1918, in curthooks
              builtin_curthooks(cfg, target, state)
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1883, in builtin_curthooks
              setup_grub(cfg, target, osfamily=osfamily,
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 819, in setup_grub
              uefi_remove_old_loaders(grubcfg, target)
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 442, in uefi_remove_old_loaders
              in_chroot.subp(
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/util.py", line 787, in subp
              return subp(*args, **kwargs)
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/util.py", line 275, in subp
              return _subp(*args, **kwargs)
            File "/snap/subiquity/5097/lib/python3.10/site-packages/curtin/util.py", line 139, in _subp
              raise ProcessExecutionError(stdout=out, stderr=err,
          curtin.util.ProcessExecutionError: Unexpected error while running command.
          Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/target', 'efibootmgr', '-B', '-b', '000A']
          Exit code: 15
          Reason: -
          Stdout: ''
          Stderr: Could not delete variable: Invalid argument

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: curtin (not installed)
  ProcVersionSignature: Ubuntu 5.15.0-60.66-generic 5.15.78
  Uname: Linux 5.15.0-60-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu82.3
  Architecture: amd64
  CasperMD5CheckResult: pass
  CasperVersion: 1.470.2
  Date: Tue Sep 19 20:27:00 2023
  LiveMediaBuild: Ubuntu-Server 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230217.1)
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
   SHELL=/bin/bash
  RebootRequiredPkgs: Error: path contained symlinks.
  SourcePackage: curtin
  UpgradeStatus: No upgrade log present (probably fresh install)

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