Created attachment 504003 [details]
Description of problem:
Using Japanese ja_JP.UTF-8 environment,
the characters in load selinux policy message are garbled.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Using Japanese ja_JP.UTF-8
2. SELinux is disabled
Please see attached file(dracut-004-53.el6-selinux-loadpolycy-garbled.JPG)
Do not garble.
I think the languages other than Japanese to be garbled.
For instance, it is Chinese.
Japanese cannot be displayed with the console in RHEL6.0/6.1.
I think that it is because bogl packages became unsupported in RHEL6.
I have two plans for this issue.
Plan A :
This simple patch mainly adds force LANG=C to selinux load policy.
--- modules.d/99base/selinux-loadpolicy.sh.orig 2011-06-08 15:47:57.698559649 +0900
+++ modules.d/99base/selinux-loadpolicy.sh 2011-06-08 15:48:25.456746330 +0900
@@ -1,6 +1,11 @@
# FIXME: load selinux policy. this should really be done after we switchroot
+# We can't Japanese on normal console at boot time, so force LANG=C.
+if [ "$LANG" = "ja_JP.UTF-8" ]; then
# If SELinux is disabled exit now
Plan B: support bogl packages.
Uusing the source of bogl of FC15 Rawhide, Japanese was able to be displayed with RHEL6.1.
Created attachment 504004 [details]
These are bogl packages used to test.
Using bterm, the garble of dmesg is solved.
I am tending to use LANG=C, because all the rest is not translated anyway.
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update release.
(In reply to comment #6)
> I am tending to use LANG=C, because all the rest is not translated anyway.
I think that LANG=C is good in the default setting.
I think that a Japanese check of the patch is unnecessary.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
When turning on selinux from inside the initramfs, the selinux commands used the locale specified for the system. But because the terminal is not yet ready for the locale in the initramfs, the resulting output of the selinux commands was garbled for locales, which differ in fonts to the default linux console. The new dracut initramfs now turns of localization for the selinux commands, which results in readable english messages. The initramfs is not localized anyway.
# grep load_policy selinux-loadpolicy.sh
if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ]; then
# load_policy does mount /proc and /selinux in
if [ -x "$NEWROOT/sbin/load_policy" ]; then
out=$(LANG=C chroot "$NEWROOT" /sbin/load_policy -i 2>&1)
out=$(LANG=C chroot "$NEWROOT" /usr/sbin/load_policy -i 2>&1)
die "Machine in enforcing mode and cannot execute load_policy. To disable selinux, add selinux=0 to the kernel command line."
# rpm -qf selinux-loadpolicy.sh
The actual command execution is prefixed with LANG=C. Moving to VERIFIED.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.