Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to automate installation using Preseed for keyboard, time zone, locale, and user? #24

Closed
tcboeira opened this issue Feb 11, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@tcboeira
Copy link

Hello dear...

After preparing the new ISO, carrying out the settings and being ready to generate, I assumed it was in "Preseed Files" but I couldn't find the right place, nor the correct instructions, on how to customize the autoresponder...

I mean...

I wanted it to be the complete installation directly, that the keyboard and time zone location were automatic, that the new user + corresponding password were directly created WITHOUT intervention of the installer user. I wanted it to only be able to choose the machine name and disk partitioning.

Is it in Preseed Files?
If so, should I create a new one or change the existing one?
Does the existing documentation (https://help.ubuntu.com/lts/installation-guide/amd64/apbs02.html) work for 20.04?

If not, where would it be?

Thank you so much for all the help being contributed!!!

Hugs

@tcboeira tcboeira added the question Further information is requested label Feb 11, 2022
@PJ-Singh-001
Copy link
Owner

You are correct. You would edit the preseed file in order to:

  • Configure the keyboard
  • Configure the time zone
  • Configure the location
  • Configure the new user, password, and groups

Reference Automating the installation using preseeding for more information.

Here is an example.

  1. Install the desired language packages.

    (You will find these are already installed in the Live ISO).

    apt install language-pack-pt language-pack-pt-base language-pack-gnome-pt language-pack-gnome-pt-base
    
  2. Tell the Ubiquity installer to not remove your language packages.

    Navigate to the Packages page.

    Click (anywhere) on the list, and begin typing the word "language" to search for packages that begin with this word.

    Uncheck the following four packages:

    • language-pack-pt
    • language-pack-pt-base
    • language-pack-gnome-pt
    • language-pack-gnome-pt-base

    This will ensure that the installer does not remove your language packages. This is not strictly necessary, since we will select your language and locale in the preseed below (step 5), but it is a good measure nevertheless.

    You will also notice that the English language packages are flagged (check-marked) to be automatically removed by the installer after installation of your customized OS (if English is not selected as your default language).

  3. Edit the preseed configuration.

    Navigate to the Options page, and select the Preseed tab.

    Click on /preseed/ubuntu.seed in the left pane.

  4. Configure the default keyboard.

    Add the following to the /preseed/ubuntu.seed file:

    # Disable automatic (interactive) keymap detection.
    d-i console-setup/ask_detect boolean false
    
    # Keyboard selection.
    d-i keyboard-configuration/xkb-keymap select us
    
    # Select a variant of the selected layout.
    d-i keyboard-configuration/xkb-keymap select us(dvorak)
    
    # d-i keyboard-configuration/toggle select No toggling
    
  5. Configure the default language and locale

    For this example, note that "pt" = Portuguese, and "BR" = Brazil.

    Add the following to the /preseed/ubuntu.seed file:

    # Set language, country and locale.
    d-i debian-installer/language string pt
    d-i debian-installer/country string BR
    d-i debian-installer/locale string pt_BR.UTF-8
    
    # Specify additional locales to be generated.
    d-i localechooser/supported-locales multiselect pt_BR.UTF-8
    
    # Set keyboard layout.
    d-i keyboard-configuration/xkb-keymap select pt
    
    # Set time zone and region.
    d-i time/zone string America/Belem
    d-i debian-installer/region string pt_BR.UTF-8
    

    Optionally, if you want multiple locales generated, separate them with commas as show here:

    For this example, note that "fr" = French, and "CH" = Switzerland.

    Add the following to the /preseed/ubuntu.seed file:

    # Specify additional locales to be generated.
    d-i localechooser/supported-locales multiselect pt_BR.UTF-8, fr_CH.UTF-8, en_US.UTF-8
    

    Here are some references if you are configuring different languages or locales:

  6. Configure the user, password, and group information.

    Add the following to the /preseed/ubuntu.seed file:

    # Create a normal user account.
    d-i passwd/user-fullname string Thiago Boeira
    d-i passwd/username string ubuntu
    
    # User's password in clear text.
    d-i passwd/user-password password insecure
    d-i passwd/user-password-again password insecure
    
    # Override weak password warning.
    d-i user-setup/allow-password-weak boolean true
    
    # Add user to specific groups.
    # d-i passwd/user-default-groups string audio cdrom video
    d-i passwd/user-default-groups string adm cdrom sudo dip plugdev lpadmin lxd sambashare
    

@PJ-Singh-001 PJ-Singh-001 self-assigned this Feb 18, 2022
@PJ-Singh-001 PJ-Singh-001 changed the title Automate Installation Process - Or Almost How to automate installation using Preseed for keyboard, time zone, locale, and user? Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants