calamares icon indicating copy to clipboard operation
calamares copied to clipboard

OEM Mode Installer

Open jriddell opened this issue 7 years ago • 12 comments

Submission type

  • [ ] Bug report
  • [ X ] Feature Request

KDE neon would like to recreate the OEM feature that exists in Ubiquity

The first step is a normal install but which, when it is started with a given environment variable, pre-sets the user stage to create a user called OEM with auto-login enabled.

The OEM then reboots and configures the system how they want and runs a script (oem-prepare) which sets up the system so when it is shut down and restarted it runs ubiquity/calamares in setup mode which as discussed runs the timezone, language and user setup module plus deletes the existing user.

jriddell avatar Dec 05 '17 17:12 jriddell

https://phabricator.kde.org/T6352

jriddell avatar Dec 05 '17 17:12 jriddell

@jriddell: For Station-X we already developed a working OEM installer version of Calamares. Additional modules can be found here. If you need more infos, you may contact me directly.

philmmanjaro avatar Dec 05 '17 21:12 philmmanjaro

well is a dupe of #762 , #765 , #291 .. I don't think something generic can be made here.

Maybe some 'generic framkework for OEM mode' with good documentation ? So Distributors can get the skeleton and change / add / remove things ?

abucodonosor avatar Dec 06 '17 18:12 abucodonosor

There are two phases involved here, both of which could confusingly be called "OEM mode". To be clear, the goal of the two phases is to end up with Linux (some distro) installed on a piece of hardware which is passed to a customer's hands. On first boot, the hardware is (re)configured with user input.

  • Phase 1, OEM preparation (which is what this ticket is about) is about creating the image that will be used on first boot; so that is a normal partition, create a standard user (e.g. "live") with autologin, populate a default desktop with a big icon "first run this" or set up autostart of the configurator, ... it is roughly a standard installation, with a little more configuration of the desktop of the live user.
  • Phase 2, "OEM user" (which is what #762 and #291 are about) is setting up, from the "live" user, a new user for actual login -- along with whatever other configurations are wanted for the distro for the actual user.

I think both of these are doable, with Calamares as it is today, but they require some configuration and attention from the distro's to actually use:

  • Phase one should allow an empty password for the live user, and it would be useful to read configuration from a file instead of having to go through the UI. It should install a phase-2-configured Calamares into the target system (either through a package, or as part of the image).
  • Phase two is possible with the "dont-chroot" flag and (again) careful configuration. Typically you drop the partition module (that was done in phase 1) and keep the users module, add in a delete-calamares script (note to downstreams: that kind of module should be upstreamed), add some user configuration (e.g. Plasma LNF if you're a KDE-shipping-distro). To get all that you just need Calamares installed and the relevant /etc/calamares/ files.

I think that good documentation would go a long way here.

adriaandegroot avatar Dec 07 '17 12:12 adriaandegroot

@philmmanjaro Although that project-X setup is totally lacking in documentation, I've looked at the files. It is roughly what I described above: two phases, simplified config in phase 2.

adriaandegroot avatar Dec 07 '17 13:12 adriaandegroot

Deleting Calamares is what the packages module is for.

kkofler avatar Dec 07 '17 15:12 kkofler

Docs started in the deployer's guide.

adriaandegroot avatar Dec 07 '17 16:12 adriaandegroot

@adriaandegroot: Yes, I don't have documented it yet. In short we used some of the basic functions and created the user oem. The first phase installs the system at manufacturer side. On first bootup you get logged in as oem user and Calamares starts again. Based on the modules needed to configure the system for the user it get handled by Calamares on the second run, including Calamares after finishing with the process.

philmmanjaro avatar Dec 07 '17 21:12 philmmanjaro

It would be great if oem mode could be used as toggle-able option in the base installer. Some kind of checkbox to skip the language and user creation modules and instead trigger a distro configurable action. That way we would not need separate oem isos. It would be great for "installing this for a friend"-type of use case.

Chrysostomus avatar Oct 23 '20 20:10 Chrysostomus

A combination of -c and -X options should do the trick, really: you can pick configuration directories directly (with -c) or via XDG variables, although you'll need two .desktop files (one for each mode).

adriaandegroot avatar Oct 24 '20 00:10 adriaandegroot

Bump... where do we stand with this? I work with an OEM that would love to have this feature.

eeickmeyer avatar Jan 20 '21 22:01 eeickmeyer

For actual OEM, it is already doable the way Manjaro does it. On iso, you run only the partitioning and iso decompression modules. Then on installed system you have oem user and automatically run the language and user creation modules. @philmmanjaro knows more specifics.

Here is how we create isos and configure calamares:

https://gitlab.manjaro.org/tools/development-tools/manjaro-tools/-/blob/master/bin/buildiso.in

Chrysostomus avatar Jan 20 '21 22:01 Chrysostomus

This feature request is close to 5 years old, some options have been discussed and some code seems usable, but never any PR submitted, so it is time to close.

demmm avatar Sep 13 '22 11:09 demmm