mgrouch
Posts: 10
Joined: Wed Sep 09, 2020 3:17 pm

How to set language, wifi country, locale, timezone on OS image before first boot?

Tue Apr 13, 2021 5:00 pm

How can I set language, wifi country, locale, timezone on OS image before first boot?
Thanks

klricks
Posts: 7737
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to set language, wifi country, locale, timezone on OS image before first boot?

Tue Apr 13, 2021 5:13 pm

Many settings can be done pre boot with the advanced menu of the RPi Imager: https://www.raspberrypi.org/blog/raspbe ... e-to-v1-6/
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

bls
Posts: 1357
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: How to set language, wifi country, locale, timezone on OS image before first boot?

Tue Apr 13, 2021 6:04 pm

As @klricks mentioned, the RPi imager can set many of these when writing the SD card.

Another alternative, for the CLI-minded, is https://github.com/gitbls/sdm, which enables you to do all that and more.
Pi tools:
Quickly and easily build customized-just-for-you SD Cards: https://github.com/gitbls/sdm
Easily run your network's DHCP/DNS on a Pi: https://github.com/gitbls/ndm
Easy strongSwan VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

User avatar
thagrol
Posts: 4710
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: How to set language, wifi country, locale, timezone on OS image before first boot?

Tue Apr 13, 2021 7:02 pm

For serious command line geeks, mount the image via a loop device then edit the config files in there directly or, maybe, chroot into it and run the usual tools though I've not tried that.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

Jim Danner
Posts: 11
Joined: Sun Nov 17, 2019 5:10 pm

Re: How to set language, wifi country, locale, timezone on OS image before first boot?

Tue Apr 13, 2021 7:56 pm

Another alternative approach is putting a script on the /boot partition of the SD card, so you don't need the tools to mount the system (root) partition. I put it on GitLab as pi-boot-script. See also this post.

alphanumeric
Posts: 2900
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: How to set language, wifi country, locale, timezone on OS image before first boot?

Wed Apr 14, 2021 8:43 am

With V1.6 of the official imager, launch it and press Ctrl + shift + X. That will get you options to Enable SSH, set the Hostname, configure WIFI, set Locale settings, skip the first run wizard, etc.

Return to “Raspberry Pi OS”