LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-02-2020, 07:59 AM   #1
Mangosniper
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Rep: Reputation: Disabled
Preeseeding Ubuntu 18.04 language and keyboard settings does not work


Hello everyone,

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

Click image for larger version

Name:	2020-06-02 13_47_49-LinuxQuestions.org Database Error.png
Views:	18
Size:	18.5 KB
ID:	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:

Click image for larger version

Name:	2020-06-02 13_51_35-2020-06-02 13_47_49-LinuxQuestions.org Database Error.png - Greenshot Editor.png
Views:	22
Size:	37.8 KB
ID:	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:

Click image for larger version

Name:	2020-06-02 13_56_47-● automated-gsec.seed - src - Visual Studio Code.png
Views:	15
Size:	35.3 KB
ID:	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.
 
Old 06-02-2020, 09:33 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 1,808

Rep: Reputation: Disabled
Quote:
Originally Posted by Mangosniper View Post
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 View Post
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 View Post
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.

Last edited by shruggy; 06-02-2020 at 09:40 AM.
 
Old 06-03-2020, 01:24 PM   #3
Mangosniper
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks a lot. That stuff is a great help
 
Old 06-28-2020, 09:14 AM   #4
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 20.10
Posts: 307

Rep: Reputation: 44
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.

Last edited by vmelkon; 06-28-2020 at 09:17 AM.
 
Old 10-16-2020, 04:08 AM   #5
Mangosniper
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
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 . Everything is automated now except:

Language:

Click image for larger version

Name:	language.png
Views:	7
Size:	93.3 KB
ID:	34323

Location:

Click image for larger version

Name:	location.png
Views:	6
Size:	75.1 KB
ID:	34324

And Keyboard:

Click image for larger version

Name:	keyboard.png
Views:	5
Size:	43.6 KB
ID:	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:

Click image for larger version

Name:	2020-10-16 10_06_10-Window.png
Views:	5
Size:	169.1 KB
ID:	34325

Last edited by Mangosniper; 10-16-2020 at 04:11 AM.
 
Old 10-17-2020, 10:23 AM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 1,808

Rep: Reputation: Disabled
Quote:
Originally Posted by Mangosniper View Post
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 . 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.
 
Old 10-19-2020, 02:47 AM   #7
Mangosniper
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
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:

Click image for larger version

Name:	2020-10-19 08_44_34-GSEC-PRESEED-TEST on VMdev01.png
Views:	4
Size:	92.2 KB
ID:	34337

With this on the console

Click image for larger version

Name:	2020-10-19 08_44_15-GSEC-PRESEED-TEST on VMdev01.png
Views:	5
Size:	77.7 KB
ID:	34336

I cant see any obvious error there though.
 
  


Reply

Tags
iso, isolinux, ubuntu 18.04


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How keyboard back? It seems something changed my keyboard and other language settings dedec0 Linux - Mobile 4 07-17-2020 06:31 PM
keyboard does not work CentOS 6.7 Rosewill striker RK-6000 keyboard jeduffy CentOS 10 11-07-2015 05:54 PM
can't differentiate system language from keyboard language? lilou_b Linux - Newbie 3 04-14-2010 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration