LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Preeseeding Ubuntu 18.04 language and keyboard settings does not work (https://www.linuxquestions.org/questions/ubuntu-63/preeseeding-ubuntu-18-04-language-and-keyboard-settings-does-not-work-4175676344/)

Mangosniper 06-02-2020 06:59 AM

Preeseeding Ubuntu 18.04 language and keyboard settings does not work
 
3 Attachment(s)
Hello everyone,

first thing, I tried to use the search function, but it seems to not like me:

Attachment 33323

I am trying to preseed my ubuntu-18.04.4-server-amd64 based custom ISO. However, after trying some combinations of language, locale and location I always still get asked for all these settings:

Attachment 33324

I tried my own settings, which are right now

Code:

#### Contents of the preconfiguration file (for stretch)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US

# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string DE
d-i debian-installer/locale string en_US.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect de_DE.UTF-8

# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select de
# To select a variant of the selected layout:
d-i keyboard-configuration/xkb-keymap select nodeadkeys
#d-i keyboard-configuration/toggle select No toggling

But also tried just for refference a pressed file from someone else:

https://gist.github.com/CalvinHartwe...7c583539a10859

Same behaviour. Here is also the console output of the installation when I choose the menu entry with my preseed file upt to the point where I get the "Select a language" screen:

Attachment 33327

Therefore my questions:

1. Am I doing something wrong in general?
2. Is there somewhere a list with all possible values I can set for a given preseed option? e.g. how should I know what I can set for "d-i keyboard-configuration/xkb-keymap" and what not. I dont even know if "nodeadkeys" is correct but merely guessed it from the text based interactive installer.

shruggy 06-02-2020 08:33 AM

Quote:

Originally Posted by Mangosniper (Post 6129930)
Code:

d-i debian-installer/language string en
d-i debian-installer/country string DE


I don't think locale en_DE exists.

Quote:

Originally Posted by Mangosniper (Post 6129930)
1. Am I doing something wrong in general?

How are you pointing installer to your preseed.cfg? Is the file included into initrd image?

Quote:

Originally Posted by Mangosniper (Post 6129930)
2. Is there somewhere a list with all possible values I can set for a given preseed option?

From the Debian Wiki:
Quote:

The Debian Installer logs the answers given during an interactive installation which can then be used to preseed a non-interactive installation. Those logs can be accessed by giving the --installer option to debconf-get-selections. More information can be found in chapter B.3 of the installation guide.
A link to the files with all possible preseed values is also included on the same Debian Wiki page.

Mangosniper 06-03-2020 12:24 PM

Thanks a lot. That stuff is a great help :)

vmelkon 06-28-2020 08:14 AM

Also, if you want to add a keyboard language using the GUI:
This is for Kubuntu:
Start -> Applications -> Settings -> System Settings -> Input Devices -> Keyboard
Cick on the 2nd tab, which is Layouts
Check mark Configure Layouts
us English(US) is probably already in the list.
Click Add, select the language
click OK.
Click Apply at the bottom right.

Mangosniper 10-16-2020 03:08 AM

4 Attachment(s)
Quite some time passed but I had the opportunity to continue working on the preseeding. My current preseeding config for ubuntu-18.04.4-server-amd64.iso is

Code:


# localization
d-i debian-installer/language string en
d-i debian-installer/country string DE
d-i debian-installer/locale string en_GB.UTF-8

#keyboard
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us

# automatically select network interface
d-i netcfg/choose_interface select auto

#DHCP is done automatically. If you uncomment the following though, you can set the IP instead
d-i netcfg/disable_autoconfig boolean true
# Static network configuration.
# IPv4
d-i netcfg/get_ipaddress string 192.168.1.201
d-i netcfg/get_netmask string 255.255.0.0
d-i netcfg/get_gateway string 192.168.1.254
d-i netcfg/get_nameservers string 172.16.178.1
d-i netcfg/confirm_static boolean true

# set host and domain
d-i netcfg/get_hostname string automated-install
d-i netcfg/get_domain string somedomain

# make regular user and set root password
# mkpasswd -m sha-512 -S $(pwgen -ns 16 1) <yourpw>
d-i passwd/root-password-crypted password $6$X3eIcgOebYdO1ejG$Sd8e2AIamFXKlykSyrWcOrvxgxEVPwCPfn0gcO1wbdNT5OibqdFTV/ytCP9lzuBc1QjNg1xiPJFpcjoUdxYnZ.

# To create a normal user account.
d-i passwd/make-user boolean true
d-i passwd/user-fullname string max mustermann
d-i passwd/username string maxmus
d-i passwd/user-password-crypted password $6$X3hIcJOebYDO1ejG$Sd8e2AIamFXKlykSyrWcOrvxgxEVPwCPfn0gcOXwbdNTdOibqdFTV/yGCP9lzuBc1QjNgKxiPJFpnjoUdxYnZ.

# hardware clock is UTC, timezone is Europe/Berlin, use ntp to set clock
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Berlin
d-i clock-setup/ntp boolean true

# use lvm partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

# make lvm the max size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string debian

# use the following partition scheme on /dev/sda
d-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select boot-lvm

# /boot 500M ext4
# swap 2G
# /tmp 2G ext4
# /var/log 4G ext4
# / 8G+ ext4
d-i partman-auto/expert_recipe string              \
    boot-lvm ::                                    \
        500 500 500 ext4                            \
            $primary{ } $bootable{ }                \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /boot }                    \
        .                                          \
        2048 2048 200% linux-swap                  \
            $lvmok{ }                              \
            lv_name{ swap } in_vg { debian }        \
            $primary{ }                            \
            method{ swap } format{ }                \
        .                                          \
        2048 2048 2048 ext4                        \
            $lvmok{ }                              \
            lv_name{ tmp } in_vg { debian }        \
            $primary{ }                            \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /tmp }                      \
        .                                          \
        4000 4096 4096 ext4                        \
            $lvmok{ }                              \
            lv_name{ var_log } in_vg { debian }    \
            $primary{ }                            \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ /var/log }                  \
        .                                          \
        8192 8192 -1 ext4                          \
            $lvmok{ }                              \
            lv_name{ root } in_vg { debian }        \
            $primary{ }                            \
            method{ format } format{ }              \
            use_filesystem{ } filesystem{ ext4 }    \
            mountpoint{ / }                        \
        .

# remove any RAID partitioning
d-i partman-md/device_remove_md boolean true

# don't confirm anything
d-i partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# install no extra software
tasksel tasksel/first multiselect

# Hopefully skipping proxy setting for package manager
d-i    mirror/http/proxy      string

# upgrade no packages and do not update packages automatically after that
d-i pkgsel/upgrade select none
d-i pkgsel/update-policy select none

# disable popularity contest
popularity-contest popularity-contest/participate boolean false

# Install grub automatically
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

Besides the ressources mentioned by shruggy, this video https://www.youtube.com/watch?v=ndHi1sQWuH4 and this askubuntu question https://askubuntu.com/questions/8130...file-not-found (or especially the answer of Maarten Kieft) were a big help.

HOWEVER, I still cant get the locale stuff to work :D. Everything is automated now except:

Language:

Attachment 34323

Location:

Attachment 34324

And Keyboard:

Attachment 34322

Though I have specified that in the preseed.cfg. I will post the solution for this as soon as I figured it out.

Also here is my current output of the installation log:

Attachment 34325

shruggy 10-17-2020 09:23 AM

Quote:

Originally Posted by Mangosniper (Post 6175805)
Code:

d-i debian-installer/language string en
d-i debian-installer/country string DE

HOWEVER, I still cant get the locale stuff to work :D. Everything is automated now except:

Once again. There's no combination language en + country DE. You should change the above either to
Code:

d-i debian-installer/language string en
d-i debian-installer/country string GB

or to
Code:

d-i debian-installer/language string de
d-i debian-installer/country string DE

or to whatever acceptable combination you prefer.

Mangosniper 10-19-2020 01:47 AM

2 Attachment(s)
Hey shruggy. Sorry, I just added the file content of my last attempt. I also tried with

Code:

# localization
d-i debian-installer/language string en
d-i debian-installer/country string GB
d-i debian-installer/locale string en_GB.UTF-8

#keyboard
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us

Same result. I get the three screens as shown at the end of my previous posts to select location, language and keyboard.

After I choose the menu entry with my preseed.cfg, the next screen I get is:

Attachment 34337

With this on the console

Attachment 34336

I cant see any obvious error there though.


All times are GMT -5. The time now is 06:00 AM.