Hi,
I am have a problem with deploying custom Ubuntu image. Image is generated by packer by other colleague. I uploaded image to MAAS by this command maas prof boot-resources create name='custom/ubuntu-es' title='Ubuntu ES' filetype='tgz' architecture='amd64/generic' content@=/home/admin/ubuntu-maas.tgz
I tried also to include base_image=ubuntu/jammy
but it had no effect.
Machine starts to deploy, but later it fails with messages in Event log:
Mon, 11 Sep. 2023 09:35:41 Node changed status - From 'Deploying' to 'Failed deployment'
Mon, 11 Sep. 2023 09:35:41 Marking node failed - Installation failed (refer to the installation log for more information).
Mon, 11 Sep. 2023 09:35:41 Script - /tmp/curtin-logs.tar failed
Mon, 11 Sep. 2023 09:35:41 Script - /tmp/install.log failed
Mon, 11 Sep. 2023 09:35:41 Node installation failure - 'curtin' curtin command install
Mon, 11 Sep. 2023 09:35:39 Node status event - 'curtin' configuring installed system
Mon, 11 Sep. 2023 09:35:39 Node status event - 'curtin' running 'curtin curthooks'
Mon, 11 Sep. 2023 09:35:39 Node status event - 'curtin' curtin command curthooks
Mon, 11 Sep. 2023 09:35:39 Node status event - 'curtin' installing kernel
Installation output contains following part:
Processing triggers for linux-image-5.15.0-83-generic (5.15.0-83.92) ...
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 36: /etc/default/grub: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-5.15.0-83-generic (--configure):
installed linux-image-5.15.0-83-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-5.15.0-83-generic
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED subp(['udevadm', 'settle']): 0.025
Running command ['mount', '--make-private', '/tmp/tmp149ikpb_/target/sys'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmp149ikpb_/target/sys'] with allowed return codes [0] (capture=False)
Running command ['mount', '--make-private', '/tmp/tmp149ikpb_/target/run'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmp149ikpb_/target/run'] with allowed return codes [0] (capture=False)
Running command ['mount', '--make-private', '/tmp/tmp149ikpb_/target/proc'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmp149ikpb_/target/proc'] with allowed return codes [0] (capture=False)
Running command ['mount', '--make-private', '/tmp/tmp149ikpb_/target/dev'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmp149ikpb_/target/dev'] with allowed return codes [0] (capture=False)
finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/installing-kernel: FAIL: installing kernel
finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
Traceback (most recent call last):
File "/curtin/curtin/commands/curthooks.py", line 380, in install_kernel
map_suffix = mapping[codename][version]
KeyError: 'jammy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/curtin/curtin/commands/main.py", line 202, in main
ret = args.func(args)
File "/curtin/curtin/commands/curthooks.py", line 1886, in curthooks
builtin_curthooks(cfg, target, state)
File "/curtin/curtin/commands/curthooks.py", line 1728, in builtin_curthooks
install_kernel(cfg, target)
File "/curtin/curtin/commands/curthooks.py", line 385, in install_kernel
distro.install_packages([kernel_fallback], target=target)
File "/curtin/curtin/distro.py", line 424, in install_packages
return install_cmd('install', args=pkglist, opts=opts, target=target,
File "/curtin/curtin/distro.py", line 304, in run_apt_command
cmd_rv = inchroot.subp(cmd, env=env)
File "/curtin/curtin/util.py", line 787, in subp
return subp(*args, **kwargs)
File "/curtin/curtin/util.py", line 275, in subp
return _subp(*args, **kwargs)
File "/curtin/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', '/tmp/tmp149ikpb_/target', 'eatmydata', 'apt-get', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', '--option=Dpkg::Options::=--force-confold', 'install', 'linux-generic']
Exit code: 100
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp149ikpb_/target', 'eatmydata', 'apt-get', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', '--option=Dpkg::Options::=--force-confold', 'install', 'linux-generic']
Exit code: 100
Reason: -
Stdout: ''
Stderr: ''
Stderr: ''
I have no clue what could be wrong. Any help how to troubleshoot it is more than welcome Thanks.