Merge ~xnox/ubuntu-images:fix-desktop-pi into ubuntu-images:mantic

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: ~xnox/ubuntu-images:fix-desktop-pi
Merge into: ubuntu-images:mantic
Diff against target: 47 lines (+22/-6)
2 files modified
skip-oem-firststage (+18/-0)
ubuntu-pi-arm64.yaml (+4/-6)
Reviewer Review Type Date Requested Status
Dave Jones Pending
Łukasz Zemczak Pending
Ubuntu Release Team Pending
Review via email: mp+451941@code.qastaging.launchpad.net

Commit message

Correct skipping first stage of oem config

It looks like pi preinstalled images want to skip interactive customization stage oem config and boot directly into end-user first-boot experience.

Previous attempts of doing it result in failure. As /proc, /sys are not mounted, oem user doesn't exist, and sudo into oem user is attempted to notify the interactive user that customization is now completed.

The imagedefinition spec doesn't allow passing any arguments, so write a script that will mount /proc /sys, execute oem-config-prepare in quiet mode, unmount and self-remove the script.

This correctly completes the oem config stage, as mounted image can be checked to be booting into oem systemd target.

debug log looks like this:

[14] perform_manual_customization
Copying file "skip-oem-firststage" to "/tmp/ubuntu-image-310959ce-b637-4d38-a0c2-906dcdc0183a/chroot/usr/local/bin/skip-oem-firststage"
Executing command "/usr/sbin/chroot /tmp/ubuntu-image-310959ce-b637-4d38-a0c2-906dcdc0183a/chroot /usr/local/bin/skip-oem-firststage"
Created symlink /etc/systemd/system/oem-config.target.wants/oem-config.service → /lib/systemd/system/oem-config.service.
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/oem-config.target.
removed '/usr/local/bin/skip-oem-firststage'
[15] populate_rootfs_contents

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

This is to ensure one can create images locally. This doesn't seem to be an issue in the livefs launchpad builds because group `oem` is there, somehow.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches