#22278 assigned defect
vboxpostintall.sh failure for Subiquity based unattended installs
回報者: | ogayot | 負責人: | gombara |
---|---|---|---|
元件: | other | 版本: | VirtualBox-7.1.4 |
關鍵字: | 副本: | ogayot | |
Guest type: | Linux | Host type: | other |
描述
Hello,
I am one of the developers of the Subiquity project (Ubuntu). Since recently, we started receiving bug reports [1]
showing failed installations done using the unattended install mechanism of VirtualBox.
In the bugs reports, we see the script vboxpostinstall.sh failing with exit status 1.
I haven't had a chance to reproduce the issue yet, nor to get my hand on any vboxpostinstall.log log file - because Ubuntu does not automatically collect it.
However, after investigating, I found this:
Dec 17 09:31:33 ubuntu subiquity_log.3847[21868]: usermod: user 'vboxuser' does not exist Dec 17 09:31:33 ubuntu subiquity_log.3847[21871]: ** exit code: 6
which I think is coming from this directive [2]
log_command_in_target usermod -a -G vboxsf "@@VBOX_INSERT_USER_LOGIN@@"
Currently subiquity-based installers defer the user creation until after first boot (we rely on cloud-init to perform the user creation). So we should somehow make sure that either:
- The postinstall.sh is not dependent on user-creation ; or
- We ensure the user user is created before (possibly using late-commands?)
[3]
Thank you,
Olivier
- [1] https://bugs.launchpad.net/subiquity/+bug/2090834
- [2] https://github.com/mirror/vbox/blame/74117a1cb257c00e2a92cf522e8e930bd1c4d64b/src/VBox/Main/UnattendedTemplates/debian_postinstall.sh#L232-L232C22
- [3] https://github.com/mirror/vbox/blob/74117a1cb257c00e2a92cf522e8e930bd1c4d64b/src/VBox/Main/UnattendedTemplates/ubuntu_autoinstall_user_data#L44
Hi Olivier,
is it possible to tell subiquity to add the group membership stuff to the cloud-init config it generates? That would be the cleanest solution I can think of, because it directly does 'the right thing' for user creation.
Would it work to extend the current user-data section in ubuntu_autoinstall_user_data (which is already in cloud-init form, but autoinstall/identity doesn't have any provisions for group membership) to something like
which essentially does what I hinted above if subiquity is smart enough to merge its stuff with the group membership.