System information: Debian Wheezy
CPU: intel core i7 3770

I initially only had en_US.UTF-8 as the default language. This morning, I changed the /etc/local.gen file and un-comment the zh_CN.UTF-8 and run locale-gen:

# nano /etc/local.gen
# locale-gen

After that, I reboot the system, then I cannot see the log in screen. It is a black screen without any word, any sign or anything on the screen

Then, I log into the recovery mode, and check the locale, I saw this



I used dpkg-reconfigure locales to set the locale to en_US.UTF-8 again (disable zh_CN.UTF-8), but the locale still stays in POSIX.


I reinstalled the locale by using dpkg --reinstall install locales. It didn't help either.

dpkg --reinstall install locales

I think the default locale being set to POSIX might be the problem. Then I edit the .bashrc file (for both root and my account) and added

# nano ~/.bashrc


export LC_ALL= "en_US.UTF-8"
export LANG = "en_US.UTF-8"
export LANGUAGE = "en_US.UTF-8"

Now I can see all locale setting being changed to en_US.UTF-8 but I still cannot see the log in page.

I did some search, and guess might be related to this bug, which is an really old issue. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=330500

I looked at it, but don't know how to use it.

And this is highly possibly related to PAM.

What else can I do?

Update, I have exported the logs. In the auth.log, I saw the following,

Jan 21 10:09:13 QLin gnome-keyring-daemon[3864]: couldn't allocate secure memory to keep passwords and or keys from being written to the disk
Jan 21 10:14:18 QLin polkitd(authority=local): Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session2 (system bus name :1.58, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)

All log files can be found at dropbox


Try the following as root and see if it fixes it.

First boot from live cd

Mount your hardrive to the /mnt and any sub directories

# mount /dev/{root part} /mnt
# mount /dev/{usr part} /mnt/usr

chroot into your existing install
# LANG=C.UTF-8 chroot /mnt /bin/bash

# cd /etc    
# mv locale.gen locale.gen.bak
# echo "en_US.UTF-8 UTF-8" > locale.gen
# locale-gen

unmount drives and reboot

# sync; sync;
# umount /mnt/usr
# umount /mnt
# reboot
  • I have tried this but it actually doesn't went through. When I try to run # locale-gen, it returns command not found. I have export the log file and attached. – user292140 Jan 22 '14 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.