Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with setting locale on boot and separate /usr
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
totony
n00b
n00b


Joined: 03 Dec 2014
Posts: 40

PostPosted: Wed Jul 08, 2015 12:03 am    Post subject: Problem with setting locale on boot and separate /usr Reply with quote

Hi,

I am getting a ton of warnings upon booting telling me:
Code:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_CA.UTF-8)


I can understand why this would happen, since my local filesystems are mounted after this happen (i.e. /usr/lib/locale/locale-archive is not yet preset). After this being mounted, no errors appear.

Anyone knows how to fix this? Is there any way I could copy /usr/lib/locale/locale-archive to /lib/locale or is glibc's handling of locales all in /usr ?
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 435
Location: Australia

PostPosted: Wed Jul 08, 2015 2:16 am    Post subject: Reply with quote

You don't say much about your setup, so here's my guess.

[disclaimer] I haven't found a use case yet that justifies a separate /usr on my machines, haven't set up a Gentoo initramfs for years, and as a rule don't mount anything but /boot or /home on separate partitions.[/disclaimer]

If I had to do this on Gentoo, though i'd boot into an initramfs to set up the environment. I assume you aren't doing that? I don't think a separate /usr on Gentoo is supported without an initramfs, although that may have changed :)

Assuming the locales exist and have been generated for your system in accordance with: https://wiki.gentoo.org/wiki/Localization/Guide

FYI here you say:
Quote:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_CA.UTF-8)

And the Wiki page above:
Quote:

Warning
Using LC_ALL is strongly discouraged as it automatically overrides all other LC_* variables (LANG is not affected). This means that changes made by other means will be hidden until LC_ALL is set to a null string. It is probably best not to set it in a startup file.


I'd go about it this way: https://wiki.gentoo.org/wiki/Custom_Initramfs

Or you can use Genkernel, but I have never had much {use for / luck with} that tool personally.

Cheers
Back to top
View user's profile Send private message
totony
n00b
n00b


Joined: 03 Dec 2014
Posts: 40

PostPosted: Wed Jul 08, 2015 2:42 am    Post subject: Reply with quote

ian.au wrote:
If I had to do this on Gentoo, though i'd boot into an initramfs to set up the environment. I assume you aren't doing that? I don't think a separate /usr on Gentoo is supported without an initramfs, although that may have changed :)


Oops, I forgot to provide this information. No I don't use an initramfs. I don't really want to set one up, too much trouble/redundancy for a problem which should be fixed in another way.

I'll look into Gentoo's support for it, it seemed to me to be the only distribution that supported such a setup the last time I looked, which is one of the reasons that led me to adopt it.

For now these warnings don't cause any problem, since only one-time scripts are started before things are mounted, and it will default to POSIX for those scripts, which seems good enough.

Quote:
[disclaimer] I haven't found a use case yet that justifies a separate /usr on my machines, haven't set up a Gentoo initramfs for years, and as a rule don't mount anything but /boot or /home on separate partitions.[/disclaimer]

It allows to have more read-only partitions, which improves security (slightly) and reliability, and I find it better from a semantic point of view to not have a linux system (the initramfs) boot another linux system (the root partition).

Thanks for your proposition though, but I'll try to look into another way to do this (still looking for answers :))
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 435
Location: Australia

PostPosted: Wed Jul 08, 2015 6:17 am    Post subject: Reply with quote

totony wrote:
Thanks for your proposition though, but I'll try to look into another way to do this (still looking for answers :))


No worries, I'm sure this has been hacked, but I can't think of any way to do it that is less trivial than maintaining an initramfs.

Anything else requires passing kernel options to an unknown location; or suppressing the error msg somehow :?

It's a few lines in a log at this point, but the reason is:

https://www.gentoo.org/support/news-items/2013-09-27-initramfs-required.html

So for support you need
https://forums.gentoo.org/viewforum-f-51.html

Good luck,
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum