Opened 4 months ago
Last modified 4 weeks ago
#22278 assigned defect
vboxpostintall.sh failure for Subiquity based unattended installs
Reported by: | ogayot | Owned by: | gombara |
---|---|---|---|
Component: | other | Version: | VirtualBox-7.1.4 |
Keywords: | Cc: | ogayot | |
Guest type: | Linux | Host type: | other |
Description
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
Change History (3)
comment:1 by , 7 weeks ago
comment:2 by , 7 weeks ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 4 weeks ago
Hello Klaus,
Sadly, I think we currently have no way to specify "extra" group membership using the identity section. I suppose it would be a nice feature to add in the future but there is no immediate plan for it.
AFAICT The only way to specify a custom list of groups is to skip the identity section entirely - and define the user-data.users section accordingly.
Thanks, Olivier
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.