** Description changed: [Description] We have multiple Subiquity private bug reports where people try to install Ubuntu 24.04 using virtualbox (with Guest Additions) but vboxpostinstall.sh fails. After investigating, I found out that vboxpostinstall.sh indirectly relies on usermod to add the `vboxuser` user to a group (vboxuser is the default username for VirtualBox unattended installations but can be changed by when creating the VM). We know for a fact that until now, Subiquity-based installers do not create users until first boot so using usermod in a postinstall scripts doesn't work. [Plan of actions] 1. [x] Introduce support in the identity section for creating users before firstboot in devel series (i.e., resolute) 2. [x] Open a PR in virtualbox to make sure they create the user using the identity section, not cloud-init's user-data. 3. [x] Apply patches from upstream PR in Ubuntu, via a delta. 4. [ ] Backport the Subiquity changes to ubuntu/noble so that 24.04.4 can be installed unattended (provided a patched version of VirtualBox is used). + + [Where problems could occur?] + * People with autoinstall scripts who want to modify the user might have implemented workarounds to get the /home/$USER directory created before first boot. For instance, they could have added commands such as `mkdir /home/user` in an autoinstall script. If they run this same autoinstall script with an updated Subiquity, the script will fail because that directory would have been created already. Adapting the script should be easy though. It should be a matter of dropping the `mkdir` call or replacing with `mkdir --parents` (which is fine with existing directories) to be compatible with both the old and the new behavior. + * Besides users writing their own autoinstall scripts, there are existing software solutions that feed autoinstall scripts to Subiquity. VirtualBox immediately comes to mind. Some of such software solutions might need to be properly updated to reflect the new behavior of Subiquity. When it comes to VirtualBox, we are working with upstream to get the code adapted (but unattended installations using VirtualBox are currently broken anyway...). If we run into another software solution, we will need to work with upstream to provide a solution. [How to reproduce] * Setup an Ubuntu host system running questing (i.e., 25.10) or more recent. On older Ubuntu running VirtualBox < 7.1, unattended install for Ubuntu isn't supported at all. * Install the following packages: - virtualbox - virtualbox-guest-additions-iso * Start VirtualBox and create a new VM: * Select an Ubuntu ISO, such as ubuntu-24.04.3-live-server-amd64.iso * [x] Proceed with Unattended Installation * Specify a password (twice) * [x] Install Guest Additions * The default ISO should automatically be picked up for the guest additions if virtualbox-guest-additions-iso is installed) * If installing Ubuntu Desktop, bump the memory (8 GiB recommended) * Click on "Finish" to start the installation * After some time, it fails. * The logs show that vboxpostinstall.sh --direct fails with status 1. * In the journal, you should see that something (i.e., usermod) failed with `"vboxuser" user does not exist` [Testing for 26.04 guest] * Requirements - [ ] The host must run a version of VirtualBox that includes https://github.com/VirtualBox/virtualbox/pull/439. * Run the steps described in [How to reproduce] but use the resolute live server (or desktop) daily ISO and observe a successful installation. [Testing for 24.04 guest] * Requirements - [ ] Wait until a daily ISO of noble with support for user-creation before first boot is available. - [ ] The host must run a version of VirtualBox that includes https://github.com/VirtualBox/virtualbox/pull/439. * Run the steps described in [How to reproduce] but use the resolute live server (or desktop) daily ISO and observe a successful installation. [Workaround] https://bugs.launchpad.net/subiquity/+bug/2090834/comments/7 [Additional info] Bug reports all have: * CasperMD5CheckResult: fail So they all ended up closed automatically. I created an exception so that such reports would not automatically get closed if they also have: * CasperMD5CheckMismatches: ./boot/grub/grub.cfg
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2090834 Title: vboxpostinstall.sh returned non-zero exit status 1. To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/2090834/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
