0

I'm trying to fully automate VM-provisioning. Therefore I trying to get Ubuntu to install without any passwords. Authentication is configured afterwards by puppet.

I tried the following statements inside my kickstart file: I tried user --disabled or d-i passwd/root-login boolean false to get rid of the user account. And i tried rootpw --disabled, d-i passwd/make-user boolean false or d-i passwd/root-password-crypted "!" to get rid of the root password.

But the installation process always asks either for a root password or for a name for a sudo account.

Is there one more switch to get me through an installation without root-passwd AND without sudo user?

PS: A ssh authorized key for root would be acceptable.

blafasel
  • 101
  • 1
  • Do you want an OEM install? http://askubuntu.com/questions/36671/how-do-i-pre-install-ubuntu-for-someone-oem-install – oldfred Feb 13 '17 at 16:23
  • No, don't think so. I'm perfectly satisfied with the newest autoinstall images from the net and I can express nearly all needs in the kickstart file. The only problem is to start without a user and a root password. (My actual workaround is to remove the superfluous accout in the %post-script. That's somewhat ugly but does the job.) – blafasel Feb 13 '17 at 16:32

1 Answers1

4

Sounds like you're re-inventing a few different wheels. Thin provisioning has come a long way in the last 10 years but even way back then, I don't think anybody was looking to automate an installer.

So first-up, imaging is what you're looking to do, at some level. That is taking a snapshot of a partition, or just some files, or whatever you need and then extracting that wherever you need it.

In the case of a VM, you'd have an entire system image stored. To provision a new VM, you set up your disk, dd your image onto the disk and then —if you need it— alter that partition to fit the disk (eg expand it).

But these days —if you can get away with it— you really want to be looking at tools like LXD and Docker. Both use a bit of container tech called LXC. Much of the separation of a VM, twice the speed and a lot less fuff. Both LXD and Docker are strongly into imaging. Docker does a lot of layering stuff too (LXD may too, I've not used it directly).

Either way. Don't try to script the installer. Do a good install, set it up how you need and clone it.

Oli
  • 293,335
  • This is definitely not an answer to my question. I know docker and LXD and I definitely dislike them. But I don't want to discuss personal preferences. I simply asked a technical question. – blafasel Feb 13 '17 at 15:16
  • 3
    Sure, it's akin to "Which spanner do I use to change this plug socket?" I know you have aims and your own thoughts on the matter but that doesn't make "Use a screwdriver" an invalid answer. – Oli Feb 13 '17 at 15:21